I don't understand what 'options' are for

ko-lem-pc
Tourist
4 0 1

In selling plan groups and selling plans, there is an options attribute. I just put in a dummy value there though since I don't understand how I'm suppose to use them.

 

For selling plan groups, I just iterate through all its selling plans and display their name. What's options for here?

For selling plans, I don't get how there can be multiple options for a single selling plan.

0 Likes
Jason
Shopify Expert
10260 142 1940

Options are what would show to the customer front end. For example, letting them pick a frequency so you can in turn can set up the correct plan. Options are shown in the docs so maybe the example here may help you:

https://shopify.dev/tutorials/create-manage-selling-plans

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
ko-lem-pc
Tourist
4 0 1

In that link, it shows a selling plan group with 3 selling plans. And the selling plan group has an array of options with one option: `["Delivery every"]`. I don't understand why this is an array. 

The selling plan options then are just string that looks like it should be concatenated with the group option. Not sure I understand.

 

In this page https://shopify.dev/tutorials/customize-theme-showing-selling-plan-groups-and-selling-plans#show-ava... it shows 2 ways to display in the front end:

  1. The first one is just to iterate through the selling plans and display their name. Looks very straightforward and this is what I'm doing. There's no need for options here but options is a required attribute.
  2. Second one uses options but I don't understand why it's necessary. Why not just the first way.