Re: Reward Points Module- Live Release now available.
Quote:
Originally Posted by
hem
Would a better idea be to display something like "If you had an account you would have earned X reward points on this purchase". That would encourage more people to create an account with you.
How about removing the reference to the bonus points from order total alltogether, would that work..? The customer would see the points in the sidebar box when logged in... And then maybe just have general info on reward points on main page or on page 4 or something.
Re: Reward Points Module- Live Release now available.
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);
}
}
Re: Reward Points Module- Live Release now available.
Quote:
Originally Posted by
damiantaylor
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.
Nice one Damian- Do you mind if I include that in the mod as a supplemental addon?
Re: Reward Points Module- Live Release now available.
Quote:
Originally Posted by
damiantaylor
If anyone is wanting to display a different message for COWOA custmers, here's how I did it...
Thanks, but this just gave me a blank checkout_payment..?
Re: Reward Points Module- Live Release now available.
Hi Andrew,
You can use that code, no problem.
Unicorn,
Are you using the latest version of the mod? If memory serves correctly I have 1.33a.
Does your original process() function look like this:
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;
$this->output[] = array('title' => $this->title . ':',
'text' => $reward_points,
'value' => 0);
}
A blank page usually means a php syntax error or an undefined field.
Re: Reward Points Module- Live Release now available.
Quote:
Originally Posted by
damiantaylor
Hi Andrew,
You can use that code, no problem.
Does your original process() function look like this:
A blank page usually means a php syntax error or an undefined field.
Yes, it does... May have gotten a synax error, though I cannot figure out where and why. I'll have another look at it! :)
Re: Reward Points Module- Live Release now available.
try commenting out the bit of added code, so the function would look like this:
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);
// }
}
If that works, I think it must be one of the defines that hasn't been defined:
Code:
FONT_RED
MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TITLE
MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TAG
UNFONT
Re: Reward Points Module- Live Release now available.
Quote:
Originally Posted by
hem
I tested it here and it is working exactly as it should- No payment method is being asked for on purchases with a zero total. Are you using any other checkout mod that might be causing this?
The only other payment methods I'm using are 2Checkout and PayPal Express.
Re: Reward Points Module- Live Release now available.
I updated my order status using super orders batch update and none of the orders have had their points moved from pending to earned.
I'm using Advanced which state Pend: [Order Processing] Earn: [Order Completed]
Why haven't the points updated.
Re: Reward Points Module- Live Release now available.
Hi i was wondering if anybody had an answer to this problem.
I am trying to change the message for reward points shown in the product page. at the moment it says "33 reward points"
However i would like it to display as "Worth 33 Reward Points"
How can i move the Number of points?
So far i have tried changing the tpl_products_reward_points.php code to this;
Code:
echo PRODUCT_REWARD_POINT_TAG.' '.$reward_points' 'PRODUCT_REWARD_POINT_TAG_1.;
and added 'PRODUCT_REWARD_POINT_TAG_1.; into the reward_points.php in the extra definitions directory.
But this doesn't seem to work. I just blanks my page. If i remove the last 'PRODUCT_REWARD_POINT_TAG_1.; from the line in tpl it works again. What am i missing?