Start a conversation

How to use formula in tpl template

You can see an example in customer/main/product.tpl:

{math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount}

{ $discount }%

to change size of downloadable file to show in Kb instead of bites you can use this:

{math equation="length/1000" length=$product.length format="%2.f" assign=file_size}

{ $file_size } Kb

You can read more about "math" function here:

Choose files or drag and drop files
Was this article helpful?
  1. Admin FinestShops

  2. Posted
  3. Updated