Mauricio29 Posted July 8, 2020 Share Posted July 8, 2020 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/ Link to comment Share on other sites More sharing options...
Guest Posted July 8, 2020 Share Posted July 8, 2020 And what happens when you put the calculation in parentheses? {convertPrice price=($product.price/12)} Link to comment Share on other sites More sharing options...
Guest Posted July 8, 2020 Share Posted July 8, 2020 <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 More sharing options...
Guest Posted July 8, 2020 Share Posted July 8, 2020 Link to comment Share on other sites More sharing options...
Mauricio29 Posted July 8, 2020 Author Share Posted July 8, 2020 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. Link to comment Share on other sites More sharing options...
Mauricio29 Posted July 13, 2020 Author Share Posted July 13, 2020 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now