1

What are the options for creating advanced product options with pricing. I see there are way to create variants ok - but can this be linked to advanced pricing, e.g. for printing products. the abaility to select different sizes, material, finish etc all which affect the price and then the quantity which also affects the price.

Similar options which you can see here - https://www.gogetprint.com/business-cards.

1

I can't see this being a problem. All variants can have their own pricing. You can also use relations to mix and match different things if you'd like.

There is a fine art printing section on the Image Science web site that may be an example of what you are thinking. There is a full write up of what it took to create the web site here: The Epic Journey to the New Image Science Website.

1

As Wonko said above, our fine art printing section (actually all our service sections) - are examples of the sort of thing you can do. The article mentioned is more of a Monkey Magic like epic quest to peace and redemption that an How-To though ;) !

It seems quite complicated but usually if you break it down you will find a lot of the data in forms like that is endlessly repeated stuff - so storing that in channels and bringing it in through relations is Craft bread and butter stuff really. This makes building out your variants much quicker and less error prone as you're keeping the data DRY.

In short, this is how it is done:

  • We created a channel full of the various repeated options
  • We relate these to variants using entries fields
  • In some cases we use multiple entries fields, this will depend on how the services are structured of course
  • Combined, this ends up creating a unique variant that is one of the available chose options
  • Each variant also has it's own field for things like 'available for sale' 'visibility' 'note' 'show discount' 'standard price' 'rrp' etc.

Then, from those variants, we build the form. We do this by grabbing all the appropriate variant data into an array, then json encode that, and that is then grabbed by a React form builder we wrote, which unpacks that data and builds the actual form.

Each line on the form represents the adding of one lineItem, so each line is actually added to the cart using MultiAdd - all that stuff boils back down to a chosen particular variant id and qty in the end!

Of course each one of these is really a unique thing, so will need a unique approach, but that's one way of doing a more complex form like that. It's certainly possible, and easier than it looks once you get going.

(An alternate approach could be to use MultiAdd to just build a form where all the little addons are added as extra costs to the main product, but that probably has its limits for more complex scenarios like the example you link to).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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