Jump to content

Show cost price on the product page


Nameez

Recommended Posts

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

 

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}
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
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

  • 1 year later...
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

  • 4 months later...

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