get_variants
Gets all variant objects associated with the given product.
To be used in combination with the following object:
CAUTION
To ensure store performance and responsiveness, the maximum number of times this filter can be called during a single page rendering process is 50. When multiple calls include identical input parameters, these calls will be deduplicated and counted as one call. Once the call limit is reached, subsequent calls will return nil.
product | get_variants() returns an array of variant objects.
Required params
product product: The given product object.
Example
{{#var myVariants = product | get_variants() /}}
{{#for variant in myVariants}}
{{ variant.title }}
{{/for}}
Was this article helpful to you?