Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleAttribute Value Condition example
// if product price is lower than 20 then use product price as the final price increased by 25% , if product price is lower than 40 and higher than 20 then use product price as the final price increased by 15%, otherwise use product price as the final price

[[({{price_final_include_tax}} < 20) ? {{price_final_include_tax}}*1.25 : ({{price_final_include_tax}} < 40) ? {{price_final_include_tax}}*1.15 : {{price_final_include_tax}}]]

...


JavaScript functions and conditions

You can use various js functions. JavaScript functions 

Code Block
titleExample
//Export sku only if it is longer than 6 characters, otherwise export empty string
[['{{sku}}'.length > 6 ? '{{sku}}': '']]

...

 For more details, you can check the JavascriptJavaScript Math.round function