Cart shows empty, on return to home page

  • Posts: 97
  • Thank you received: 1
  • Hikashop Essential
2 years 8 months ago #334827

-- url of the page with the problem -- : fireworksland.com/index.php
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.28
-- PHP version -- : 7.4.21
-- Browser(s) name and version -- : Safari 11.1.2, Firefox 78.12.0esr, Chrome 92.0.4515.115 (Android)

Home page is fireworksland.com/index.php and the cart module at the bottom of the page shows "The cart is empty."

Then, place any item in the cart, for example any shirt.
As an example the product page at www.fireworksland.com/stores/shirts/2013-05-09-03-23-30
Add 1 shirt to cart. The cart shows that shirt.

Then, return to home page, fireworksland.com/index.php
Now the cart shows empty.

Return to the product page, www.fireworksland.com/stores/shirts/2013-05-09-03-23-30
Now the shirt is showing in the cart.

Whenever the customer goes back to the home page, the module shows "The cart is empty."
I can't figure out why the cart shows as empty, on the main page of my site, even if there is an item in the cart.
Thank you for your help

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
2 years 8 months ago #334832

Hi,

You have a cache issue on your website.
Follow that procedure, and after you've confirmed that the cart is still empty on the homepage, just add a parameter like ?test=1 in the URL of the page in the address bar of your browser and validate and you'll see that the cart module now has the correct content.
And if you remove again the parameter and display the homepage again, you'll see again the cart module without the added product.
So what that means is that the cart in the database has the correct data, but that when you go to a page you already displayed, the website / server doesn't ask HikaShop to display the cart module because that URL was already generated previously and thus you don't see the new content of the cart.
So the question now becomes : what cache mechanism do you have in place on your website / hosting which could do that ?
You'll likely want to tune that cache mechanism to no cache the cart module or pages where the cart module is displayed if the cache system has such settings, or disable that cache mechanism altogether and replace it with one with more fine-grained control of what to cache.

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

  • Posts: 97
  • Thank you received: 1
  • Hikashop Essential
2 years 8 months ago #334860

Thank you for your reply Nicolas.
My Joomla system cache is off completely.
Does this mean I will have to go in and edit the .htaccess file?

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
2 years 8 months ago #334862

Hi,

Why would editing the .htaccess file help remove the cache mechanism you have on your pages ?
I don't think it will help. If you don't know what cache mechanism you have in place, it might be something at the server level. And thus, you might want to contact your hosting support to check with them what can be done.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum