Hi to all,
I am trying to update a product attribute every time the quantity of the product is updated (e.g. the product is added to cart).
I have edited the function registerItemSale in Mage/CatalogInventory/Model/Stock.php by adding:
$product = Mage::getModel(’catalog/product’)
$qty2 = $product->getQty2();
This is supposed to update an attribute Qty2 and reduce its value. However $product->save() doesn’t seem to work, it gives an error. Any ideas why?
Thank you in advance!