Membership

{% assign selling_plan_selected = blank %} {% assign has_selling_plans = false %} {% for variant in product.variants %} {% if variant.id == product.selected_or_first_available_variant.id %} {% for allocation in variant.selling_plan_allocations %} {% assign selling_plan_selected = allocation.selling_plan.id %} {% break %} {% endfor %} {% endif %} {% if variant.selling_plan_allocations.size > 0 %}{% assign has_selling_plans = true %}{% endif %} {% if selling_plan_selected != blank %}{% break %}{% endif %} {% endfor %} {% if has_selling_plans %}
{{ block.settings.heading }} {% for variant in product.variants %}
{% for allocation in variant.selling_plan_allocations %} {% assign selling_plan_frequency = blank %} {% for option in allocation.selling_plan.options %} {% if option.name == 'Charged every' %} {% capture selling_plan_frequency %}every {{ option.value }}{% endcapture %} {% endif %} {% endfor %} {% endfor %}
{% endfor %}
{% endif %}