{# # Frontend Tier Pricing Table Template # # @package WC_Tier_Package_Prices # @var object product # @var array tiers #}

{{ 'Volume Discounts'|__('wc-tier-package-prices') }}

{% set regular_price = product.get_regular_price() %} {% for tier in tiers %} {% set savings = 0 %} {% set savings_percent = 0 %} {% if regular_price > 0 %} {% set savings = regular_price - tier.price %} {% set savings_percent = (savings / regular_price) * 100 %} {% endif %} {% endfor %}
{{ 'Quantity'|__('wc-tier-package-prices') }} {{ 'Price per Unit'|__('wc-tier-package-prices') }} {{ 'You Save'|__('wc-tier-package-prices') }}
{{ tier.min_qty|esc_html }}+ {{ wc_price(tier.price)|raw }} {% if savings > 0 %} {{ wc_price(savings)|raw }} ({{ savings_percent|round(2) }}%) {% else %} - {% endif %}