Re: Can't get "referrals " mod working
What code was on your lines 540-559? I use Notepad++ and these lines are not the right place as I see it. I put your code inside the FEC supplied create_account.php replacing the following code:
PHP Code:
// FEC MODIFICATION
$_SESSION['sendto'] = $_SESSION['cart_address_id'] = (int)$address_id;
}
$_SESSION['shipping'] = '';
But I get the:
1062 Duplicate entry '1085' for key 'PRIMARY'
in:
[insert into zen_customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_source_id) values ('1085', '0', now(), '0')]
Where did I go wrong?
1 Attachment(s)
Re: Can't get "referrals " mod working
So after all I got it working. For others I have the merged file attached. This is FEC 1.9.5 and How Did You Hear About Us 139hl. The file should be put in your override in includes\modules\YOUR_TEMPLATE\
Re: Can't get "referrals " mod working
"How Did You Hear About Us" clears the whole form if no selection is made.
A customer brought this issue to my attention:
When all the new account info is filled out correctly BUT no selection was made in the "How Did You Hear About Us?" it just clears out the whole form and no error message is displayed. The customer has to start all over again not knowing what she/he did wrong. VERY BAD for business.. I bet a lot of frustrated potential customers just leave after entering stuff a few times and not seeing any indication what was wrong.
My temporary fix is to go to the Admin- Customer Details -Require Referral and set to false. This way a selection is not enforced and the account is created no matter what. Not perfect but I prefer not to get a referral instead of loosing customers.
Where could the clearing prevention of the form and proper error message display be set?
Re: Can't get "referrals " mod working
Ok, got the error message to display by changing the two:
add('xxxx'
to
add_session('xxxx'
in this section:
PHP Code:
//rmh referral start
if ((REFERRAL_REQUIRED == 'true') && (is_numeric($source) == false)) {
$error = true;
$messageStack->add_session('login', ENTRY_SOURCE_ERROR);
}
if ((REFERRAL_REQUIRED == 'true') && (DISPLAY_REFERRAL_OTHER == 'true') &&($source == '9999') && (!zen_not_null($source_other)) ) {
$error = true;
$messageStack->add_session('login', ENTRY_SOURCE_OTHER_ERROR);
}
//rmh referral end
Now the error message stack displays but the form still gets cleared/reset. How can I prevent this resetting? It does not happen with any other field empty....
Re: Can't get "referrals " mod working
Hi,
I saw the same issue with my site aswell. I posted a partial solution using java script error which does not clear the data once entered. However, it does not work if the customer selects the 'other' field. If anyone can help to complete the solution then I would be greatful as it is beyond my expertise.
See partial solution I posted before
I manage to do some of the work for the java script error as follows:
1. First install How did you hear about us add on
2. Then find
/includes/languages/YOURTEMPLATE/english.php
Search for:
define('ENTRY_REFERENCE_FROM', 'How did you hear about us?');
…right after that line enter the following…
define('ENTRY_REFERENCE_FROM_ERROR', 'You must select a choice from How did you hear about us? pull down menu.');
3. Then find
/includes/modules/pages/create_account/jscript_form_check.php
Search for:
check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");
…right after that line enter the following…
check_select("source", "", "<?php echo ENTRY_REFERENCE_FROM_ERROR; ?>");
That should give a java script error for the dropdown menu itself.
However, I need some help to do a javascript error if someone chooses the "other" option from the how did you hear about us drop down menu but leaves the "other" field underneath blank. Any help would be greatly appreciated.
Re: Can't get "referrals " mod working
I'm try to merge the file
costumers.php with costumers.php from the Mod - wholesale price
Without success. Please help .
Costumers.php - Mod - wholesale prices
costumers.php - Mod how_did_you_hear_about_us_v139h
Re: Can't get "referrals " mod working
Sorry but i have more q .
This can merge with Super order Mod ?
Need Merge orders.pho with super_orders.php
or just some lines ?
Thank a lot .
Re: Can't get "referrals " mod working
Ok I am completely stumped and hope someone can help?!?!
Mind you I develop zencart websites and can usually find anything....
I have uploaded this mod.....several times....but I CANNOT get any fields under the extra tools to define the sources for the how did you hear about us dropdown?
The 2 options that fall under configurations are fine....its the extras box that is not working for me......
What the heck am I missing here? THANK YOU!
Re: Can't get "referrals " mod working
I have installed this on to about 10 of our sites. Around 5 worked 100% first time others didnt and I could not find out why so eventualy re-installed everything and they are all working fine now.
Re: Can't get "referrals " mod working
OK I was just being dumb...forgot client has admin controls and I forgot --- the box was there just had to give myself access!!! UUGGHH