Get Difference Between Model Versions After Save in Magento 1.9

event-observermagento-1.9modelproduct

Is there any possibility to get attribute data difference between model versions? I create observer for catalog_product_save_after action, and now i want to make some changes only if attribute product_versions has changed.

Best Answer

Try this:

$newValue = $product->getData('product_versions');
$oldValue = $product->getOrigData('product_versions');

Now check if the 2 values are different. If they are, do your magic.