Shopping Cart time expiration

The contents of a users shopping cart should emptied on expiration of a time limit.

[quote name=‘Earl’]The contents of a users shopping cart should emptied on expiration of a time limit.[/QUOTE]

Agreed :slight_smile: or a delete feature :slight_smile:

I made a big huff concerning immediate clearing of cart contents to CS a month or so before SP2 came out. I explained why retaining cart contents for unregistered users is critical to online success, and not doing so is simply sabotaging your potential sales. Happy to report the CS-team acknowledged my concerns and agreed to change that behavior, and SP2 now uses a cookie to retain unregistered customer cart contents. (They really did listen though I did have and active support contract at the time).

You can adjust the time frame by editing “the user.php” file located in the “core” directory

```php fn_define(‘CART_PRODUCTS_DELETE_TIME’ , TIME - 60 * 60 * 24 * 30); ```

The time variables in the code above are “60 * 60 * 24 * 30” … i.e. seconds * minutes * hours * days. If you want a longer cookie expiration (I would highly recommend) then change 30 to 60 or 90.

[QUOTE]Agreed  or a delete feature [/QUOTE]I don't understand this comment. Customers should be able to delete from their cart now, and you should be able to edit their order. Retaining their cart contents is really important because most customers don't buy first visit. Marketing studies show that the longer the cookie expiration is, the more sales you convert in the long run (see


Thanks for the response. unfortunately the inventory I am selling consist of event tickets, which have a shelf life. The cart clearing will help eliminate the issue of expired items still in shopping carts after the event, and in turn helps prevent fraud.

Oh, I see. I wouldn’t have imagined that need in all honesty. Guess I misunderstood your initial post.

You are actually looking to place an expiry on each item then, not on full cart contents? Don’t know how you’d go about doing that. I expect CS will need to see a real demand (or a very strong argument) to make this available … I’d contact them directly.

I know this is a wishlist item and this doesn’t address your needs exactly, but …

It “might” be possible to set things up so that the display of the product name field in the cart changes or is appended with “No Longer Available”. You’d have to create an expiry date variable in your db and product update admin screen to be applied to each item, and set up an “if” statement in the cart template to say “if after this date append this to the name”.

Probably not what you’re looking for but maybe in combination with a very short cookie duration (change 30 days to whatever your typical or longest availability period is) might get you part way there. Or … maybe it wouldn’t.

I don’t know how you’d tell it to remove the product, but it could also be possible to tell the cart to only display the item if it meets certain conditions in a similar manner to above. It’d take some experimentation to see what’s possible.