
Originally Posted by
DigitalShadow
Code:
[02-Sep-2020 14:25:24 Europe/London] Request URI: /create-account, IP address:
#1 RewardPoints->update() called at [/home/site/public_html/includes/classes/class.base.php:103]
#2 base->notify() called at [/home/site/public_html/includes/modules/create_account.php:594]
#3 include(/home/site/public_html/includes/modules/create_account.php) called at [/home/site/public_html/includes/modules/pages/create_account/header_php.php:17]
#4 require(/home/site/public_html/includes/modules/pages/create_account/header_php.php) called at [/home/site/public_html/index.php:36]
--> PHP Warning: Use of undefined constant NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_HEADER - assumed 'NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_HEADER' (this will throw an Error in a future version of PHP) in /home/site/public_html/includes/classes/observers/class.reward_points.php on line 32.
[02-Sep-2020 14:25:24 Europe/London] Request URI: /create-account, IP address:
#1 RewardPoints->update() called at [/home/site/public_html/includes/classes/class.base.php:103]
#2 base->notify() called at [/home/site/public_html/includes/modules/create_account.php:594]
#3 include(/home/site/public_html/includes/modules/create_account.php) called at [/home/site/public_html/includes/modules/pages/create_account/header_php.php:17]
#4 require(/home/site/public_html/includes/modules/pages/create_account/header_php.php) called at [/home/site/public_html/index.php:36]
--> PHP Warning: Use of undefined constant NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_CUSTOMER_RECORD - assumed 'NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_CUSTOMER_RECORD' (this will throw an Error in a future version of PHP) in /home/site/public_html/includes/classes/observers/class.reward_points.php on line 36.
Change lines 32-44 to look like the below. All that has been added is single apostrophe's at the beginning and end of those debug call outs. These changes were provided by swguy:
Code:
case 'NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_HEADER':
$this->StoreRewardPoints($customer_id);
break;
case 'NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_CUSTOMER_RECORD':
if(REWARD_POINTS_NEW_ACCOUNT_REWARD!=0)
if(REWARD_POINTS_NEW_ACCOUNT_REWARD>0 && !HasRewardPoints($customer_id))
$this->AddRewardPoints($customer_id,REWARD_POINTS_NEW_ACCOUNT_REWARD);
else
if(REWARD_POINTS_NEW_ACCOUNT_REWARD<0 && !HasPendingPoints($customer_id))
$this->AddPendingPoints($customer_id,abs(REWARD_POINTS_NEW_ACCOUNT_REWARD));
case 'NOTIFY_LOGIN_SUCCESS':
Bookmarks