Jump to content

Product price not shown in product page


Recommended Posts

The fragment of code in product.tpl that displays price looks like this:

 

  Quote

 

    <div class="price">
                {if !$priceDisplay || $priceDisplay == 2}
                    {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
                    {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
                {elseif $priceDisplay == 1}
                    {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}
                    {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
                {/if}
                <p class="our_price_display">
                {if $priceDisplay >= 0 && $priceDisplay <= 2}
                    <span id="our_price_display">{convertPrice price="$productPrice"}</span>

                    <!--{if $tax_enabled  && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))}  komentarz nie mój
                        {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}                                           komentarz nie mój
                    {/if}-->                                                                                                          

                <!-- {/if}
                </p>
                {if $product->on_sale}
                    <img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/>
                    <span class="on_sale">{l s='On sale!'}</span>
                {elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutRedution > $productPrice}
                    <span class="discount">{l s='Reduced price!'}</span>
                {/if}
                {if $priceDisplay == 2}
                    <br />
                    <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>
                {/if}
            </div>

 

I tried to change something but it usually breaks the page. When I delete this part of the code the price disappears. I don't know how to fix it to gather the price information and display it on the product page.

 

Edit: I tried to replace this part of the code with the one from default_bootstrap and it keeps giving me 0,00. It must be something wrong with the whole code i think. I don't know;/

Edited by mikeandrews (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...