OFFLINE-GmbH / oc-snipcartshop-plugin

Ecommerce solution for October CMS using snipcart.com as a backend
MIT License
11 stars 4 forks source link

When customfields are on product page and you add item to the cart, textfield and textarea are emptied #19

Open ghost opened 7 years ago

ghost commented 7 years ago

Hello,

On the product page, with custom field option checked, if you fill a textfield and/or a textarea and then, add product to the cart, the fields are emptied.

The problem appears only for textfield and textarea, checkboxes and dropdown are preserved.

Regards,

Alex

ghost commented 7 years ago

Update : The strange thing is that data-item-customX-value (where X is the ID of the attribute) are correctly updated on snipcart add to cart button.

tobias-kuendig commented 7 years ago

Can you reproduce the issue here? https://snipcart.offline.swiss/en/product/intellij

What fields are emptied? The ones in the cart?

I feel like the Snipcart API for these custom values is very unstable. If you add a product with custom value "A" and then add the same product with custom value "B" both products in the cart will have value "A". You cannot add the same product with different options twice without reloading the page first...

ghost commented 7 years ago

I found, the problem came from myself. I use selectize to improve the render of select element and I had to change some things in the script that update shopping cart and price to make it works with selectize. Can be closed.

ghost commented 7 years ago

I reopen cause finally, I found a real issue that can be reproduced on your shop, here is the step to reproduce.

Regards,

Alex