Jump to content

[SOLVED] How I show unit/price for my product in a list category?


ecuc

Recommended Posts

  • 2 weeks later...

I want that for example, when you list all product, on each product, down to the price ...
igaz5f.jpg

 

... appear a price for unit ...

2mepjsm.jpg

 

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

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.

  • Like 1
Link to comment
Share on other sites

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

  • 4 months later...
  • 5 months later...
  • 3 weeks later...
  • 3 years 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...