Seems the script only uses 1 cart... please helpgreenspun.com : LUSENET : S-Mart Shopping Cart : One Thread
When people open the review cart option they always get some products allready in it... from a previous customer or from one that is shopping the same time he is...
When i open the /tmp directory it only contains a store1 file, and when i view this file it's empty ??
-- Gerry (firstname.lastname@example.org), December 11, 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.
Sorry for the mistake. It should be TMP instead of TEMP directory.
-- Patrick Chan (firstname.lastname@example.org), January 19, 2000.