The selected characteristic is not added to the cart

  • Posts: 15
  • Thank you received: 1
3 years 1 week ago #331633

-- url of the page with the problem -- : wanat.48media.waw.pl/kolekcje/art-vision...witryna-2s,-3sz.html
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.21
-- PHP version -- : 7,2
-- Browser(s) name and version -- : ff

The selected characteristic is not added to the cart. You can test it on the attached link. No matter what color we choose in the basket, there is a different version (you can see the product code).
Now I don't know how to solve it, views have been modified.

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

  • Posts: 81511
  • Thank you received: 13065
  • MODERATOR
3 years 1 week ago #331637

Hi,

This is a common issue when the product page views are modified incorrectly.
If you look at the HTML on that URL, you can see that the variant data DIVs that are hidden (display:none is applied on them) are inside the form of the product page:
i.imgur.com/C7Sr9aT.png
Normally, these are outside of the form.
The problem is that in these DIVs, you have the "quantity" ones which contains the add to cart button for each variant so that the system can swap the add to cart button when you select another variant. But since you have all of them inside the product page form, it's always the last one which is added to the cart as the server only sees the last one's information being sent when you click on the add to cart button.
Usually, the cause of this is that you are missing some </div> tags somewhere. So you can try adding one or two at the end of the show_default ( or show_tabular, or the view file you're using for the product page layout ) and it might be enough to fix the problem.
Otherwise, you can delete the override and reapply the modifications making sure you don't break the HTML structure of the elements but it's a lot more work.

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

  • Posts: 15
  • Thank you received: 1
3 years 1 week ago #331694

OKAY. This is my code syntax error. This thread can be deleted.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.060 seconds
Powered by Kunena Forum