Refresh Cart

  • Posts: 34
  • Thank you received: 2
4 years 5 months ago #313088

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.19
-- Browser(s) name and version -- : Chrome.Version 78.0.3904.97

Hello,

When I try to change the number of items in the cart display, nothing change.
If I click on the refresh button or on the save button, the system say that he save the change but I dond't see the change.

I do something wrong but i don't see what.

Thanks in advance.

Best regards.

Delavie Frédéric

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

  • Posts: 81509
  • Thank you received: 13064
  • MODERATOR
4 years 5 months ago #313096

Hi,

The issue comes from your template.
It has some javascript code which automatically generate "responsive" display for tables:
monosnap.com/file/eopXz8tOKzjEYPd317FkQe4JI4YYxz
It does that by duplicating the content in the table into dl/dt/dd tags instead of table/tr/td tags.
Because of that, the quantity input fields are duplicated too.
Then, when you modify the quantity in the input field and save the cart, you only changed the first input, but both input are sent to the server:
monosnap.com/file/IKtfHPGveHfSqmfQ7H9ErntOHc2zMJ
And in such case, PHP overwrite the first input value with the second one and thus the information you entered in the input is lost.
This apparently comes from this code:
monosnap.com/file/tmleevRv6x0AE4OwTsfOwNWOXT8TAB
Note that HikaShop tables don't need such javascript to be responsive. We have our own system to have the tables responsive.

Looking at the javascript code from your template, you could try adding the class "kblocktable" to the "table" tag in the file "show" of the view "cart" via the menu Display>Views. That should prevent the template from doing this.
However, you'll have similar issue with tables on the checkout, and other places of the frontend where HikaShop use tables.
So it might be better to actually remove the javascript from the /templates/theme3449/js/scripts.js file.
The best I think would be to report the issue to your template provider and see what they propose as a solution knowing all that I've written above.

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

  • Posts: 34
  • Thank you received: 2
4 years 5 months ago #313122

YOU ARE THE BEST.

Thanks a lot.

Great Job, great team.

Best regards.

Delavie Frédéric

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

Time to create page: 0.065 seconds
Powered by Kunena Forum