2

I have found this Commerce manual: Product Attributes & Variations, which explains the differences and connections between fields, attributes and variations, where in the end they assign a different product to each product display.

The situation I am in is as follows. Let's say I sell lunchboxes. The same model is available in 5 colors and the lid is always white. But now I want to add an option to the shop where people can order a lid in the same color as the lunchbox. My SKU's are as follows:

  • lunchbox_red
  • lunchbox_blue
  • lunchbox_...

I was hoping this could become a simple product attribute (a checkbox?), but it seems I will have to add a second version of my 5 products with the extra costs of the lid:

  • lunchbox_red
  • lunchbox_red_lid_red
  • lunchbox_blue
  • lunchbox_blue_lid_blue
  • lunchbox_...

I initially wanted to let people choose the color of the lid, but that would require me to maintain 25 different products for each box-lid combination!?

  • lunchbox_red
  • lunchbox_red_lid_red
  • lunchbox_red_lid_blue
  • lunchbox_red_lid_...
  • lunchbox_blue
  • lunchbox_blue_lid_red
  • lunchbox_blue_lid_blue
  • lunchbox_...

Since I don't really care about the photo (I would definitely need a product for each lid combination in that case), I was hoping for a smarter way to implement this.

Can I add a general attribute (with added costs) to all product variations without adding all the products? The price for the coloring of the lid will be a fixed price, not depending on the color used.

2 Answers 2

3

It appears I have been looking for Commerce Pricing Attributes. There is one SKU with a base price and I can manage the attributes and add a price modifier for each of them.

This screenshot from the module page explains it all:

Screenshot

0

You could bundle your products with commerce_product_bundle.

So you only have the lunchboxes and the lids in their variations. and combine them in bundles.

3
  • That would certainly make it easier to maintain, but I'm also interested if there is something like the checkbox method I described. So I can keep my 5 products as they are and add some attribute to them without creating a separate product. May 5, 2016 at 11:05
  • so you want a checkbox for each lid color ??
    – rémy
    May 5, 2016 at 11:31
  • Since I figured it would be very hard to maintain all box/lid combinations I was wondering if I could add a checkbox to make the lid the same color as the box. So I can stick to my 5 boxes as they are, I do not have to create separate lid products, and on the box I add this one checkbox that will make the box 1 euro more expensive for the color. I guess this will be the easiest way, but I don't know if it is possible. May 5, 2016 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.