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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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