Jump to content

Price instalments


Recommended Posts

Hello Iam having trouble with the price on the product-list.tpl .

I am trying to add the installments on the price section of the tpl. And it worked great on the featured products and the promotion tab. But on the Best Sellers it is not working.

This is what I did on the tpl.

Quote

<span class="price product-price">
    {if !$priceDisplay}                                
        {convertPrice price=$product.price}
        <p style="font-size: 70%;">12X {convertPrice price=$product.price/12}</p><!-- inserção do parcelamento no corpo -->
    {else}
        {convertPrice price=$product.price_tax_exc}
        <p style="font-size: 70%;">12X {convertPrice price=$product.price_tax_exc/12}</p><!-- inserção do parcelamento no corpo -->
    {/if}
</span>

Prestashop: 1.6.1.13

Theme: default-bootstrap

This is being made in local host. The website is in this link:https://www.lonan.com.br/

bestseller.jpg

Link to comment
Share on other sites

<span itemprop="price" class="price product-price">
										{hook h="displayProductPriceBlock" product=$product type="before_price"}
										{if !$priceDisplay}                                
                                            {convertPrice price=$product.price}
                                        {else}
                                            {convertPrice price=$product.price_tax_exc}
                                        {/if}
									</span>
                                    <span itemprop="price" class="price product-price">
										{if !$priceDisplay}                                
                                                <p style="font-size: 70%;">12X {convertPrice price=($product.price/12)}</p><!-- inserçao do parcelamento no corpo -->
                                        {else}
                                                <p style="font-size: 70%;">12X {convertPrice price=($product.price_tax_exc/12)}</p><!-- inserçao do parcelamento no corpo -->
                                        {/if}
									</span>

 

Link to comment
Share on other sites

Thank you Guest.

But it did not work. It is working fine in the promotion and the homefeatured blocks.

But the bestseller block cant do the math.

If I select only the

Quote

{convertPrice price=$product.price}

It displays the price normaly, but if you add any math to the code it always returns 0,00.

For some reason the block Best Seller can't do math.

 

homefeatured.jpg

promo.jpg

bestseller_02.jpg

Link to comment
Share on other sites

Okay, if you guys are following up, new update. 
The code is working on the BEstSeller page normaly. Like the picture Bellow:

This give credence to believe it might have something related with the tabs module. The tab with the bestSeller for reason dont math the result of product.price/12(or any other equation).
Fun fact it will math anyother thing. If i write X+Y and associate then with values it will calculate and show the result. But it refuses to do math with product.price.

bestsellerPAge.jpg

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...