Mod Version: 1.6.2
Zen Cart Version: 1.3.8a
FYI.. None of the defined pages appeared in the Define Pages Editor until I copied them to the
includes/languages/english/html_includes folder too. So now the define pages for this mod are stored in two locations as follows:
- includes/languages/english/html_includes
- includes/languages/english/html_includes/YOUR_TEMPLATE
I wanted to share this in case anyone else was having the same issue I was. This is pretty a cool module.. Now that I've got it all working I have one issue and I need some help with a change I'm trying to make...
Issue:
Add Entries for Existing Customers does not add customers to the contest. My test contest dates are 01/01/2009 - 12/31/2009, and there are sales during this period. Yet when I click the "Add Customers" button, no customers are added. Is there a fix for this??
Change:
I am trying to get the contest entry form to fill out the customer information (name and e-mail address) when a customer is logged in. I took a look at the contact us form to see how it was done there.. Based on this, in the
includes/modules/pages/contest/header_php.php around line 18 I added the following:
PHP Code:
// auto complete when logged in
if($_SESSION['customer_id']) {
$sql = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id = :customersID";
$sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
$check_customer = $db->Execute($sql);
$customer_email= $check_customer->fields['customers_email_address'];
$customer_name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
} else {
$customer_email = NOT_LOGGED_IN_TEXT;
$customer_name = NOT_LOGGED_IN_TEXT;
}
// default email and name if customer is logged in
if($_SESSION['customer_id']) {
$sql = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id = :customersID";
$sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
$check_customer = $db->Execute($sql);
$email= $check_customer->fields['customers_email_address'];
$name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
}
This gets the name in the name field, but not the e-mail address.. I am a bit over my head here, and could use a hand.. What do I need to add, subtract, multiply or divide to get me the rest of the way there..

Bookmarks