How can I order each product variant in my templates? In Craft Commerce is it possible to order each product variant in the template, I would like to order by price ascending, I've tried the below but nothing is returned?

{% for purchasable in product.variants.order('price asc') %}


Below works but displays in order they were added:

{% for purchasable in product.variants %}
product.variants just returns an actual array of the variants, not an ElementCriteriaModel. So you can’t chain on additional params like order.

To get variants using custom parameters, you can do this:

{% set variants = craft.commerce.variants({
    product: product,
    order: 'price asc'
}) %}

{% for purchasable in variants %}
    // ...
{% endfor %}