Jump to content

displayPrice with an reduction of 10%


rfourt

Recommended Posts

Hi guys.

im making a custom cart and would like to show the total price of the cart with an variable that below show the total price but with a reduction of 10%

I have tried many variables but havent found any that works.

This is the closest i have come.

 

{displayPrice price=$total_price.reduction*10}
Link to comment
Share on other sites

{assign var="displayPrice" value="$total_price.reduction * 10"}
....
<div class="someCustomCart">Price is: {$displayPrice}</div>

And, of course you need to check "var" before you show it in frontend

 

If you want to calculate -10% from price value...

priceWithDiscount = basePrice - (basePrice * 10% / 100%)

Edited by AlexNDR.mac (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...