Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Restock item not working correctly


baalwww

Recommended Posts

Posted

When the quantity of an item is 0, and the order is deleted, and the checkbox Restock item is checked, the quantity is then set to 1, but the status of the item remains out of stock.

Posted

Interesting. I have never looked at that. Could be a bug. Are you using pure MS2.2? What sotck control setting do you have?

Posted

As far as I know I'm using the standard version. I've not modified anything to do with stock levels. My settings are:

Check stock level: true

Subtract stock: true

Allow Checkout: false

Mark product out of stock: ***

Stock Re-order level: 0

Posted

Its the admin\includes\functions\general.php tep_remove_order function that does not update the products_status column. In there you could include the products_status for the update query

 

		tep_db_query("update " . TABLE_PRODUCTS . " set products_status='1', products_quantity = products_quantity + " . $order['products_quantity'] . ", products_ordered = products_ordered - " . $order['products_quantity'] . " where products_id = '" . (int)$order['products_id'] . "'");

Posted
Its the admin\includes\functions\general.php tep_remove_order function that does not update the products_status column. In there you could include the products_status for the update query

 

		tep_db_query("update " . TABLE_PRODUCTS . " set products_status='1', products_quantity = products_quantity + " . $order['products_quantity'] . ", products_ordered = products_ordered - " . $order['products_quantity'] . " where products_id = '" . (int)$order['products_id'] . "'");

 

Great...thank you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...