Looking for assistance with fixing an issue with our Add to Cart.
We have multiple products, and some have multiple variants. When Product X is added to the cart in Variant 1, it adds no problem. If the customer wants to also add Product X to the cart in Variant 2, this over rides the first add and changes the cart contents to only Product X in Variant 2 and totals the two quantities.
Our customers need to be able to order the same product in all variants offered.
We have two sites, one retail and one wholesale. This is NOT an issue for our retails website, only our wholesale site. I appreciate any assistance anyone can offer!
are you using any app for wholesale website?
there might be issue due apps or code. need to check the code.
Hi @AshleighB, glad to help you with your question. I’m sure, my given answer will help to solve your problem as adding the given code below in the section
Product and variants have one to many relation and you need to modify your cart code you can treat variant as a separate product in cart template like this
{% unless item.product.has_only_default_variant %}
<span class="label variant">
{{ item.variant.title }}
</span>
{% endunless %}
Hopefully, that solves your problem. If not, please let me know if you're seeing any other issues.
User | Count |
---|---|
26 | |
25 | |
13 | |
11 | |
9 |