nathanrowe Posted February 26, 2007 Posted February 26, 2007 Hey peps, I am stuck can anyone help with this query, I have an input field indentical to the product qty field. I need to update the mysql database with the variables in my [$i]['sent] fields, but can not load the HTTP_GET_VARS tep_db_query("UPDATE " . TABLE_ORDERS_PRODUCTS . " SET products_sent = '" . (int)$order->products[$i]['sent'] . "' WHERE products_id = '" . (int)$order->products[$i]['prod_id'] . "'"); Reagrds Nathan
Guest Posted February 26, 2007 Posted February 26, 2007 you need to check the form that submits the fields. So in the form you need to add the extra 'sent' field. And I've no clue what contribution or form code you're talking about. The query comes much later. And you may need to check the HTTP_POST_VARS instead
nathanrowe Posted February 26, 2007 Author Posted February 26, 2007 you need to check the form that submits the fields. So in the form you need to add the extra 'sent' field. And I've no clue what contribution or form code you're talking about. The query comes much later. And you may need to check the HTTP_POST_VARS instead hmmm, me neither! Basically it is an add-on I am trying to build, Wonder if you could help, I basically need to update the product quantities on the admin edit order section of the site. But am getting nowhere. It works that the order can be sent to two parts, so we need a new column, sent items (new column ['sent']) and ordered items (already set as ['qty']) I have set up a new column in the order_products table next to the quantity field, when we update the order status from pending to dispatched I need it to upload the modified 'sent' input fields into the table? so it can read items sent 50 and items ordered 100 stc. Does that make sense? Any help you could give would be much appreciated. Kind regards Nathan
Guest Posted February 26, 2007 Posted February 26, 2007 I am just guessing its the edit_orders.php you're talking about. You have to locate the qty form-code. In an old version I have that goes like ' <td class="' . $RowStyle . '" align="right" valign="top">' . "<input name='update_products[$orders_products_id][qty]' size='2' value='" . $order->products[$i]['qty'] . "'></td>\n" . So you need to add another line for your sent field like ' <td class="' . $RowStyle . '" align="right" valign="top">' . "<input name='update_products[$orders_products_id][sent]' value='" . $order->products[$i]['sent'] . "'></td>\n" . and you also need to expand the orders class to include the sent field.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.