Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- BEGIN: Divido-Widget -->
- {% assign dividoShop = shop.metafields.divido %}
- {% assign dividoProduct = product.metafields.divido %}
- {% assign dividoShowWidget = false %}
- {% assign dividoProductPrice = product.price | remove: "," | divided_by:100 %}
- {% assign threshold = dividoShop.priceThreshold | plus: 0 %}
- {% if dividoShop.active == '1' %}
- {% if dividoProduct.available == 'selected_finances' and dividoProduct.selected_finances != 'none' %}
- {% assign dividoPlans = dividoProduct.selected_finances %}
- {% elsif dividoShop.showDefaultPlan == 'all' %}
- {% assign dividoPlans = '' %}
- {% elsif dividoShop.showDefaultPlan == 'selected_finances' %}
- {% assign dividoPlans = dividoShop.selectedPlans %}
- {% endif %}
- {% if dividoProduct.available == 'selected_plans' %}
- {% if dividoProduct.selected_finances != 'none' %}
- {% assign dividoShowWidget = true %}
- {% endif %}
- {% elsif dividoShop.productSelection == 'all' %}
- {% assign dividoShowWidget = true %}
- {% elsif dividoProductPrice >= threshold %}
- {% assign dividoShowWidget = true %}
- {% endif %}
- {% endif %}
- {% if dividoShowWidget %}
- <div class="divido-widget" style="margin-top:10px;" data-divido-widget data-divido-mode="popup" data-divido-plans="{{ dividoPlans }}" data-divido-amount="{{ product.price | money_without_currency }}"></div>
- {% endif %}
- <!-- BEGIN: Divido-End -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement