Persistent Shopping Carts – Are You Frustrating Shoppers Because Your Website Is Timing Out?

Share On Facebook

Every year, my wife and I hire a professional photographer to take pictures of the kids and the family. While this is not cheap, it’s something we like to do because the kids are growing up so fast and we want to have photos for every stage of their development.

What’s funny is that hiring a photographer is only a small portion of the overall cost. Buying all new matching outfits for the kids and my wife is what tears a hole in my pocketbook and gives me heartburn.

For all of you who know me well, I’m pretty cheap and seeing the clothing costs for these photo shoots makes me want to faint. In fact, I don’t even bother checking the credit card bills during this time because I’m that terrified.

The other day, my wife was shopping online at a kids clothing “boutique” and probably spent a good hour or two researching and putting close to 20 items in her shopping cart.

(BTW, the word “boutique” sends shivers up my spine because more often that not it’s a synonym for “expensive”). But anyways, while she was shopping online I was giving my son a bath when I had a big emergency.

Help!! I need help!! Kyle pooped in the tub again!! Come quick!!!

Naturally, my wife stopped her shopping spree and helped me clean things up. Yuck!! By the time she got back to her computer a good 45 minutes had elapsed.

Much to her dismay, when she got back to the computer to resume shopping, her shopping cart was empty!!! All of that hard work and she had lost it all because the online store she was shopping at had timed out and emptied out her cart. I will now attempt to recreate our conversation afterwards.

Wife: S#$%! F#$&! What the hell! I lost everything ! I had so many cute outfits in my cart and it took me forever to find all that stuff.

Me: Yeah that sucks….How much was in your shopping cart?

Wife: I don’t know, 700 maybe?!? I hate this store. Never shopping here again

Me: WHAT!?!?!? 700 dollars?? My entire wardrobe doesn’t cost that much!!!! What the hell!!! Do you think we are made of money?!?!

Wife: Well don’t worry about it. I’m not buying anything from this store anymore. It’ll take forever to find the stuff again

Me: (Feeling a sigh of relief) Oh….darn…..I know how much you liked that stuff (feigning concern). I feel horrible…absolutely terrible…

Wife: Shut up. Just for that, I’m spending more at the next shop

Persistent Shopping Carts

The reality is that many shopping carts behave this way. If you close your browser session or if you wait too long, many online stores will empty the contents of the cart. As a result, if a customer returns after a long hiatus of shopping, they will lose what they’ve added.

In many cases, this can cost you a sale because not everyone shops and makes a purchase in a single sitting. Just as an experiment, I asked a bunch of my friends whether they shop this way.

And surprisingly, many of them use an online store like a wishlist. They put what they want in their cart, think about it and then return later. And more often than not, they shut down their browser and let things sit a bit before making a purchase.

In fact, looking at our online store statistics, a good 25 percent of customers visit our store more than once before making a purchase.

The best way to deal with these customers is to make sure that whatever they put in their shopping cart stays in their shopping cart until they return and are ready to make a purchase. This is what is called a persistent shopping cart.

Implementing A Persistent Shopping Cart

This feature has been on my list for a very long time but I’ve been dragging my feet because strangely enough, there’s no plugin that does this for my shopping cart.

Now this feature is very important for our online store for one main reason, personalization. When people shop at our store, then often put up to 8-10 items in their carts at a time and many of these products involve personalization with a special message.

What also ends up happening is that customers take a long time to shop because they want to think about what they want to write and sometimes they have to confer with their significant other before deciding on a message.

Can you imagine how frustrating it would be to lose everything you typed in just because you took an extended break?

So it was a no brainer, I had to spin my own solution. Here are 3 possible solutions that I came up with. I apologize in advance if this is next section is a bit more technical than usual.

Extend The Session Timeout Period

By default, the session length for my server is about 15 minutes long. What this means is that my server will hold the contents of a customer’s cart in system memory for 15 minutes of idle time before emptying everything out.

So, a logical solution to this problem would be to simply extend this timeout period.

The problem with this solution is that it greatly increases the memory requirements for your online store. By increasing the timeout period for your shop, you essentially have to hold a customer’s shopping cart information in main memory for much longer periods of time which effectively increases the amount of main memory you need to run your website.

This solution is clearly not scalable because main memory is a precious resource.

Not only that, but it also doesn’t solve the problem when a customer shuts down their browser or waits for 2 weeks before returning. Do you really want to keep their shopping cart lying around using up precious compute resources for 2 weeks? Probably not…

Store The Cart Contents In A Cookie

Another solution is to use cookies to store the contents of their cart on their computer. Cookies are little files that websites put on the client’s computer in order to store certain pieces of information so a website can recognize a customer when they return.

