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
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.
- How To Handle Bulk Shipping – ShippingEasy vs Stamps.com vs Endicia
- How Adding A Simple Shopping Cart Out Of Stock Tracking Feature Saved A $2500 Order
- How To Get A Great Looking Ecommerce Website Without Hiring A Designer
- My Exact Abandoned Cart Email Sequence And How To Recover Lost Sales From Your Shop
- How To Run An Online Store From Home And Handle Inventory Out Of Your Garage
Have you read these?
- How To Automate Backups For Your Online Store And Why I’m An Idiot
- Dropshipping Vs Affiliate Marketing: Which Online Business Will Make You More Money?
- The Right Way To Decide What Products To Sell Online
- My Podcast Is Live And I’m Doing A Big Giveaway
- Corporate Structure : Is an S Corporation For Me?