While editing product programatically from frontend. I was trying to change the status of the product with the following code:
Product could not be edited programatically from frontend. The following error message is shown:
Warning: Invalid argument supplied for foreach() in /var/www/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 937
It seems that product updates are only made on the admin side and you have to change the store view while editing product from frontend.
Write the following before you edit product:
Hence, my new code will be :
Looking for improvement for your Magento Store?
Facebook Connector Extension
Product related article extension
Magento Offer popup on exit extension
Unlimited Slideshow Magento Extension
Light Checkout in One Step Magento Extension