Help with using choice component for options

Hi
I’m wondering if anyone has best practice advice to use a choice component for product options.
Eg Machine Base 26" & machine option 24,32,48,64. Want to show the base model with an option component to select the variation and then the specs including price is filtered and shown.

Just having a little brain fade to work it out. It would be similar to a t-shirt with sizing, colours etc. Thanks in advance.

cheers

Use Screen Values to apply filtering.

Does this happen inside a form or a details screen?

As Darren suggested, you can use screen values to filter here, but I’m not clear if you want to do anything after that with the price value shown on the screen.

Assuming it’s the details screen of "Machine Base 26’’ ", you then have two options:

  • Store the variations as a comma-delimited string: “24,32,48,64”, then apply the miracle method to show them as separate choices.
  • Store the variations in their own table. If you have 4 variations for Machine Base 26’', then it means 4 rows in the variations table. You can then have a relation from the items table to the variations table to then use it for the choice component.

The second option makes it easier for you to retrieve the price once a variation is selected. With the 1st option, it’s likely you would either have to use a JSON structure, or have another comma-delimited list of prices.

1 Like