mandreiana Posted May 23, 2003 Share Posted May 23, 2003 I'm using the Purchase without account contribution. Author said not to email him and post here instead. In checkout_success.php, I don't display notifications if the user doesn't have an account and I also remove the account. It needs to be removed as we stated we won't hold any customer information. In the future, if the same person wants to order again with the same e-mail, he will be able as the account won't exist ( now it complains the account is already there ). Of course, changing it not to create an account at all would be best. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 3, 2003 Share Posted July 3, 2003 Would you be so kind as to explain how you remove the account after checkout? Obviously this is a neccessary step when using Purchase without Account, yet I am not skilled enough in PHP to figure this out. Any help would be much appreciated. Thanks! Mike Quote Link to comment Share on other sites More sharing options...
phelan Posted July 4, 2003 Share Posted July 4, 2003 I had the same problem, when I did some test purchases without creating an account. I was able to go back and click on 'Password Forgotten?' link and get a new password and of course get access to the account, which this is not the way it is supposed to work. Here is the way I fixed it: in /catalog/checkout_success.php insert the following code right before the HTML code but within the php tags. // Added a check for a Guest checkout and cleared the session - 030411 if (tep_session_is_registered('noaccount')) { tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . tep_db_input($customer_id) . "'"); tep_session_destroy(); } this will get rid of the customer account information, therefore the customer will not have access to the account nor the order history but you will keep the order information. :idea: If you have any problems just let me know. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 4, 2003 Share Posted July 4, 2003 Thanks so much phelan, I'll try this! One question though: by deleting the customers account info, do you also lose their phone number and email address? If so, how do you send any confirmation emails regarding their order, or ship via FedEx without a phone number (I know the phone number isn't absolutely required but it's highly recommended). Thanks, Mike Quote Link to comment Share on other sites More sharing options...
phelan Posted July 4, 2003 Share Posted July 4, 2003 One question though: by deleting the customers account info, do you also lose their phone number and email address? No. The code above only deletes the customer profile but you still keep the order information which contains customer's name, address, phone number and email, you will see this information when you list the orders thru the administration, so it is very important that you either back up this information and don't delete the order, just in case you need this information again. Quote Link to comment Share on other sites More sharing options...
Irata0062 Posted July 5, 2003 Share Posted July 5, 2003 I tried that code hoping it would fix my problem. I get an error whenever someone would try and return and purchase a second time, it says there was an email/password issue. How do you fix this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.