Nameez Posted June 21, 2017 Share Posted June 21, 2017 Hi, I'd like to show the cost price per product on the product details page on Prestashop 1.7 How can i achieve this? Thanks Link to comment Share on other sites More sharing options...
Nameez Posted June 21, 2017 Author Share Posted June 21, 2017 Hi, What do you mean by cost price? Witch cost price? The product price is already there. Thanks for the reply, I'm referring to the cost price you enter when adding a product on the back-end with the tooltip that says "The cost price is the price you paid for the product. Do not include the tax. It should be lower than the retail price: the difference between the two will be your margin." I'd like to show it on the product page. Link to comment Share on other sites More sharing options...
Nameez Posted June 21, 2017 Author Share Posted June 21, 2017 use this in product.tpl file you will see all the prices and other fields: <pre>{$product|print_r}</pre> Thanks You've just saved me a lot of time. For anyone whose looking the code is {$product.wholesale_price} 1 Link to comment Share on other sites More sharing options...
diyda Posted January 24, 2019 Share Posted January 24, 2019 On 6/22/2017 at 5:21 AM, Nameez said: Thanks You've just saved me a lot of time. For anyone whose looking the code is {$product.wholesale_price} Hi, Thanks for your useful sharing. I wanted to display the cost price at the backoffice product list so I wrote the following line (in the file:src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/list.html.twig):- <a href="{{ product.url|default('') }}#tab-step2">{{ product.wholesale_price|default('N/A'|trans({}, 'Admin.Global')) }}</a> But the wholesale price wont come out.. when i changed to "product.price_final" or "product.price" the correct prices are being displayed. Does anyone have any idea how to correctly call for wholesale price in this twig file? Appreciate your kind support, thank you! Link to comment Share on other sites More sharing options...
Yulia Vitun Posted November 22, 2020 Share Posted November 22, 2020 On 1/24/2019 at 3:38 AM, diyda said: Hi, Thanks for your useful sharing. I wanted to display the cost price at the backoffice product list so I wrote the following line (in the file:src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/list.html.twig):- <a href="{{ product.url|default('') }}#tab-step2">{{ product.wholesale_price|default('N/A'|trans({}, 'Admin.Global')) }}</a> But the wholesale price wont come out.. when i changed to "product.price_final" or "product.price" the correct prices are being displayed. Does anyone have any idea how to correctly call for wholesale price in this twig file? Appreciate your kind support, thank you! I need the same. anybody found an answer? Link to comment Share on other sites More sharing options...
Guest Posted November 22, 2020 Share Posted November 22, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
endriu_ Posted April 21, 2021 Share Posted April 21, 2021 On 11/22/2020 at 6:51 PM, Guest said: {Tools::displayPrice($product.wholesale_price)} Hello I was looking to put the cost price in the backoffice, could you tell me where to put the line? Thanks 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