bongo Posted March 18, 2006 Posted March 18, 2006 Hi, After ordered on an oscommerce site you can go to your account and see your orders. There you have the quantity and the product. But it doesn't say if it's not in stock or if it is. I have tried to change this. But i dont now in which file i should change it. I want when you order an product and checkout, if it's not in stock the quantity you have ordered goes into the column i mysql database called quantity2 and if the quantity you have ordered is in it goes to quantity3 See picture. Hope somebody understands what i mean and can help at least to figure out which file i have to modifie. The thing i need to now is which files is inserting the quantity in the mysqldatabase when ordering. And if someone nows more than that are also welcome to let me now :D -Thomas-
bongo Posted March 19, 2006 Author Posted March 19, 2006 Now i have figured out that it Checkout_process.php file i have to make changes in. (At least i think sow. But i cant seem to figure out the if values. // Update products_ordered (for bestsellers list) tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); $sql_data_array = array('orders_id' => $insert_id, 'products_id' => tep_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], 'products_name' => $order->products[$i]['name'], 'products_price' => $order->products[$i]['price'], 'final_price' => $order->products[$i]['final_price'], 'products_tax' => $order->products[$i]['tax'], 'products_quantity2' => $order->products[$i]['qty2'], 'products_quantity' => $order->products[$i]['qty']); tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array); $order_products_id = tep_db_insert_id(); Is there someone that nows how to make it possible that if it's 0 in stock when ordering, then we also fill in the qty in products_quantity2 and not just products_quantity? Hope somebody can help me. Best Regards Thomas
bongo Posted March 22, 2006 Author Posted March 22, 2006 Arent there nobody that nows? Im willing to pay the man that can help me with this. For me this is an important thing in oscommerce. Hope someone can help me now when payments are in the picture :D -Thomas-
Recommended Posts
Archived
This topic is now archived and is closed to further replies.