Chrome sessions issue on cart

  • Posts: 38
  • Thank you received: 2
3 years 5 months ago #332991

-- HikaShop version -- : 4.4.2 [2105201232]
-- Joomla version -- : 3.9.26
-- PHP version -- : 7.4.16
-- Browser(s) name and version -- : Chrome 91.0.4472.77 (Official Build) (64-bit)

We are in the process of setting up Hika on a new site that we are building. We have experience with Hika and have been using it on various client's sites for about 10 years, so we are familiar with it. The new version is having difficulty on Chrome. The issues occur for all of my staff in several different countries. Here is the issue:
On Chrome browser:
Go to Products page
Make selections
Add to cart
Go to Cart via menu item (Cart Display menu item type - public acl)
Delete item from cart (using trash icon)
You can do this a few times with no issue.
Then
Go to admin
Log in to backend
Go to front of site
Go to products (we tested always using the same product and selections)
Make selections
Add to Cart
Cart module at top of site still shows that the cart is empty even though the popup message says that the item has been added.
Try to go to cart
Some attempts to go to the cart will bounce you back to the product page like a redirect, other attempts bounce to the login suggesting permissions issue .
This issue exists only within Chrome.
If we log out of admin and try to go through the original steps again the issue persists. Suggesting something is caching or carrying over from the session.
Please advise.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 months ago #332993

Hi,

First, there are several javascript errors on your pages:
i.imgur.com/l0rwqhB.png
This might lead to HikaShop's javascript not being initialized and then not working properly in some cases.
If I look at the lines pointed by these errors, they seem to come from the template/menu system you're using.

If the cart module is not being refreshed after an add to cart but that the notification popup works, this normally means that the add to cart worked, but either:
- the cart module's javascript didn't register to the add to cart system to refresh itself after the add to cart is done. This possibility could be checked by looking at the xhr requests in the network tab of the developer tools of the browser. if there is a request for the cart module to be refreshed, but that it returns an empty cart, then it means that it is not this possibility as the javascript is working fine. If you don't see the request for the cart module refresh, then that would indicate a problem on the server side, not the javascript.
- the user session was lost at the end of the add to cart AJAX request, so that when the AJAX request is done on the server side, the system doesn't see the cart anymore and thus it still displays an empty cart. That would also explain why the cart menu redirects you back to the products or the login form (based on the situation it will either think that the cart is not available because it is empty and thus will direct to the products listing, or it will think that the cart is not available because it is linked to a user account and the customer needs to login to access it).

I looked a bit at the situation with Chrome on my end, but I wasn't able to reproduce the issue. I suppose it's because I can't do the step "Go to admin > Log in to backend" since I don't have such an access on your website.
Did you check the issue on other browsers ?

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

  • Posts: 38
  • Thank you received: 2
3 years 5 months ago #333000

Yes, I checked on Firefox and it works fine. The issue persists for all my staff members on Chrome. Template is protostar, menu is Joomla basic core. I will check to make sure that there isn't a scripting issue with the template. The only third party piece used on the site besides Hika is SP PageBuilder, will check for a possible conflict there as well and will report back.

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

  • Posts: 38
  • Thank you received: 2
3 years 5 months ago #333002

We have cleared all errors reported in dev tools and within Joomla's error reporting but the issue persists. We ran an xhr test in both chrome dev and firefox and both results were the same (see attached). However, firefox showed the item in the cart and Chrome did not. FF allows us to go to the checkout, chrome redirects to the product page. I feel like the user session is being lost. Any ideas of why that would happen in chrome? Is there a way that I can send a super user login to you privately so that you could help us determine why this is happening.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 months ago #333024

Hi,

One thing I can think of would be a plugin which synchronizes the backend and frontend user session, or that you have activated the "Shared Sessions" setting of the joomla configuration.
In that case, when you login in the backend, it's normal that it wipes out the frontend user session with the cart. And maybe there is a bug between this mechanism and the cookies handling on Chrome (or a Chrome extension that you all have installed).
So I would recommend to check on that.
If that doesn't help, you can provide a backend access via our contact form along with a link to this thread so that we can try to reproduce the issue on your website and check your backend settings:
www.hikashop.com/support/contact-us.html
Maybe that would allow us to figure something out.

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

  • Posts: 38
  • Thank you received: 2
3 years 5 months ago #333077

We do use SP Pagebuilder and I think it does have some of that functionality. So, we uninstalled and re-installed SP Pagebuilder and the problem has disappeared. Thank you for your help solving this.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.062 seconds
Powered by Kunena Forum