fakesharksfinsoup:
Hi all,
I installed:
Zen Cart™ Version: v1.3.8
Version: 1.3.8.a
Last Updated: Dec 30 2007
Author: CnTGifts
The "how do you hear about us" does appear on the log in page. However, the information the customers posts does not appear in Admin/customers or Admin/extras/referel sources. Admin/customers shows (referered by is --none--) and
Admin/extras/referel sources shows (other............2).Once i click on it, it disappears, nothing else happens. Also, even if i state that the referrals by customers is required, customers can still carry on without entering anything.
I did the following:
- Unpack the zip file to a temporary directory on my hard drive.
2)Changed the name of the folder "YOUR-TEMPLATE" to my own templatename. This folder is found in the includes/templates folder.
3)Upload through FTP the includes and admin folders into my web server.
4)Run install_referrals.sql in Zen cart Install SQL patch.
I can't seem to figure out why its not fully functioning even though i follow exactly the instructions. Also read all the threads in here and somehow see some similar issues faced but still not able to figure out. Really need my fellow zenners assistance.:blush:
Mine was not working, cracked my brain, killed billions of brain cells, and read through many pages in this thread, I finally got it working, so I am posting this in case anyone is in the same situation as I was.
Cart: 1.38a
Mods added:
- how do you hear from us
- newsletter only mod
I realized that I did everything correct while installing the referrals mod, but the records are not showing in the admin>customers>customers; nor was it showing in the extra>referral source
I noticed that the installation pack (createaccount) wasn't really pointing to the right directory since I am running a customized template (apple_zen).
In included/modules/create_account.php, it's not overriding on my custom template directory on the server.
(if you are attempting what I did, please save the original file in a temp directory, in case it doesn't work for you, you can reinstate the original file)
My newsletter only mod file is, so it's already overridden with the newsletter only file, I do not want to override the current create account file (which may means my newsletter instruction only may be lost), I opened up the original referral create_account.php file and the copy in my apple_zen directory (create_account.php) and match the 2 files.
Do take note of the 'rmh' code throughout the file, copy and paste them into the original file.
Line 78:
//rmh referral start
$source = zen_db_prepare_input($_POST['source']);
if (isset($_POST['source_other'])) $source_other = zen_db_prepare_input($_POST['source_other']);
//rmh referral end
Line 239:
//rmh referral start
if ((REFERRAL_REQUIRED == 'true') && (is_numeric($source) == false)) {
$error = true;
$messageStack->add('create_account', ENTRY_SOURCE_ERROR);
}
if ((REFERRAL_REQUIRED == 'true') && (DISPLAY_REFERRAL_OTHER == 'true') &&($source == '9999') && (!zen_not_null($source_other)) ) {
$error = true;
$messageStack->add('create_account', ENTRY_SOURCE_OTHER_ERROR);
}
//rmh referral end
Line 320:
//rmh referral start
$query_insert= "insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_source_id) values ('" . (int)$_SESSION['customer_id'] . "', '0', now(), '". (int)$source . "')";
$db->Execute($query_insert);
$db->Execute($sql);
if ($source == '9999') {
zen_db_perform(TABLE_SOURCES_OTHER, array('customers_id' => $_SESSION['customer_id'], 'sources_other_name' => $source_other));
}
// $sql = "insert into " . TABLE_CUSTOMERS_INFO . "
// (customers_info_id, customers_info_number_of_logons,
// customers_info_date_account_created)
// values ('" . (int)$_SESSION['customer_id'] . "', '0', now())";
//
// $db->Execute($sql);
//rmh referral end
For line 320, take note not to have duplicate instruction, otherwise, when you try to create a dummy account, and hit submit, you will get an error message of duplicate.
Now, I created 2 dummy account, one to select a preset 'saplanet blog' selection; one to select 'other' and specified in the text box, I am now able to see the records in the admin>customers>customers>; and also in the admin>extras>referrals source.
Hope this helps.