JanetsCloset Posted December 23, 2014 Share Posted December 23, 2014 How would I display the product cost and pre-tax retail price on the product page. For instance, on this page https://www.janetscloset.com/index.php?id_product=290&controller=product Right above you pay I would like to put the product cost. How do I accomplish this? Link to comment Share on other sites More sharing options...
JanetsCloset Posted December 24, 2014 Author Share Posted December 24, 2014 bump Link to comment Share on other sites More sharing options...
JanetsCloset Posted December 26, 2014 Author Share Posted December 26, 2014 i decided to use vekias module to show pre-tax price and price with tax at the same time because it refresh the pre-tax price with attribute change (if it affects the price) Link to comment Share on other sites More sharing options...
musicmaster Posted December 26, 2014 Share Posted December 26, 2014 Janet, It is not exactly clear what your intention is with the change. It would have helped it you had made a screendump from the page and adapted (photoshopped) it so that it looked how you want it. There are lots of ways to achieve two prices: - you can put the second price in the wholesale price field - you can assign the second price as a feature - you can make one price a discount of the other The next point is to get that second price on the screen. That will mean some editing of the template and maybe also some other code. Link to comment Share on other sites More sharing options...
JanetsCloset Posted December 29, 2014 Author Share Posted December 29, 2014 My intention is getting the wholesale price field to display on the product.tpl page. So I want to display the retail price and the wholesale price. I'm not sure how to code the template to display that wholesale price. That's where I need help. Link to comment Share on other sites More sharing options...
JanetsCloset Posted December 29, 2014 Author Share Posted December 29, 2014 I attached a screenshot of what I want to accomplish as you asked. Link to comment Share on other sites More sharing options...
musicmaster Posted December 29, 2014 Share Posted December 29, 2014 Try $product->wholesale_price in your template. 1 Link to comment Share on other sites More sharing options...
JanetsCloset Posted December 30, 2014 Author Share Posted December 30, 2014 Thank you, that worked! Now my issue is that it displays the number like 58.430000. which is the value but how do I convert that into a currency with only two decimal places? Link to comment Share on other sites More sharing options...
JanetsCloset Posted December 30, 2014 Author Share Posted December 30, 2014 I know I would have to use the convertPrice function but not sure how to exactly write it up. Link to comment Share on other sites More sharing options...
musicmaster Posted December 30, 2014 Share Posted December 30, 2014 Look here for documentation on the Smarty language - that is used in the Prestashop templates: http://www.smarty.net/ Link to comment Share on other sites More sharing options...
JanetsCloset Posted December 30, 2014 Author Share Posted December 30, 2014 I took a look at it, but not quite sure how to word it still. anybody else have any ideas? Link to comment Share on other sites More sharing options...
Alberto alvarez Posted December 31, 2014 Share Posted December 31, 2014 You can use the convertAndFormatPrice function so, you must edit your product.tpl and put this code where you wish {$product->wholesale_price|convertAndFormatPrice} 1 Link to comment Share on other sites More sharing options...
JanetsCloset Posted December 31, 2014 Author Share Posted December 31, 2014 Awesome it worked! thank yall so much for your help. Link to comment Share on other sites More sharing options...
Alberto alvarez Posted January 2, 2015 Share Posted January 2, 2015 You are welcome. Please, remenber to rename the topic`s tittle to SOLVED Link to comment Share on other sites More sharing options...
JanetsCloset Posted January 2, 2015 Author Share Posted January 2, 2015 How do I rename the topic? Link to comment Share on other sites More sharing options...
musicmaster Posted January 2, 2015 Share Posted January 2, 2015 How do I rename the topic? Edit your first post in this thread. There you can also edit the title of the thread. Link to comment Share on other sites More sharing options...
Recommended Posts