Currently browsing

Data migration from ZenCart and OsCommerce to Magento

Here is instruction on how to import customers, orders, categories, products and images from ZenCart or OsCommerce to Magento. 1) Install osCommerce Migration Tool ZenCart and OsCommerce databases are equal, because ZenCart is an OsCommerce fork project. osCommerce Migration Tool was developed by Magento Core team, you can install it …

Magento: Join, filter, select and sort attributes, fields and tables

In my previous article (Magento: Very Useful Collection Functions), I had written about database interaction functions present in class Varien_Data_Collection_Db. Here, I am going to explain some database interaction functions present in the class Mage_Eav_Model_Entity_Collection_Abstract. These collection functions are very useful to select data from Magento database. We need them …

Magento: Recoverable Error: Argument 1 passed to Mage_Core_Model_Store :: setWebsite() must be an instance of Mage_Core_Model_Website

Problem: I was transfering Magento files and database from one server to another. I did complete all the transfer process of files and also exported and imported the database. After that, when I tried to access the site, I got the following error:- Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() …

Magento: Get sub categories and product count

Here, I will be showing you the code to get sub categories of a particular category and the number of products (product count) present in the sub categories. Looking for improvement for your Magento Store? Facebook Connector Extension Product related article extension Magento Offer popup on exit extension Unlimited Slideshow …

Magento: How to enable backorders?

Difference between backorder and pre-order A backorder is for an item that was in stock previously but is temporarily out of stock. A pre-order is for an item that has not been released yet. Scenario for backorder: For example, a customer orders 3 items. One item is not in stock. …

Magento: Product Edit Warning: Invalid argument supplied for foreach()

Scenario: While editing product programatically from frontend. I was trying to change the status of the product with the following code: Mage::getModel(‘catalog/product’)->load($product->getId())->setStatus(2)->save(); Problem: 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 Solution: It …