Akhilesh Patel

Monday, July 16, 2012

Set Product Data In Magento Version <= 1.5

It is required to set current store for saving data.


Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$product = new Mage_Catalog_Model_Product();
$product->setData($data);
$product->save();
Posted by Akhilesh Patel at 5:28 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

My photo
Akhilesh Patel
View my complete profile

Blog Archive

  • ▼  2012 (18)
    • ►  October (1)
    • ►  August (5)
    • ▼  July (12)
      • Upgrading magento from 1.4.1.1 to 1.6.0.0 (issue w...
      • Useful git commands
      • Remove index.php from url in magento
      • Creating Product And Category Attributes By Script
      • Set Product Data In Magento Version <= 1.5
      • X-Cart Add Pinit Button On Product Detail Page
      • Mobile User Agent For Add Exception Magento
      • Edit Footer Toolbar On Product List Page
      • Mage_Adminhtml_Block_Widget_Form
      • Hide Pager And Filter Visibility In Admin Grid
      • Interesting facts about Magento Enterprise
      • Magento Javascript Validation Classes
Watermark theme. Powered by Blogger.