sounds good.
hey I applied for a source forge project for this.
Printable View
sounds good.
hey I applied for a source forge project for this.
Here come the fix to be able to edit (sort of) orders attributes:
In edit_orders.php line 815 replace
withPHP Code:
$attributes_query_string = "select * from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$oID . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'";
You may also want to edit line 846 and replace size="6" and size="10" with something bigger (I put 60).PHP Code:
$attributes_query_string = "select * from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$oID . "' and orders_products_id = '" . (int)$orders_products_query->fields['orders_products_id'] . "'";
On the other hand, this is not quite what I was expecting, I hoped I'll have in edit orders pulldowns for each option, and the product price to be calculated as in shop, base price + options price. Right now, if the user choose option X instead of option Y, I have to open another instance of the admin to be able to copy-paste both the option name and option value, then I'll have to recalculate manually the final price for the product.
zc_tester
Thank you for the attribute edit bit.
I am not sure if you saw my question from earlier. If I add a product having attributes the attributes are not being added into the order I just get the product name no attribute saved.
Can this be fixed. And can it deduct stock from the product stock by attributes module. This would be agreat result.
Thanks
MG
is it possible to integrate this into super orders 2.0?
I am getting this error when I use this
Fatal error: Call to undefined function: zen_field_exists() in /var/virtual/web/w0713/html/store/admin/edit_orders.php on line 82
Anyone had this before?
Cheers,
Neil
I have the same error: Call to undefined function: zen_field_exists()
I seem to recall I fixed this by opening and closing all the php tags properly eg <?php .... ?>Quote:
I am getting this error when I use this
Fatal error: Call to undefined function: zen_field_exists() in /var/virtual/web/w0713/html/store/admin/edit_orders.php on line 82
Hope this helps.
MG
I have the mod going for everything except delete. I added the change from zc_tester
as follows (first line is line 267
// $Query = "delete from " . TABLE_ORDERS_PRODUCTS . " where orders_products_id = '$orders_products_id';";
// $db -> Execute($Query);
// //UPDATE_INVENTORY_QUANTITY_START################################################# #############################################################
// #$order = zen_db_fetch_array($order_query);
// if ($products_details["qty"] != $order['products_quantity']){
// $differenza_quantita = ($products_details["qty"] - $order['products_quantity']);
// $db -> Execute("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity - " . $differenza_quantita . ", products_ordered = products_ordered + " . $differenza_quantita . " where products_id = '" . (int)$order['products_id'] . "'");
// }
// //UPDATE_INVENTORY_QUANTITY_END################################################### ###########################################################
// Edit Begin
$db -> Execute($Query);
$row = $db->fields;
//UPDATE_INVENTORY_QUANTITY_START################################################# #############################################################
#$order = zen_db_fetch_array($order_query);
if ($products_details["qty"] != $row->fields['products_quantity']){
$differenza_quantita = ($products_details["qty"] - $row->fields['products_quantity']);
$db -> Execute("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity - " . $differenza_quantita . ", products_ordered = products_ordered + " . $differenza_quantita . " where products_id = '" . (int)$row->fields['products_id'] . "'");
}
//UPDATE_INVENTORY_QUANTITY_END################################################### ###########################################################
// Edit End
however when I set the quantity to zero and click Update, the item still is there. Any thoughts?? This is a really important mod for us. Many TIA
bob
never mind. I had commented out the line that defines the delete statement. DUH.
bob