Even with the proper settings under "stock," my downloadable items were not subtracting or marking as sold as they were sold. Everything else seemed to work. I edited includes/classes/order.php as follows. I stripped down where it says:
if ($stock_values->RecordCount() > 0) {
// do not decrement quantities if products_attributes_filename exists
if ((DOWNLOAD_ENABLED != 'true') || $stock_values->fields['product_is_always_free_shipping'] == 2 || (!$stock_values->fields['products_attributes_filename']) ) {
$stock_left = $stock_values->fields['products_quantity'] - $this->products[$i]['qty'];
$this->products[$i]['stock_reduce'] = $this->products[$i]['qty'];
} else {
$stock_left = $stock_values->fields['products_quantity'];
}
To only say:
$stock_left = $stock_values->fields['products_quantity'] - $this->products[$i]['qty'];
$this->products[$i]['stock_reduce'] = $this->products[$i]['qty'];
And this solved the problem. Does anyone know of any problems this change could cause?
~Chell



