When I try to display the same product (with add to cart form) twice on the same page, the form breaks when using attributes.
I have two views printed after each other where the same product is listed in both views.
When i change an attribute on one of the products, the first form disappears and the second one is updated.
I assumed this had to with some ajax identifier being overwritten by the second form, so I tried altering the different form id's and tokens without success.
Has anyone run into this problem and knows how to fix it?
Comments
Comment #1
erichoglander commentedI seem to have solved it.
The issue was both duplicate form_id's and a bad jquery selector in commerce_cart.
I altered commerce_cart_add_to_cart_form_id to add an increment to the end of the form_id.
I also added :eq() to the jquery selector in commerce_cart_add_to_cart_form_attributes_refresh to update the proper node.
Comment #2
rszrama commentedComment #3
Quantamon commentedHi erichoglander, I've same problem, please could you show an example of the code used?