sudetono13 Posted September 5, 2006 Posted September 5, 2006 Greetings All, I have another problem with installing Quality Price Break for SPPC 1.02. I have already installed SPPC 4.1.5 and Hide products from Customer Groups for SPPC v2.01 onto osC 2.2 MS2 with not problems. Yesterday I tried to install QPB for SPPC and ran into problems. Solved most of them but still have a problem with /catalog/admin/customize.php when I edit an item and try to save it. I get an ugly error ~ listed below. Has anybody seen this before? I merged changes into the file numerous times and can't see where I'm going wrong... ,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 'where customers_group_id = '1' and products_id = '57'' at line 1 update products_groups , where customers_group_id = '1' and products_id = '57' [TEP STOP] Quote
sudetono13 Posted September 5, 2006 Author Posted September 5, 2006 Greetings All,I have another problem with installing Quality Price Break for SPPC 1.02. I have already installed SPPC 4.1.5 and Hide products from Customer Groups for SPPC v2.01 onto osC 2.2 MS2 with not problems. Yesterday I tried to install QPB for SPPC and ran into problems. Solved most of them but still have a problem with /catalog/admin/customize.php when I edit an item and try to save it. I get an ugly error ~ listed below. Has anybody seen this before? I merged changes into the file numerous times and can't see where I'm going wrong... ,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 'where customers_group_id = '1' and products_id = '57'' at line 1 update products_groups , where customers_group_id = '1' and products_id = '57' [TEP STOP] Oops... I meant "categories.php" not customize.php in the path above. Quote
sudetono13 Posted September 5, 2006 Author Posted September 5, 2006 Oops... I meant "categories.php" not customize.php in the path above. OK, I found the problem... The code merged for /catalog/admin/categories.php at one point attempts to get rid of a comma at the end of SQL string. This statement has a problem with it and needs to be fixed in two places ~ both branches of the if-else statement. // In the contribution source it read as... $sppc_update_query = substr($sppc_update_query, $query_string_length-1); // Needs to be changed to read.... $sppc_update_query = substr($sppc_update_query, 0, $query_string_length-1); Quote
Jan Zonjee Posted September 5, 2006 Posted September 5, 2006 OK, I found the problem... The code merged for /catalog/admin/categories.php at one point attempts to get rid of a comma at the end of SQL string. This statement has a problem with it and needs to be fixed in two places ~ both branches of the if-else statement. // In the contribution source it read as... $sppc_update_query = substr($sppc_update_query, $query_string_length-1); // Needs to be changed to read.... $sppc_update_query = substr($sppc_update_query, 0, $query_string_length-1); You are right, that code is wrong. However, I tried to replicate the error but couldn't (because the code for products_price8_qty doesn't end with a comma so normally that wrong piece of code wouldn't get used): } if (isset($HTTP_POST_VARS['sppcproducts_price8_qty'][$customers_group['customers_group_id']])) { $sppc_update_query .= " products_price8_qty = '" . $HTTP_POST_VARS['sppcproducts_price8_qty'][$customers_group['customers_group_id']] . "' "; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.