Ahaaaaaaa, figured this one out guys!!
For anyone else having a problem with this issue, just look at re-installing the files that shipped with the stock_by_attributes mod.
I've just cured my problems by overwriting /includes/classes/order.php with the order.php from "stock_by_attributes_4-7MULTIADD mod"
Somehow some other mod had corrupted the data that updates the "Quantity in Stock" in ADMIN>CATALOG>PRODUCTS WITH ATTRIBUTES".
It is now updating the Quantity in Stock Column with each sale. All working perfectly now.
Additionally, if you want the attribute in the drop down menu to automatically disable when the attribute quantity = zero, then you have to open /includes/modules/attributes.php and replace this:
PHP Code:
$sql = "select pov.products_options_values_id,
pov.products_options_values_name,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;
with this:
PHP Code:
$sql= "SELECT pov.products_options_values_id,
pov.products_options_values_name,
pa.*,
pwas.*
FROM " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pwas ON pwas.stock_attributes = pa.products_attributes_id
WHERE pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and (pwas.quantity > 0 or pwas.quantity IS NULL)
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;