- Posts: 15
- Thank you received: 1
The selected characteristic is not added to the cart
5 years 7 months ago #331633
by 48media
The selected characteristic is not added to the cart was created by 48media
-- 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.
-- 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.
5 years 7 months ago #331637
by nicolas
Replied by nicolas on topic The selected characteristic is not added to the cart
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.
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.
5 years 7 months ago #331694
by 48media
Replied by 48media on topic The selected characteristic is not added to the cart
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.042 seconds