Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How Did You Hear About Us add-on - missing line


moshpa

Recommended Posts

Just came across an error in the instructions of the "How Did You Hear About Us" add-on contribution (which by the way is exactly what I was looking for :thumbsup: , thank you!) -

The instructions say this:

In catalog\create_account.php

Look for: (around line 54)
   $password = tep_db_prepare_input($HTTP_POST_VARS['password']);
   $confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);
   
Add below:
//rmh referral start
   $source = tep_db_prepare_input($HTTP_POST_VARS['source']);
   if (isset($HTTP_POST_VARS['source_other'])) $source_other = tep_db_prepare_input($HTTP_POST_VARS['source_other']);
//rmh referral end

 

And neglect to add that you need to comment out:

  tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

which follows, or else you get a 'duplicate key' error when you try to create a new account.

 

Or else I read the instructions wrong and somehow missed that... but maybe this can help other people who might get stuck on it.

 

Thanks for a very useful contrib! B)

Link to comment
Share on other sites

Yes you read the directions wrong. The directions are based on a clean version of osC.

 

There is no need to 'comment out' the line. Something else you have installed has modified your create_account page.....

 

If you look at a clean version of catalog/create_account you will only find ONE occurance of " TABLE_CUSTOMERS_INFO " .... so there is absolutely no need to comment it out....

 

..But I do agree this is a great contribution..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...