Terra Posted April 10, 2006 Share Posted April 10, 2006 On my shop I had the problem that when a customer clicked the "edit" button on checkout_confirmation.php, deleted the comment and then came back to checkout_confirmation then their comment was still there! It could be over-written but not deleted. To solve this problem I found two possible solutions: 1) back up checkout_confirmation.php 2) find this code (around line 40): if (!tep_session_is_registered('comments')) tep_session_register('comments'); if (tep_not_null($HTTP_POST_VARS['comments'])) { $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); } 3 - 1st Solution) replace with if (!tep_session_is_registered('comments')) tep_session_register('comments'); $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); 3- 2nd Solution) replace with if (!tep_session_is_registered('comments')) tep_session_register('comments'); if (tep_not_null($HTTP_POST_VARS['comments'])) { $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); } else { $comments = ''; } Both work on my shop and correctly remove the comment once deleted. Terra :thumbsup: My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad) and how to solve the invoice already paid error General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email ** Link to comment Share on other sites More sharing options...
insomniac2 Posted April 11, 2006 Share Posted April 11, 2006 Sweet !!! NICE FIND. I never would have even noticed that. Thanks for that great info. Link to comment Share on other sites More sharing options...
yanarasod Posted May 24, 2006 Share Posted May 24, 2006 hey but why only comment code change on checkout confirmation, if the seller directly clicks on checkout shipping, through the bar image, will be comment be deleted from that page again. Link to comment Share on other sites More sharing options...
insomniac2 Posted May 24, 2006 Share Posted May 24, 2006 It checks to see if there are comments first. If there are none ... when the page refreshes it resets the comments to none. If there are comments .. when the page refreshes it will repost the comments. It is a foolproof loop. Works perfect. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.