ecuc Posted October 25, 2016 Share Posted October 25, 2016 (edited) I want know if it had a way to put a unit / price that I can put in my product page in the product when this is listing in a search page or category page. I copied the same code and this it doesn't obey. Help, please :'( Edited November 10, 2016 by ecuc (see edit history) Link to comment Share on other sites More sharing options...
jetway Posted October 25, 2016 Share Posted October 25, 2016 I understand your question as followed: You want to display the product price when searched for. This is actually the default that Prestashop does, where is the problem? Or i might have understood your question wrong. 1 Link to comment Share on other sites More sharing options...
ecuc Posted November 9, 2016 Author Share Posted November 9, 2016 I want that for example, when you list all product, on each product, down to the price ... ... appear a price for unit ... I see the code and it has a part that I can put, but when I applicate this code, it doesn't appear in my site. I don't know that do. Link to comment Share on other sites More sharing options...
w3bsolutions Posted November 9, 2016 Share Posted November 9, 2016 In the product-list.tpl file in your theme, add this code where you want the the price/unit to show, as per you screenshot insert it after the price: {if $product.unit_price_ratio > 0} {math equation="pprice / punit_price" pprice=$product.price punit_price=$product.unit_price_ratio assign=unit_price} <span class="unit_price">{convertPrice price=$unit_price} / {$product.unity|escape:'html':'UTF-8'}</span> {/if} Any issues let us know. Kind regards. 1 Link to comment Share on other sites More sharing options...
ecuc Posted November 10, 2016 Author Share Posted November 10, 2016 In the product-list.tpl file in your theme, add this code where you want the the price/unit to show, as per you screenshot insert it after the price: {if $product.unit_price_ratio > 0} {math equation="pprice / punit_price" pprice=$product.price punit_price=$product.unit_price_ratio assign=unit_price} <span class="unit_price">{convertPrice price=$unit_price} / {$product.unity|escape:'html':'UTF-8'}</span> {/if} Any issues let us know. Kind regards. Thank you so much, you are repair my problem. The code that you send me is similar than the code that I had. I don't understand why it didn't worked. Thank you fire2 ToT Link to comment Share on other sites More sharing options...
w3bsolutions Posted November 10, 2016 Share Posted November 10, 2016 Nice to hear. Do you mind marking the topic as [sOLVED]? (edit first post and add it to the beginning of the title). Thanks! 1 Link to comment Share on other sites More sharing options...
folkifoon Posted March 14, 2017 Share Posted March 14, 2017 Hello, how can i create this in Prestashop 1.7? Thanks! Link to comment Share on other sites More sharing options...
ballashop Posted September 6, 2017 Share Posted September 6, 2017 (edited) @w3bsolutions Hi, it is possible into the product page too? Thanks a lot sorry found it, thanks a lot. Edited September 20, 2017 by ballashop (see edit history) Link to comment Share on other sites More sharing options...
ballashop Posted September 22, 2017 Share Posted September 22, 2017 Nice to hear. Do you mind marking the topic as [sOLVED]? (edit first post and add it to the beginning of the title). Thanks! Hi it's work for me, but the price has the taxes included , so how can we show the unit price without one? Thanks a lot. Link to comment Share on other sites More sharing options...
fcherrier Posted May 18, 2021 Share Posted May 18, 2021 here is the solution for prestashop 1.7 click Link to comment Share on other sites More sharing options...
ballashop Posted May 19, 2021 Share Posted May 19, 2021 19 hours ago, fcherrier said: here is the solution for prestashop 1.7 click it works, also with other theme, but the decimals after the comma are a little too many 😓 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