Created
December 16, 2021 12:16
-
-
Save liamgriffin/f1d32dafabb2320357f6016150c33454 to your computer and use it in GitHub Desktop.
How to Test your Theme Before Submitting to the Shopify Theme Store | Selling Plan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if product.selling_plan_groups.size > 0 %} | |
<div> | |
<label for="plans">Purchase options:</label> | |
<select name="selling_plan" id="plans"> | |
<option value="">One time purchase</option> | |
{% for variant in product.variants %} | |
<optgroup label="{{ variant.title }}"> | |
{% for allocation in variant.selling_plan_allocations %} | |
<option value="{{ allocation.selling_plan.id }}"> | |
{{ allocation.selling_plan.name }} | |
</option> | |
{% endfor %} | |
</optgroup> | |
{% endfor %} | |
</select> | |
</div> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment