Stop implementing shopping carts like this

There’re many good online stores with great usability, prices and good selection of products.

Owners of these stores spend money on ads, promote their stores here and there, invent creative campaigns and promos and do all other important stuff to make their stores successful. But there’s an obvious problem that some of them actually don’t notice and this problem is related to a shopping cart.

The problem

Honestly, I don’t know what’s the reason behind this. I was trying to understand why it was historically accepted implementing shopping carts with sessions and / or cookies but there was nothing explaining this nonsense.

And the biggest problem is that even in 2016 people keep doing this, so I decided to write an article and explain why one should never use sessions to store shopping carts.

The reasons

1. Users lose their carts

The most obvious problem with this approach is that sessions and cookies are not persistent. Yes, cookies could be kind of persistent but even if we close our eyes to the fact that cookies expire, users tend to clear their browsing data for a variety of reasons an owner of an online store doesn’t control. Nobody deletes cookies one by one, so when a user visits a web-site that he doesn’t want to keep in his browsing history, the store’s cookie has a good chance to be also deleted when the user clears his browsing history.

2. Store owners lose valuable information

Isn’t it obvious that any serious store has to be able to analyze behavioural patterns of their users? Just imagine how valuable is information about the users’ shopping carts! One can use this infromation to offer them similar products, to understand their interests and offer special conditions. When a seller sees that a user adds lots of, say, bows to his cart, he can safely assume that the user is interested in archery, so he can start offering him personalized listings. All the above is impossible when information is stored in sessions.

3. And the most important one

But users losing their carts by clearing cookies and sellers losing valuable information because of not storing it isn’t the biggest motivation for not using sessions in such scenarios.

Today is February 8, 2016 and some people believe that we live in a world where mobile devices dominate the market. And they’re right because Google reports that mobile search requests exceeded those on desktops in 10 countries (including the US).

What does it mean? It means that people use many devices to shop and sometimes they can start the process of shopping on a mobile phone, continue it on a tablet and finish the process on a desktop device. Moreover, some people start filling their carts in the office but prefer to purchase the goods as soon as they arrive home.

If you use sessions or cookies, all the above extremely common scenarios can’t be fulfilled. It’s a huge and serious flaw in the shopping experience when a user has to find products he has already added to the cart over and over again. This problem demotivates buyers and they just don’t finish their purchase because of this inconvenience.

The obvious solution

Of course, the solution is to store the cart information in a persistent, analyzable stores such as databases. This solves all the problems stated above and, in my opinion, it’s even easier to implement this way!

If users’ carts are stored in a persistent storage, users will never lose their carts again.

If a database is being used instead of sessions and cookies, the seller has a powerful tool to analyze accumulated data to find out interests of his clients and personalize their experience.

Finally, if my cart is being stored in a database, I’ll be able to start the process of shopping on my PC and finish it in my bed with a smartphone.

Hopefully, 2016 will make at least two evils disappear: ISIS and shopping carts made with sessions :)

← Back