Hi,
I'm just starting with couch and can't seem to get a solution for a calculation.
The site has a product listing pages on the admin side the user has to fill the buying price of the product and the markup % the company want to add on the product on the front-end (product page) the result should be a visible price tag of the buying price plus the markup %.
I have a simple calculation for this on a Twig based site but I can't seem to get there with the variables in couch... the Twig solution is :
{% set percent = ( record.markup ) %}
{% set temppercent = ( 100 + percent ) %}
{% set total = ( record.buyprice ) %}
{% set final = ( total / 100 * temppercent ) %}
The final out-put = buying price + the markup percentage.
Can someone point me to a solution to get this done with couch?
Thanks
I'm just starting with couch and can't seem to get a solution for a calculation.
The site has a product listing pages on the admin side the user has to fill the buying price of the product and the markup % the company want to add on the product on the front-end (product page) the result should be a visible price tag of the buying price plus the markup %.
I have a simple calculation for this on a Twig based site but I can't seem to get there with the variables in couch... the Twig solution is :
{% set percent = ( record.markup ) %}
{% set temppercent = ( 100 + percent ) %}
{% set total = ( record.buyprice ) %}
{% set final = ( total / 100 * temppercent ) %}
The final out-put = buying price + the markup percentage.
Can someone point me to a solution to get this done with couch?
Thanks