2.x - Single Quantity/Add to Cart button on a page with multiple variants

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Can someone provide any insights/thoughts as to how I might best achieve a single Quantity/Add to Cart button on a page with multiple variants, and have picture change based on attribute selection -  similar to this amazon.com page

I have Size as variants of the product.  This is necessary, because size determines price (not flavor), and I also need to have Tier pricing on the Size variants.  I would still keep the standard "product variant lines", but just so I can support showing variant specific tier prices.


Now, to make this even harder...
Also, as per above example, I'd like the attribute dropdown (flavor) also in that single Add to Cart section, and the picture to change when customer selects a Flavor.  In my case, all my variants share the same set of attribute values, which may simplify this a bit.  (I know this will be hard to do since attributes don't have images.  It would also be nice if NopC had concept of variants using a "shared set of attribute values")

I don't need a picture specific to the attribute combination, but just specific to the Flavor attribute.
11 years ago
I haven't thought  much about it. Quite hard and confusing task. But maybe something like:
1. Store a product variant identifier in a hidden input when a customer changes "Size" (product variant). In this case you can post it to the server when "Add to cart" button is clicked (so you know what "Size"/variant was selected).
2. Add support for storing pictures per product attribute (BTW, the work item is already created. Please vote here). But it requires a lot of work. You write that all your variants share the same set of attribute values, so you can simply hard-code them (image mappings) in your new custom product template. It'll save you a lot of time.
3. But I don't understand to which product variant you will add this attribute so it can be properly processed during checkout. Maybe to all variants. For example, display several the same attribute dropdowns (flavor) for each  variant and just hide unnecessary based on selected variant (Size).

And of course you need to implement the new "Add to cart" action method specific to your template
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.