Hikashop Cart Module - dropdown cart doesn't work on mobile devices

  • Posts: 220
  • Thank you received: 12
4 years 3 months ago #326767

-- HikaShop version -- : 4.0.3
-- Joomla version -- : 3.9.22
-- PHP version -- : 5.6.40

Hi,

On my website I am using the Hikashop Cart Module with the dropdown cart - www.rebuilddrunkcheese.jroot.layer3.co.uk/ (Add to cart may not work on your end because of our current security settings)

The dropdown cart doesn't work on mobile devices. When clicking the cart button the dropdown does not appear. When inspecting this button I can see the mobile version of the module is missing the javascript that loads the dropdown - please see attached images. Is there a simple way of fixing this?

Thanks

Attachments:

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

  • Posts: 4816
  • Thank you received: 654
  • MODERATOR
4 years 3 months ago #326774

Hello,

So far, we can only guess but I see that you have 403 error, meaning that you can load page element, here maybe your module content ?
Maybe it's linked to your security settings ? Did you try without ? Other tests you can process is to try with a default template like ProtoStar.
Awaiting your returns to be able to better help you.

Regards

Last edit: 4 years 3 months ago by Philip.

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

  • Posts: 2143
  • Thank you received: 747
4 years 3 months ago #326808

Hi,

Actually, it appears that the (small) cart module is twice in the HTML: once placed in a section with ID "sp-myheader" (for large screens), and once again placed in a section with ID "sp-section-2" (for small screens).
Both cart modules have the same ID ("hikashop_cart_471"), which is not allowed in HTML, plus probably causes the Javascript to not work as expected.

You may want to consider removing the current cart module from one of the two sections, then duplicating the cart module (as the duplicate's ID will be different then), and finally place the duplicate into the respective location.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: nicolas

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

  • Posts: 220
  • Thank you received: 12
4 years 3 months ago #326835

Hi,

Very well spotted. I have duplicated this cart module and now I have 2:

hikashop_cart_471 - desktop
hikashop_cart_841 - tablet and mobile

I am still having the same issue here. hikashop_cart_841 does not have the JS.

Thanks

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

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 3 months ago #326841

Hi,

I'm not sure what's going on.
I do see the javascript code in the module to refresh itself after an add to cart:
monosnap.com/file/PrND6DnKeiNVlwzT77I8pJggfciIJQ
In fact, I do see the AJAX requests to refresh the cart module there:
monosnap.com/file/pOMHu1FuRSSrKVwJcm36gwsBbRAFWR
However, as you can see there, these AJAX requests return a "security error - forbidden" which is apparently generated by a security mechanism on your server.
Because of that the system can't refresh the cart module area.
I'm not sure why the error happens because if I open the URL myself it works just fine:
monosnap.com/file/10UismtPjG1SdkqhLPlWwSRoiCI14h
So I think that maybe because the AJAX requests are sent too close to each other, the security mechanism kill them to avoid potential DOS attacks.
I think the best think would be to follow the instructions of this error message and to first contact the support of your hosting along with the unique ID and server name of the error and also point them to this message so that they can better understand the context.

The following user(s) said Thank You: lousyfool, joshualdouglas

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

  • Posts: 2143
  • Thank you received: 747
4 years 3 months ago #326845

joshualdouglas wrote: I have duplicated this cart module and now I have 2


Nope, you now have no less than 4 cart modules. Both 471 and 841 in each of the two positions. :silly:

Looks like either a module positioning issue in the Joomla Module Manager (unlikely)... or (rather likely) caused by the Joomla template and its module position structure or page builder or something. If you can't get it fixed yourself, it may be worth to check with the template/framework makers (Joomshaper) on how you're supposed to have such two modules placed in the menu header so that they both are in the HTML only once each, with one showing only on smaller screens and the other only on larger ones.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: joshualdouglas

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

  • Posts: 2143
  • Thank you received: 747
4 years 3 months ago #326847

Hi Nicolas,

Also well spotted, hehe! This security mechanism seems to be adding its own sort of fun.

And adds to the fact -- as mentioned -- that there are now two pairs of modules with identical IDs in the HTML:


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Attachments:
The following user(s) said Thank You: nicolas, joshualdouglas

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

  • Posts: 220
  • Thank you received: 12
4 years 3 months ago #326864

Hello,

Thank you so much for your help guys. Your support is always very helpful.

The reason there was an extra 2 cart modules was because the same module position was used in both the desktop and mobile header (a colleague of mine set this up so I wasn't sure of the structure). I changed the module positions in the template settings and everything works perfectly :) Thanks

The following user(s) said Thank You: Philip

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

Time to create page: 0.087 seconds
Powered by Kunena Forum