0

I found how to display both price with and without tax on product list. But when there is a specific price, the old price is the same with and without tax. It displays the old price tax incl even for price with tax exc. For example : 549,0 € HT (733.20€) - 659.88 € TTC (733.20€)

    {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
                <div class="content_price">
                <p style="font-size: 20px;"> {l s='From'}</p>
                    {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
        {hook h="displayProductPriceBlock" product=$product type='before_price'}
                            <div id="prix_ht">
                            <span class="price product-price">
                            {if !$priceDisplay}{convertPrice price=$product.price_tax_exc}{/if} {l s='HT.'}
                        </span>

                        {if $product.price_without_reduction > 0 && isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
                            {hook h="displayProductPriceBlock" product=$product type="old_price"}
                            <span class="old-price product-price">

                                {displayWtPrice p= $product.price_without_reduction}
                            </span>
                            {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"}
                            {if $product.specific_prices.reduction_type == 'percentage'}
                                <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
                            {/if}
                        {/if} </div>
                        <div id="prix_ttc">
                        <span class="price product-price">
                            {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}{l s='TTC'}
                        </span>

                        {if $product.price_without_reduction > 0 && isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
                            {hook h="displayProductPriceBlock" product=$product type="old_price"}
                            <span class="old-price product-price">
                                {displayWtPrice p=$product.price_without_reduction}
                            </span>
                            {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"}
                            {if $product.specific_prices.reduction_type == 'percentage'}
                                <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
                            {/if}
                        {/if}
                        {hook h="displayProductPriceBlock" product=$product type="price"}
                        {hook h="displayProductPriceBlock" product=$product type="unit_price"}
          {hook h="displayProductPriceBlock" product=$product type='after_price'}
          </div>
                    {/if}
                </div>

I think that {displayWtPrice p=product.price_without_reduction} is not good for the old price without tax. But I don't find how to do. Could you help me please ? Tue PS version is 1.6.14.

iehrlich
  • 3,572
  • 4
  • 34
  • 43

1 Answers1

0

you have already two variable in smarty in product-list.tpl, and you can also use it in new variable and split the tax value

{assign var='totalTax' value=$total_products_wt - $total_products}

{displayWtPriceWithCurrency price=$totalTax currency=$currency}</span>
Fil0z0
  • 203
  • 1
  • 8