calculations?

General ShopSite user discussion

calculations?

Postby royswan » Wed Jul 08, 2009 5:33 pm

Is there a way to create simple math operators within templates?
For example, I would like to create a "member price" that is 80% of the "regular price" and just print that under the regular price...

So, I'm looking for a way to multiply [-- PRODUCT.Price --] by .8 , and have that new number render on screen. No luck so far..
royswan
 
Posts: 1
Joined: Wed Jul 08, 2009 5:27 pm

Postby Jim » Wed Jul 08, 2009 7:17 pm

There is no math in the custom templates. (you can increment and decrement but that wouldn't really help in this situation.

You could however use a CALL to a routine outside of ShopSite that could do the calculations and return them as text. The value wouldn't be passed to the shopping cart though if you are thinking of giving an actual discount on the price.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 135 guests