category_options Function

Provides the item options associated with a given category. The resulting options can be used in tandem with the option_choices filter on the ItemList resource.

See CategoryOptions resource for output.

The function takes two parameters:

  1. category_id
  2. square_online_id toggle (optional)
{% for option in category_options('10', true) %}
	{{ option.name }}
	{% for choice in option.choices %}
		{{ choice.name }}, {{ choice.id }}
	{% endfor %}
{% endfor %}