bold-s of Recurring Orders
11/1/2017 - 7:01 PM

Prepaid Multiply Price Tag

This customization is an easy prepaid solution for collection or product pages. It goes on the assumption there there is NOT a prepaid discount on the product.

Merchant Usage: Give a product a tag price-multiply-4 to multiply the display price by 4 Implementation:

Add the code to at the top of product.liquid or wherever liquid product is defined. Then find where the price is displayed and add this filter. For example:

{{ product.price | money }}

becomes

{{ product.price | times: multiplier | money }}

{% for tag in product.tags %}
{% if tag contains 'price-multiply-' %}
{% assign multiplier = tag | replace: 'price-multiply-', '' | minus: 0.0 %}
{% break %}
{% endif %}
{% endfor %}
{% unless multiplier %}
{% assign multiplier = 1 %}
{% endunless %}