Cart Module completely crazy...

  • Posts: 151
  • Thank you received: 9
12 years 4 months ago #55623

Hi,

I have a very, very strange behaviour in the cart module that shows the content of the cart.

I have two PC's to test the site, each PC has a different Internet Provider and a different IP address. They are completely separated from each other.

When I open the shop on PC1 and put a product in the cart, after a while I open the shop on PC2 and I see that product appear in the cart there too! How is this possible? The PC's are 100% separated.

It gets worse, because when I try to empty the cart on PC2, it won't work. The cart remains filled. I close the site and webbrowser on PC2, reopen the site and the cart module shows emtpy.

Now, it gets even weirder.
When I add another product in the cart on PC2, not the selected product is added to the cart but the previous one that suddenly appeared at the first place. So the deleted product is there again and not the selected product.

Note that these two PC's are completely separated from each other, different IP's different provider, etc.

How is it possible that a product put in the cart appears on a completely other PC's cart???

I hope someone can help me here explaning how the cart 'memory' works. Obviously it is not just a cookie, it looks like it is stored in the database and (all?) other 'guests' have access to it.

Please help.

Maurice

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #55641

It's probably because you have caching activated on your website.
Three possibilities:
Disable the cache in Joomla configuration.
Site -> global configuration -> system -> "Cache settings".
Disable, if it's enabled, a joomla cache plugin.
Check your template' options for a potential cache option and deactivate it.

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 9
12 years 4 months ago #55643

Hi Nicolas,

Thank you for your very quick response!

Our site is a heavily visited news site ( >150K pagehits per day) with a shop. So caching is definitely needed and cannot be turned off for that part. If we turn it off our database gets overloaded with queries within seconds.

How can I turn off caching for the shop / cart only?
Normally a module has some global parameters where you can edit or disable caching for that module only.
The mod_hikashop_cart module does not have that feature.

Maurice

Last edit: 12 years 4 months ago by Maurice.

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 9
12 years 4 months ago #55657

Hi Nicolas,

After your suggestion about caching I did some testing and found out that it is indeed caching that causes the problem.

The cart module at the left still displays cart content when I empty the cart. When I refresh the page by hitting Ctrl+F5, the cart module still shows products in it, while in fact the cart IS empty.

When I manually clear the Joomla cache in the backend and refresh the frontend again by hitting Ctrl+F5, the module shows that the cart is empty.

So definitely a caching issue.

So how can I force the cart module to never cache the data it uses?

Maurice

Last edit: 12 years 4 months ago by Maurice.

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #55756

There is no caching option in the module because it's turned off for the module.
However, if you cache whole pages of your website, the modules settings won't be taken into account.
Also, for caching per module, it doesn't work well on some versions of Joomla and it caches all of them.

The solution is to not use the caching system of Joomla but to use a more fine grained one.
For example, that extension:
extensions.joomla.org/extensions/core-en...formance/cache/17783

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 9
12 years 4 months ago #55839

Hi,

Thansk for the excellent explanation. i installed the plugin you suggested, which is free, by the way, and I am currently testing.
Results are looking good so far!

Thank you.

Maurice

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum