If anyone is wanting to display a different message for COWOA custmers, here's how I did it...as for having a negative impact, I haven't noticed.
In fact, I have had customers sign up for a full account and ask if they can have their points from their COWOA order, which I'm always glad to do!
The good thing about this mod is the points do get stored against the COWOA order so you can see how many points to transfer across to the full account.
Add the following defines to file includes/languages/english/modules/order_total/ot_reward_points_display.php
Code:
define('MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TITLE', 'With a full account, you could have earned');
define('MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TAG', 'points!');
define('FONT_RED','<font color="red">');
define('UNFONT','</font>');
Add the code below shown in red to function process() in file includes/modules/order_total/ot_reward_points_display.php
Code:
function process()
{
global $order;
$reward_points=GetRewardPoints($order->products);
$GlobalRewardPointRatio=GetGlobalRewardPointRatio();
$AdjustValue=GetRewardPointAdvancedCalculateValue();
$reward_points+=$AdjustValue*$GlobalRewardPointRatio;
if(isset($_SESSION['redeem_value']))
{
/*
$redeem_ratio=GetRedeemRatio($_SESSION['customer_id']);
$reward_points=$reward_points/$redeem_ratio;
$reward_points=$reward_points-$_SESSION['redeem_value'];
$reward_points=$reward_points*$redeem_ratio;
*/
$reward_points=$reward_points-($GlobalRewardPointRatio*$_SESSION['redeem_value']);
}
if($reward_points<0)
$reward_points=0;
$reward_points=zen_round($reward_points,0);
$_SESSION['REWARD_POINTS_EARNED']=$reward_points;
if ($_SESSION['COWOA']) {
$this->output[] = array('title' => FONT_RED . MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TITLE . ' ' . $reward_points . ' ' . MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TAG . UNFONT,
'text' => '',
'value' => 0);
} else {
$this->output[] = array('title' => $this->title . ':',
'text' => $reward_points,
'value' => 0);
}
}
Bookmarks