Jump to content

Code to display a percentage of current product price in template?


Recommended Posts

I would like to display a custom dollar amount in my product list tpl that will multiply the current product price by a set percentage (decimal) like $2.25 x .20 = $0.45. So the $0.45 would display where I had put the code in the tpl file. Does anyone know the best way to make this work?

 

This is for 1.4.7.3

 

Thanks!

Edited by AFemaleProdigy (see edit history)
Link to comment
Share on other sites

Never mind. Figured it out...

 

{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price*.30}{else}{convertPrice price=$product.price_tax_exc*.30}{/if}</span><br />{/if}

 

Thanks, DH!

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...