Page 1 of 2 12 LastLast
Results 1 to 10 of 2475

Hybrid View

  1. #1
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Re: Reward Points Module- Live Release now available.

    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.

  2. #2
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Reward Points Module- Live Release now available.

    Quote Originally Posted by southshorepizza View Post
    ... PHP Fatal error: 1064:You have an error in your SQL syntax; ... 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; ...
    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

  3. #3
    Join Date
    Dec 2011
    Location
    Romania
    Posts
    16
    Plugin Contributions
    0

    Default Re: Reward Points Module- Live Release now available.

    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?

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Reward Points Module- Live Release now available.

    Quote Originally Posted by mnitescu View Post
    What should I do?

    Blank page = ERROR LOG

    Go to your error log and tell us what the error log says..
    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.

  5. #5
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Re: Reward Points Module- Live Release now available.

    Quote Originally Posted by lhungil View Post
    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.
    I have installed it and will report back soon. Thank you for this tip!

  6. #6
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Re: Reward Points Module- Live Release now available.

    I installed the modification by lat9 as suggested. Now my error log reads:
    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
    Any help would be greatly appreciated!

  7. #7
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Reward Points Module- Live Release now available.

    Quote Originally Posted by southshorepizza View Post
    ... PHP Fatal error: 1064:You have an error in your SQL syntax; ... /admin/customers_reward_points.php on line 358 ...

    Any help would be greatly appreciated!
    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:
    Code:
    if(zen_not_null($current_customer)) {
    Closing the if statement after the switch (around line 381) using something similar to:
    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

  8. #8
    Join Date
    Mar 2009
    Location
    Italy
    Posts
    155
    Plugin Contributions
    0

    Default Re: Reward Points Module- Live Release now available.

    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
    PHP Code:
      switch ($action//line 317
      
    {                     //line 318
        
    case 'edit':      //line 319
        
    case 'update'
    Modified:
    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'
    Then in the end:
    Unmodified
    PHP Code:
    if((zen_not_null($heading)) && (zen_not_null($contents))) //line 381
      
    {                                                                           //line 382
        
    echo '            <td width="25%" valign="top">' "\n";    //line 383 
    modified:
    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 
    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 )

  9. #9
    Join Date
    Oct 2013
    Location
    Orlando, FL
    Posts
    8
    Plugin Contributions
    0

    Default Re: Reward Points Module- Live Release now available.

    Hi,

    I would like to show the reward points below product price on the main page, categories, featured items, new products, etc., but not for "call for price" items. Do you think that this is possible?

    Thank you,

  10. #10
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Reward Points Module- Live Release now available.

    Quote Originally Posted by izar74 View Post
    ... could you please confirm that the following code is correct: ...
    "/admin/customers_reward_points.php" (changes in red):
    Code:
    315:	$contents = array();
    316:
    	  if(zen_not_null($current_customer)) {
    317:	    switch ($action) { // Combined w/ line 318
    319:	      case 'edit':
    320:	      case 'update':
    321:	      case 'handle_point_list':
    
    ...
    
    376:	          $record_contents[]=array('text' => '</form>');
    377:	        }
    378:	        break;
    379:	    } // End of switch statement
    	  } else {
    	    echo '<div class="alert">No Customer (or invalid customer) selected. No action performed!</div>';
    	  }
    380:
    381:	  if((zen_not_null($heading)) && (zen_not_null($contents)))
    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

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Reward Points module display order totals including reward points
    By irsarahbean in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 Jun 2013, 01:19 AM
  2. Reward points module : 0 points earned
    By jonnyboy22 in forum Addon Payment Modules
    Replies: 5
    Last Post: 5 Jun 2012, 09:52 AM
  3. Reward Points module- points not calculated correctly
    By cpoet in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 9 Sep 2010, 05:02 PM
  4. Reward Points Module - Hide message when 0 points offered
    By expresso in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Dec 2008, 06:58 PM
  5. Experimental Reward Points Module
    By precursor999 in forum Addon Payment Modules
    Replies: 7
    Last Post: 2 Apr 2007, 09:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg