Versions Compared

Key

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

Summary

l

Excerpt

Calculate the discounted product price based on a number field for product price and another number field for discount percentage.

Code Block
{% assign discount = data.corporateInformation.discountPercentage | divided_by: 100 %}
{% assign discountValue = data.corporateInformation.productPrice | times: discount %}
{% assign discountPrice = data.corporateInformation.productPrice | minus: discountValue %}

{% if data.data.corporateInformation.discountPercentage %}
Discount Price: {{ discountPrice }}
{% endif %} 

Setup in Picturepark

  • Layer: Corporate Information

  • Field: Product Price

  • Field: Discount Percentage

...