Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

Saved Shopping Carts

The issue: "lost" shopping cart

ProductCart uses “sessions” to store information while a customer goes through the checkout process. A session is basically a small piece of the Web server's memory. Using sessions instead of saving information immediately to the store database ensures fast access to that information (to retrieve it and update it).

The issue with sessions is that they expire. They are designed that way so that the server memory is released after a session is idle for a certain period of time. By default, the time is 20 minutes (although it can be extended). When customers add products to the shopping cart, that information is saved to a session. If the customer remains idle for more than 20 minutes, or closes the browser, the session is lost.

This can create an issue as a customer might spend a good amount of time adding products to the shopping cart, become occupied with another task (e.g. received a phone call), and find an empty shopping cart upon returning to the online store. It's as if the shopping cart was “lost”.

To avoid this problem, ProductCart v4 saves the shopping cart content and offers customers to keep it (or discard it) if the shopping cart session has expired and the customer returns to the store. On the right you can see an example of how the message looks like.

Message shows to returning customer when shopping cart has been saved

The ability to Restore a saved shopping cart on the next visit is a feature that can be turned on and off through the Control Panel in ProductCart v4.1 and above.

How it works

When customers add products to the shopping cart and visit the shopping cart page (pc/viewCart.asp), the following occurs:

  • A harmless cookie is saved to their desktop with a unique ID.
  • The shopping cart content is saved to the database and references that unique ID.
  • When customers are logged in, their customer ID is also stored in the database, so even if the customer logs in from another computer (where the cookie does not exist), they will be able to restore the shopping cart. Logged in customers can also review and manage their saved carts from the Customer Account Area.

When the customer returns to the store the cookie is read and the database is checked. If a match is found then ProductCart offers to restore their shopping cart as shown in the screen shot above (in ProductCart v4.1 you can turn this feature On/Off from the Store Settings > Miscellaneous page in the Control Panel). The language used in the message can be edited as always.


  • If the “Stay on Page” feature is enabled then the customer may not choose to view the cart, so the cart will not be saved as the cart is saved only when the shopping cart page is viewed (pc/viewCart.asp).

Known Issues

  • 404 error when clicking on “View Cart” or “Clear Cart”
    If you have moved the home page to the root, when customers visit the home page they may receive the “Saved Shopping Cart” message. The links will not work because they point to a local file, and the files do not exist locally. The easiest way to resolve the issue is to edit the file inc_footer.asp (both in the “pc” folder and in the root folder, if you have copied it there):
    • Locate the code:

      and replace it with a full URL to that page. For example:


      … where is the URL to your Web site, and shop is the name of the productcart folder (this assumes that ProductCart has been installed in the root).

    • Do the same for the code


Enabling and disabling the pop-up window

ProductCart v4.1

Use the “Restore saved shopping cart on next visit” option under Store Settings > Miscellaneous

ProductCart v4.0

You will need to apply a simple code change to one of the storefront files. Follow these instructions:

  • Download the file “inc_RestoreShoppingCart.asp” from the “pc” folder
  • Make a back-up copy just in case you need to restore the original version
  • Open it in Notepad or your favorite HTML editor
  • Locate the line:
    IF tmpGUID<>"" THEN

  • Replace it with:

    IF tmpGUID<>"" THEN

  • Save the file and upload it back to the “pc” folder.

QR Code
QR Code Saved Shopping Carts (generated for current page)