Originally Posted by southshorepizza
Okay so I have done all of these things. I also have gone back in and found post 441-451 in this thread about my last attempt at the upgrade. I have the same results!
Log says
[28-Mar-2014 14:24:44] PHP Fatal error: Call to undefined function getrewardpoints() in /home4/w57dsjmm/public_html/order/includes/modules/order_total/ot_reward_points_display.php on line 40
however line 40 of said file is $reward_points=GetRewardPoints($order->products);
I feel as if this is ground hog day all over again!
And do you have a GetRewardPoints function in \admin\includes\functions\extra_functions\reward_points_functions.php. (case sensitivity counts..) You would copy over the one from the store side function file.. Saying you did what was suggested and still got an error doesn't provide enough info to determine why.. POST the changes you made to the admin functions file.. The error says you DON'T have the function in admin functions file.. might be best if you not only post the part you added but a couple of lines above and below it to make sure you didn't add e character that isn't supposed to be there.. (on the Rewards Points support thread of course )
Diva Vocals or anyone else,
I don't have anything here:
\admin\includes\functions\extra_functions\reward_points_functions.php.
I do have the file indicated in the log at:
/order/includes/modules/order_total/ot_reward_points_display.php
As indicated in the log the error is:
Call to undefined function getrewardpoints()
As Ilhungil indicated that it should be a call to function GetRewardPoints() but for some reason the log shows it all in lower case.
My file at /order/includes/modules/order_total/ot_reward_points_display.php I will put line 40 in red text but the file looks like this:
Code:
class ot_reward_points_display
{
var $title, $output;
function ot_reward_points_display()
{
$this->code = 'ot_reward_points_display';
$this->title = MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_TITLE;
$this->description = MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_DESCRIPTION;
$this->sort_order = MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_SORT_ORDER;
$this->output = array();
}
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);
}
function check()
{
global $db;
if (!isset($this->_check))
{
$check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_STATUS'");
$this->_check = $check_query->RecordCount();
}
return $this->_check;
}
function keys()
{
return array('MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_STATUS', 'MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_SORT_ORDER');
}
function install()
{
global $db;
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('This module is installed', 'MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\',\'false\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_SORT_ORDER', '1000', 'Sort order of display.', '6', '2', now())");
}
function remove()
{
global $db;
$db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
}
?>
If I am supposed to have this file in the Admin root as well that could be my problem. But I don't think I'm missing a file there or the log would have given me that address wouldn't it?
Bookmarks