Help, mystery items appearing in my checkout/review cartgreenspun.com : LUSENET : S-Mart Shopping Cart : One Thread
I have 2 carts running on 1 page, http://www.jurassicsnacks.com/shop and http://www.jurassicsnacks.com/animals/ and i get phantom items in the cart at purchase or checkout time, i.e. i click to order crickets and a cage is in the review cart with the crickets....does anyone know how to fix this problem???????
-- CJ Kaplan (firstname.lastname@example.org), October 10, 1999
Two things to take note about:
1. The script will generate a temporally file to store the information of the product selected by the visitor in the cart. The file name is stored base on the combination of your "storename" and "URL" of where the visitor is coming from (usually ISP address).
2. All the items added in the cart will be stored in the TEMP directory. The cart will only be removed if the items in the cart is purchased or when the cart is deleted.
Therefore, when someone visited the site earlier without deleting the cart or confirm purchase, and the next visitor comes in using the same URL as the previous visitor, the program will use back the file, causing the new visitor to see the previous records plus what he has just added.
To overcome this problem, you can either consistantly go to the TEMP directory and delete all outdated records. Or you can create a CRON procedure to do it regularly.
-- Patrick Chan (email@example.com), January 18, 2000.