3

I'm trying to get my head round how Craft Commerce manages product options. My Product has the following (multiple) options.

  1. Material Type
  2. Distance between design
  3. No. of designs per metre
  4. No. of meters (selecting this changes the price, so 1 metre is £100 and 2 metres is 200 etc)

    • The options can be set independent of each other.
    • Distance and No. of Designs will have set ranges the customer can choose from.
    • As this is just one product that effectively gets customised by the options there is no stock level.

Question One: Is multiple options on one product possible?

Question Two: Do I need to create variants for each option - how if so?

Question Three: Do I need multiple products based on the number of Metres (which changes the price)? Ideally I'd like one product that gets adjusted on the options selected. Is that possible?

2
  • Are these options completely bespoke? As in, can you set options independently from each other or will material X only be available in length Y? Do your distances and no. of designs have set ranges customers can choose from? Will these options have levels of stock associated with them or are you creating this product to order? Commented Jun 9, 2016 at 17:23
  • Hi Luke, 1. The options can be set independent of each other. 2. Distance and No. of Designs will have set ranges the customer can choose from. 3. As this is just one product that effectively gets customised by the options there is no stock level.
    – Dan Lee
    Commented Jun 10, 2016 at 7:40

1 Answer 1

4

Normally you would create variations of a product that would then be purchased by a customer. An example could be a plain t-shirt (the product), which is available in small, medium & large (each of these would be a variant of the product). This way you can easily keep track of stock, set different prices (like your No. of meters) and add different field values, if needed.

I would create a variant for each "No. of meters" as this will require a different price to be charged. However, creating a variant for each and every configuration would be overkill.

As you don't need to track stock and each product will be made to order I would instead look at adding the options to the line item using name="options[optionName]".

The following is taken from the default templates that come with Craft Commerce.

<select name="options[giftWrapped]">
  <option value="no">No gift wrap.</option>
  <option value="yes">Gift wrapped.</option>
</select>

These options are then set on the line item for that order. These would be viewable on the order summary page in the control panel.

5
  • Thanks Luke, So in summary: Variant for Metres with set (hard coded) options.
    – Dan Lee
    Commented Jun 10, 2016 at 9:31
  • Yeah, although I am now wondering how you'd control setting these options. Will these options be across every product you sell? Commented Jun 10, 2016 at 9:44
  • We are only having one product - so this should work right?
    – Dan Lee
    Commented Jun 10, 2016 at 10:47
  • How did you get on with this solution Dan? If there's anything we can add to get it marked as "accepted" let me know. Commented Jun 13, 2016 at 15:54
  • This is great - marked as answered.
    – Dan Lee
    Commented Jun 14, 2016 at 7:18

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.