Here just download the functions/extra_functions/reward_points_functions.php zip, unzip it and upload it to your admin/includes/functions/extra_functions folder. I think it will be much easier for you.
Here just download the functions/extra_functions/reward_points_functions.php zip, unzip it and upload it to your admin/includes/functions/extra_functions folder. I think it will be much easier for you.
Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation
I don't think that is the issue. I just downloaded that file and uploaded it to the site.
I got this:
[29-Mar-2014 17:36:59] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status=0 ORDER BY date DESC LIMIT 12' at line 1 :: SELECT rewards_id, orders_id, date, reward_points, status FROM zen_reward_status_track WHERE customers_id= AND status=0 ORDER BY date DESC LIMIT 12; in /home4/w57dsjmm/public_html/order/includes/classes/db/mysql/query_factory.php on line 120
Sorry it didn't work.
I believe an issue with a missing customer_id in the SQL statement has been reported before in this thread... Not sure if a solution was posted... If you install this modification by lat9, you can track down where in the reward points module the problematic SQL query is being built.
Hopefully once we all know where the SQL statement causing the error is being created, someone will be able to help further diagnose and fix the issue.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
hi there
I have the 1.3.9. version of reward points.
Now I updgraded from zen cart 1.3.9. to 1.5.1 and used the 1.5.0 upgrade sql.
So I have the 1.3.9 version of reward points with 1.5.0 upgrade, which I think is not quite right.
When I go to Customer>Reward Points and try to edit anything all I get is a blank page.
What should I do?
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
I installed the modification by lat9 as suggested. Now my error log reads:
Any help would be greatly appreciated!Code:[05-Apr-2014 04:20:36] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status=0 ORDER BY date DESC LIMIT 12' at line 1 :: SELECT rewards_id, orders_id, date, reward_points, status FROM zen_reward_status_track WHERE customers_id= AND status=0 ORDER BY date DESC LIMIT 12; ==> (as called by) /home4/xxxx/public_html/order/admin/customers_reward_points.php on line 358 <== in /home4/xxxx/public_html/order/includes/classes/db/mysql/query_factory.php on line 130
I can't figure out why the reward points aren't applying to my customers orders. I went through every section of the Reward Points configuration in my admin panel under Configuration. The reward point value is showing up correctly next to each product but in my Customers/Reward Points section they are not showing any totals. Any help is appreciated! Thank you!
Looks like the code in that file ASSUMES a valid customer id will be passed in the URL when certain actions are performed. If the customer id is not valid when trying to edit, update, or process reward points this error will occur.
As a temporary way to avoid this error, one "could" wrap the entire switch statement (performing the action - starts around line 318) with something similar to:
Closing the if statement after the switch (around line 381) using something similar to:Code:if(zen_not_null($current_customer)) {Code:} else { echo '<div class="alert">No Customer (or invalid customer) selected. No action performed!</div>'; }
Last edited by lhungil; 29 Apr 2014 at 06:07 PM.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Hi lhungil,
thanks for the advice. I sometimes got the error but dunno where it was generated. Just to be sure not to do stupid changes could you please confirm that the following code is correct:
Unmodified file customers_reward_points.php
Modified:PHP Code:
switch ($action) //line 317
{ //line 318
case 'edit': //line 319
case 'update':
Then in the end:PHP Code:
if(zen_not_null($current_customer)) { //line 316 added by lhungil
switch ($action) //line 317
{ //line 318
case 'edit': //line 319
case 'update':
Unmodified
modified:PHP Code:
if((zen_not_null($heading)) && (zen_not_null($contents))) //line 381
{ //line 382
echo ' <td width="25%" valign="top">' . "\n"; //line 383
Sorry but that "around line xxx" put me in danger zone, i prefer to be sure before making any modification (i know it for dummy but be patient )PHP Code:
} else { echo '<div class="alert">No Customer (or invalid customer) selected. No action performed!</div>'; } //line 380
if((zen_not_null($heading)) && (zen_not_null($contents))) //line 381
{ //line 382
echo ' <td width="25%" valign="top">' . "\n"; //line 383
Bookmarks