By placing a cookie with the shopping cart contents on the client computer, you can effectively store their shopping cart for as long as you like!

The problem with this solution is that the cookie size is limited to 4K on most browsers. Therefore, if a customer’s shopping cart is large and exceeds this value, certain products in their shopping cart will be lost.

The Best Solution

The best solution and the way I ultimately decided to solve this problem was to use a combination of cookies and my shopping cart database. Here’s what I came up with.

Whenever a customer enters my store, I place a cookie on their computer that is set to expire whenever I feel like it. This cookie contains a secret id which I use to tag certain products in my database.

Whenever a customer places an item in their shopping cart, I also store the product in my database and tag it with this secret id.

This way, I can keep track of everything that the customer is interested in based on this secret id which is stored on their computer in the form of a cookie.

If they choose to leave for a long time and come back, I look for the presence of this cookie and restore the contents of their shopping cart based on my database which is present for as long as I want it to be.

The downside to this solution is that if a customer abandons their shopping cart, I will accumulate a lot of junk in my database which needs to be periodically cleaned up.

So to solve that problem, I set up a CRON job or automated task to automatically clean up the database every single night and remove items that exceed a certain age threshold.

I’m still in the throes of testing my additions to my store and hope to be live with this new feature by the end of the week. The best part is that by storing your abandoned shopping carts, you can also better observe your customers shopping patterns as well.

Ready To Get Serious About Starting An Online Business?

If you are really considering starting your own online business, then you have to check out my free mini course on How To Create A Niche Online Store In 5 Easy Steps.

In this 6 day mini course, I reveal the steps that my wife and I took to earn 100 thousand dollars in the span of just a year. Best of all, it's absolutely free!

Share On Facebook
Note: This post above may contain affiliate links, which means that I may receive a commission if you make a purchase when clicking a link. Please consult our privacy policy for more information.

Similar Posts

Have you read these?

22 thoughts on “Persistent Shopping Carts – Are You Frustrating Shoppers Because Your Website Is Timing Out?”

  1. I’ve never had a problem with this but I think it happened to my wife once and she was pretty annoyed.

    Amazon is my favorite shopping site ever, one reason being that if you add something to your cart, it stays in your cart. Of course you have to have an Amazon ID and have logged in on that machine with that ID, but that’s never an issue.

  2. Merlin says:

    it happened to me just the other day.
    I went to a site after seeing a special offer, entered the code and started shopping and then got interrupted by a phone call.

    When I got back about 45 minutes later the site said the session had expired. When I tried to log back in, it said the code was not valid.

    At that stage I thought: “too hard, too bad”.

    A lost sale for that site.
    I wonder if they even know?

    1. Indeed, we must be careful when doing online shopping. We have to get a trustworthy site if you want to shop. let us not be fooled.

  3. Persistent carts are definitely an upsell and needed feature. If you leave something in your cart and come back 1 day later, 1 month later or even a year later, often the new shopping items will lead to also purchasing the old item in the cart. I do this often with an online sports equipment store and the cart always seems to have something ready to buy when I am urgent for some part and would otherwise only order that one item. It always upsells me, just because the feature is there. Definitely lost sales when not implemented. I’ve also not ordered several time from other sites because of being frusterated by a auto emptied cart…. ARGGHHH!!!

    1. @Mike
      Thanks for the reply. This further reinforces that I didn’t waste my time implementing this feature:!

  4. @Money Beagle
    This actually happens to me all the time which is why it’s been on my list of todos for a while now

  5. @Merlin
    90% of the time the shop owner isn’t going to realize that this is happening unless they happen to be recording the customers actions. Either that or they have some sort of cookie they can use to track people returning after a certain period of time. Either way, I’m pretty sure most small store owners don’t do this.

  6. I personally shop the way many of your friends do: I shop and place things in my shopping cart then wait several days while deciding to purchase. The clincher, for me, is always when the website sends me a reminder with a coupon. I will purposefully wait a week or two just to see if I receive a coupon. As a small business owner, that’s something to think about. Adding a coupon for items in your cart can make a big difference, especially when considering that people tend to spend more when cashing in on a coupon.

    1. @Small Business Dog
      That is very interesting. It’s true though. Many larger companies automatically send out coupons now whenever someone abandons their cart. For our store though, people make a purchase within 3 days or so. I just need to keep their cart intact during this period of time.

  7. Shopping is good but when you are confronted with a huge amount of credits OMG it’s a decision that gives so much stress.

  8. Pingback:

Leave a Reply

Your email address will not be published. Required fields are marked *