cancel
Showing results for
Did you mean:

## Price minus vat minus percentage

Solved
Excursionist
47 3 2

I'm building a order sheet for our wholesale customers. We have wholesale percentage discount tiers. I need to show product price excluding vat, minus discount %.

Example for wholesale-10 taged customer:

variant price × vat - 5%

```{% if customer.tags contains "wholesale-5" %}
{{ variant.price | times: 0.8 | minus: 5% | money }}
{% elsif customer.tags contains "wholesale-10" %}
{{ variant.price | times: 0.8 | minus: 10% | money }}
{% elsif customer.tags contains "wholesale-20" %}
{{ variant.price | times: 0.8 | minus: 20% | money }}
{% else %}
{{ variant.price | money }}
{% endif %}```

How do i use liquid to remove X% ?

Highlighted

Success.

Excursionist
47 3 2

Solved it

```{% assign percent = 5 %}
{% assign wholesale-5 = variant.price | divided_by: 100 | times: percent %}
{{ variant.price | minus: wholesale-5 | times: 0.8 | money }}```
Latest Topics
Latest Posts
Most Liked Authors