Problem with showing prices including taxes

Highlighted
New Member
2 0 0

Hello Shopify experts,

we have to show the price including VAT on the product page for our customer. This also works with a little trick that we have adapted directly in the corresponding liquid file.

We're using the Parallax theme. It seems that every price is confguredin the price-element.liquid file.

 

{% comment %}
Required values
price: <product price>
{% endcomment %}

{% if settings.currency_format == 'money_with_currency_format' %}
  {{ price | times:1.16 | money_with_currency }}
{% else %}
  {{ price | times:1.16 | money }}
{% endif %}

 

As you can see, we added a multiplicator with the current tax in Germany (16%). That works for us.

Now we're facing a problem with product variant prices. If a product has variants, the calculation of the gross price does not apply:

Patrick_nP_0-1605733945202.png

 

293,28 should be multiplied with the factor 1.16 - that works for all products without variants. We have also found the place where the calculation (not) takes place. Unfortunately, we are no programmers and do not know how to apply the multiplication to variant products.

Patrick_nP_1-1605734083755.png

 

 

 <p class="modal_price">{{ 'collections.general.coming_soon' | t }}</p>
        {% else %}
          <p class="modal_price {% if variant.available == false %}modal_price--sold-out{% endif %}">
            <span content="{{ variant.price | money_without_currency | remove: "," }}" class="{% if variant.compare_at_price > variant.price %}sale{% endif %}">
              <span class="current_price">
                {% if variant.price > 0 %}
                  <span class="money">
                    {% render 'price-element', price: variant.price %}
                  </span>
                {% else %}
                  {{ settings.free_price_text }}
                {% endif %}
              </span>
            </span>
            <span class="was_price">
              {% if variant.price < variant.compare_at_price and variant.available %}
                <span class="money">
                  {% render 'price-element', price: variant.compare_at_price %}
                </span>
              {% endif %}
            </span><small>inkl. MwSt. zzgl. Versand</small>

 

I hope you can help us with this one!

Kind regards,

Patrick

 

 

0 Likes