View Single Post
  #1  
Old 05-22-2008, 12:33 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Show $$ value for BCSE's Reward Points Mod

To display the $$ value anywhere, make sure that you have installed the reward points mod to display the points in the location of which you want to show the dollar value. Then:

Open auth.php and before ?> put:

Code:
// WCM - Pass the points payment rate to the template for $$ display $payment_rate = func_query_first_cell("select value from points_config where name='payment_rate'"); $smarty->assign("wcmPaymentRate",$payment_rate);


In your template file:

Code:
{math x=$points.total y=$wcmPaymentRate equation="x / y" format="%.2f" assign="wcmPointsDollars"} {include file="currency.tpl" value=$wcmPointsDollars}

Voila.
Reply With Quote