Top_Speed Posted October 25, 2010 Posted October 25, 2010 Hi everyone. Hope somebody has seen this before, I have searched but haven't seen this problem. When I edit a products description and then go to an order that had (has) the item on it, the order has the item followed by: 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 pta.products_text_attributes_id = ota.products_text_attributes_id' at line 1 select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = 12391 and ota.products_id = and pta.products_text_attributes_id = ota.products_text_attributes_id No way to see the rest of order of course. ANY FIX (I Hope!) Pre thanks, KJ define('PROJECTS', 'Something that goes on forever!');
Top_Speed Posted October 25, 2010 Author Posted October 25, 2010 RESOLVED! Posted in case somebody has this problem........ This may have occurred in conjunction to adding a Contrib (Imprint Text Options) ---BACKUP EFFECTED FILES FIRST!--- In admin/includes/classes/order.php ##FIND: $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); ##CHANGE TO: $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); ##FIND: 'model' => $orders_products['products_model'], ##ADD JUST BELOW: 'products_id' => $orders_products['products_id'], --- In admin/orders.php ##FIND & Remark this line: $pid = @mysql_result(tep_db_query("select products_id from products_description where products_name='" . tep_db_input($order->products[$i]['name']) . "'"), 0, "products_id"); ##SO IT LOOKS LIKE: // $pid = @mysql_result(tep_db_query("select products_id from products_description where products_name='" . tep_db_input($order->products[$i]['name']) . "'"), 0, "products_id"); ##ADD JUST BELOW: $attr_q = tep_db_query("select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = " . $HTTP_GET_VARS['oID'] . " and ota.products_id = " . $order->products[$i]['products_id'] . " and pta.products_text_attributes_id = ota.products_text_attributes_id"); ##DONE Upload the 2 updated files (u backed them up first right?) and alter an item that you have on an invoice. Cheers :) define('PROJECTS', 'Something that goes on forever!');
Recommended Posts
Archived
This topic is now archived and is closed to further replies.