Jump to content

Product Price INC and EXCL + Combination + Group Discount Problems


Recommended Posts

I will try and explain the best I can!!!

 

Using PS 1.5.4.0

 

I need to show on the product page the price including and excluding VAT. The code I have put in (product.tpl) is as follows:

{if !$priceDisplay || $priceDisplay == 2}
     {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
     {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
{elseif $priceDisplay == 1}
     {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
      {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
{/if}

<p class="our_price_display">
     {if $priceDisplay >= 0 && $priceDisplay <= 2}
          {if $productPrice == 0}
              <span class="pretaxe_price">£ POA</span>
          {else}
              <span id="pretaxe_price">
                  <span id="pretaxe_price_display">{convertPrice price=$productPriceWithoutReduction}</span> {l s='tax excl.'}
              </span><br />
              <span id="our_price_display">{convertPrice price=$productPrice}</span> {l s='tax inc.'}
          {/if}
       {/if}
</p>

The $productPrice == 0 part is just to put POA in.

 

I have added a load on combinations to the products and when changing the drop down in the front end all works OK. It displays the price including and excluding VAT.

 

I have then added a group with a 60% discount. Now when viewing the prices it shows the including VAT price as PRICE - VAT and the excluding VAT price as PRICE - VAT - VAT

 

Example (normal price):

£130.50 (excl VAT)

£156.60 (incl VAT)

 

Example (60% discount price):

£43.50 (excl VAT) > this should be £52.50

£52.20 (incl VAT) > this should be £63.00

 

As the prices are changed outside of the product.tpl because of the options drop down I am lost!!!!

Link to comment
Share on other sites

×
×
  • Create New...