Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error adding duplicate product with options to cart #493

Closed
davist11 opened this issue Sep 18, 2018 · 2 comments
Closed

Error adding duplicate product with options to cart #493

davist11 opened this issue Sep 18, 2018 · 2 comments

Comments

@davist11
Copy link
Contributor

Description

We are having issues adding duplicate products with options to the cart. This does not happen with all products with options, so possibly it could have something to do with special characters (µm)? We have tested this with our templates and the templates provided by commerce.

Steps to reproduce

  1. Add the following custom options to the add to cart form
<select class="add-to-cart-list__item__dropdown" id="options[particle-size]" name="options[particle-size]" data-key="particle-size" required="required"><option selected="selected" value="">Select</option><option value="3 µm">3 µm</option><option value="5 µm">5 µm</option><option value="7 µm">7 µm</option><option value="9 µm">9 µm</option><option value="10 µm">10 µm</option><option value="12-20 µm">12-20 µm</option><option value="20-30 µm">20-30 µm</option><option value="30-50 µm">30-50 µm</option><option value="50-75 µm">50-75 µm</option></select>

<select class="add-to-cart-list__item__dropdown" id="options[stationary-phase]" name="options[stationary-phase]" data-key="stationary-phase" required="required"><option selected="selected" value="">Select</option><option value="HxSil C8">HxSil C8</option><option value="HxSil C18">HxSil C18</option></select>

<select class="add-to-cart-list__item__dropdown" id="options[hardware-inner-diameter]" name="options[hardware-inner-diameter]" data-key="hardware-inner-diameter" required="required"><option selected="selected" value="">Select</option><option value="1.0 mm">1.0 mm</option><option value="2.1 mm">2.1 mm</option><option value="4.1 mm">4.1 mm</option><option value="4.6 mm">4.6 mm</option></select>

<select class="add-to-cart-list__item__dropdown" id="options[hardware-length]" name="options[hardware-length]" data-key="hardware-length" required="required"><option selected="selected" value="">Select</option><option value="33 mm">33 mm</option><option value="50 mm">50 mm</option><option value="100 mm">100 mm</option><option value="150 mm">150 mm</option><option value="250 mm">250 mm</option></select>
  1. Select the first item in each dropdown and add the product to the cart (should work fine)
  2. Go back to the product page and try to add the same exact product with the same options to the cart
  3. You should see the following error:
Unable to update cart.
lineItems.1.optionsSignature: Not Unique

Additional info

  • Craft version: Craft Pro 3.0.24
  • PHP version: 7.0.30
  • Database driver & version: MySQL 5.7.23
  • Commerce version: dev-develop, commit 2cb5ee5
@lukeholder
Copy link
Member

Thanks for reporting, should be fixed on develop branch and will be in the next release.

@rjgux
Copy link

rjgux commented Sep 26, 2018

I'm still having this issue on dev-develop, cannot add duplicate products with options to cart without the error lineItems.1.optionsSignature: Not Unique

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants