Jump to content
atillakilic

how i can i do count on tpl files?

Recommended Posts

hi everyone, i try to show diffrent price on product details. how can i do price*0,8

 

 <span itemprop="price" content="{$product.price_amount}">{$product.price}</span>

Share this post


Link to post
Share on other sites

Hi, it's possible to do calculation, something like this :

{$product.price_amount * 0.8}

 

Share this post


Link to post
Share on other sites
1 hour ago, GPW3P said:

Hi, it's possible to do calculation, something like this :


{$product.price_amount * 0.8}

 

yes i was try this  in product-prices tpl files, but not work.

maybe i m wrong fıle edıt?

Share this post


Link to post
Share on other sites
{$product.price_amount * 0.8}

It works fine for me.

Just edit correct files.

Share this post


Link to post
Share on other sites
12 hours ago, Nomouku said:

{$product.price_amount * 0.8}

It works fine for me.

Just edit correct files.

themes/laber_milano_homepage2/templates/catalog/_partials/product-prices.tpl

 

ı edıt thıs fıle.

am ı wrong?

Share this post


Link to post
Share on other sites
12 hours ago, atillakilic said:

themes/laber_milano_homepage2/templates/catalog/_partials/product-prices.tpl

 

ı edıt thıs fıle.

am ı wrong?

You are right, if you use theme 'laber_milano_homepage2'.

And if you make changes correctly.

For example, in such line

<span itemprop="price" content="{$product.price_amount}">{$product.price}</span>

You need to replace like this

<span itemprop="price" content="{$product.price_amount}">{$product.price_amount * 0.8}</span>

And don't forget to clear cache in back-end at the page 'Performance' after you change *.tpl

Share this post


Link to post
Share on other sites

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

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More