Point to Cash Redemption
Adding a Points/Cash Conversion Redemption
You may wish to offer redemptions to members that allow them to convert their points to cash (or vice versa). The method below allows you to automate this process.
The way to make this work is by using the PHP code box when you are creating the redemption. Into that box you paste the following code:
$unixtime=time();
@mysql_query("insert into ".$mysql_prefix."accounting
set unixtime='$unixtime',transid='" . maketransid($HTTP_SESSION_VARS[username]) . "',
amount='100000000',username='" . $HTTP_SESSION_VARS[username] . "',
type='points',description='Cash2Points'");
Edit the code in the following ways:
- Edit the number in the code depending on the amount of cash or points the redemption is for.
- If you have created a redemption that deducts points, you set the number as the cash conversion amount multiplied by 10000000
- If you have created a redemption that deducts cash, you set the number as the point conversion amount multiplied by 100000
Examples:
- Redemption to convert 1000 points to $1 - create a redemption that deducts 1000 points, and set the number in the code above to 10000000 (i.e. 1 X 10000000)
- Redemption to convert $1 to 1000 points - create a redemption that deducts $1, and set the number in the code above to 100000000 (i.e. 1000 X 100000)
- For Cash to Points conversions, the type='points' should remain as is, but for Points to Cash, change it to type='cash'
- For Cash to Points conversions, the description='Cash2Points' can remain as is, but for Points to Cash, change it to description='Points2Cash'
- For either type of redemption, set the Auto-deduct option to Yes.









CCI Chatterbox RSS Feed