Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Summary
Goal
Setup in Picturepark
Field Value Access
Use Case

Number

data.corporateInformation.productPrice

  • You can use additional Liquid Filters to perform mathematical operations with number values. 

A valid use case could be to calculate the discount price, either working with a fixed discount or another number field carrying the discount (ID: discountPercentage), shown in this example:  

{% 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 %} 
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.