Jump to content

SOLVED: attribute prices with and without tax


helldog2004

Recommended Posts

Hello everyone,

 

currently I am showing the lowest attribute price possible on the product list template.

But below the price I want to display the same lowest price without tax.

 

Currently I have the following code displayed for products with attributes:

 

<span class="price" style="font-weight: bold; color: #E74522; font: 600 21px/26px 'Open Sans', sans-serif;">
                                    {if isset($product.qt_disc)}
                                    Vanaf: {convertPrice price=$product.price - $product.attribute_price} <br />
                                    <span class="price product-price" style="color: #717171!important; font-size: 10px!important;">
                                    {if !$priceDisplay}({convertPrice price=$product.price - $product.attribute_price} excl.btw){/if}
                                    </span>
                                    {/if}
                                    </span><br />

 

As you can see only when products have attributes the lowest attribute prices will be displayed and below this lowest price I have the same code but with the text "excl. btw", which should display without tax but don't know how.

 

Please take a look at https://www.koppiesh...-kantoor-papier and see the product "Plano Superior 75 gram - A4 - 500 vel".

The (€3,13 excl.btw) should look like (€2,59 excl.btw)

 

Thanks for helping out.

Edited by helldog2004 (see edit history)
Link to comment
Share on other sites

Nevermind, solved the issue by adding the calculation right after $product.price

 

If you want to remove tax as in 21% then the code should be:

<span class="price" style="font-weight: bold; color: #E74522; font: 600 21px/26px 'Open Sans', sans-serif;">
                                    {if isset($product.qt_disc)}
                                    Vanaf: {convertPrice price=$product.price - $product.attribute_price} <br />
                                    <span class="price product-price" style="color: #717171!important; font-size: 10px!important;">
                                    {if !$priceDisplay}({convertPrice price=$product.price / 1.21 - $product.attribute_price} excl.btw){/if} 
							        </span>
                                    {/if}
                                    </span><br />
                            {if !isset($product.qt_disc)}      
                            <span class="price product-price">
                            {if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{/if}
							</span>
                            {/if}

New code for removing just 21% is:

<span class="price" style="font-weight: bold; color: #E74522; font: 600 21px/26px 'Open Sans', sans-serif;">
                                    {if isset($product.qt_disc)}
                                    Vanaf: {convertPrice price=$product.price - $product.attribute_price} <br />
                                    <span class="price product-price" style="color: #717171!important; font-size: 10px!important;">
                                    {if !$priceDisplay}({convertPrice price=$product.price * (1 - 0.21) - $product.attribute_price} excl.btw){/if} 
							        </span>
                                    {/if}
                                    </span><br />
                            {if !isset($product.qt_disc)}      
                            <span class="price product-price">
                            {if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{/if}
							</span>
                            {/if}
Edited by helldog2004 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...