Author Topic: osC AddonsCart Cookie  (Read 613 times)

0 Members and 1 Guest are viewing this topic.

NewsBot

  • The osCommerce University News Bot
  • Administrator
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1024
  • Karma: 0
    • View Profile
osC AddonsCart Cookie
« Reply #1 on: January 11, 2008, 12:00:07 AM »
Cart Cookie
     


Thanks to tostrinj (Paul) and spectreman (Eric) for pointing out this bug.



After the order has been successfully placed, the cookie was not being deleted. Hence, even though the customer went through the checkout process, it still showed items in the customer's shopping cart.



Only file containing the installation instructions has changed.  





Make the following change in catalog/checkout_success.php



Immediately following the line (Line # 13):

 require('includes/application_top.php');



Place the following lines:



$cookie_path = HTTP_COOKIE_PATH;

$cookie_expiration_time = time() - (MAX_LIFE_OF_CART_COOKIE * 24 * 60 * 60);

setcookie("cart", false, $cookie_expiration_time, $cookie_path, $cookie_domain);
     

http://addons.oscommerce.com/info/5390
     
================================
This post was created by the osCommerce University News Bot.  Feel free to reply, attach polls, etc -- but do not hold the osCommerce University responsible for the content of the post itself.  PM the Administrator for SPAM, thanks!