Hikashop cart module not working properly

  • Posts: 293
  • Thank you received: 3
  • Hikamarket Multivendor Hikashop Business
2 weeks 6 days ago #335393

-- url of the page with the problem -- : 06.bluepoint-concept.nl/resto-1
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4.x

hello,

We discovered a little issue regarding the hikashop cart module, on the mobile view see attachments, we have the cart module on the bottom, when we put on mobile 1 product without any options in the cart the counter will not add 1 product but when i go from mobile view to pc view the product is in the cart.
When we put a product after that in the cart with options, the counter is spinning and then will show 2 products in the cart and we can visit the cart.



Hope you can help solve this, because most of our visitors come on mobile..

Thanks

Attachments:

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

  • Posts: 73730
  • Thank you received: 11306
  • MODERATOR
2 weeks 6 days ago #335395

Hi,

The problem is that you have the cart module with the id 200 (the one displayed at the bottom) twice on the page:
i.imgur.com/FAUYkCa.png
So when the cart module is updated, it searches twice for the HTML with the id hikashop_cart_200 and the browser refturns each time the last one and refreshes twice the last one.
You can have several cart modules displayed on the same page, but they need to use different instances (different ids). You can't have a module instance displayed twice since both instances will share ids.

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

  • Posts: 293
  • Thank you received: 3
  • Hikamarket Multivendor Hikashop Business
2 weeks 2 days ago #335461

Hi,

Thanks, We have missed that in our investigation.
Now we know how to solve this..

Thanks.. :)

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

  • Posts: 293
  • Thank you received: 3
  • Hikamarket Multivendor Hikashop Business
2 weeks 2 days ago #335463

Hi,
Sorry but i am back again. The problem still exists.
We have 1 cart module in position "winkelwagen" and set only for the desktop, next to this we have another cart module for the position "winkelwagen mobiel" and set only for tablet and phone.

So when i turn off the cart module for desktop, is see in the source code (see attachment) two time the cart module for mobile ..

i also see in the product/cart.php the the module is called twice..

In all different ways i can not discover why it is loaded twice while we only have one module for the mobile view..

File Attachment:

File Name: view_produ..._php.txt
File Size:24 KB


hope you can help..

Attachments:

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

  • Posts: 73730
  • Thank you received: 11306
  • MODERATOR
2 weeks 2 days ago #335467

Hi,

You need to check with your template provider. It's the template which loads the modules in the different positions.
If modules in a position are rendered twice, then that's not normal.
You could probably edit product / cart.php to skip its rendering if the id of the module has already been processed, but then, you will miss the HTML of one of the two hikashop_cart_200 which might lead to the module not displaying in some cases where you expect. However, I don't know how the template's mobile position works so I can't say what should be done as I don't know.

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

  • Posts: 293
  • Thank you received: 3
  • Hikamarket Multivendor Hikashop Business
1 week 6 days ago #335532

I checked the template, we only have one position for mobile for the cart and one for the desktop.
We can not find a place where the template is rendering two times the cart module for mobile view.
Desktop view is allright and only loaded once.

So if you have more ideas please let me know..

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

  • Posts: 73730
  • Thank you received: 11306
  • MODERATOR
1 week 6 days ago #335536

Hi,

No, the problem is the same on desktop. The cart module is loaded three times there too. It's just that the cart modules HTML of the mobile position are hidden so you don't see the problem.
Did you contact your template support ? What did they tell you ? That's where I would personnally start.

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

  • Posts: 293
  • Thank you received: 3
  • Hikamarket Multivendor Hikashop Business
1 week 2 days ago #335621

Hi Nicolas,

We have found the position in the template. was really hidden so it took a while.
Thanks for helping and thinking along.

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

Time to create page: 0.082 seconds
Powered by Kunena Forum