views:

103

answers:

1

Hello all!

I need your suggestion please, currently am using magento API for import products in magento admin (magento database) and I come into notice that .. its really too slow ..its taking approx 1 hr to add 1000 products ..and I have to add almost 2,60,000 + products ... how can I speed up the process .... is there process any alternative to resolve this issue. Thanks for any suggestion or answer!

Richa verma

+1  A: 

The only way to speed up this process would be to simply not use the api. As you have come to find, it is far too slow for this type of task.

Instead, you will have to work directly with the database ( for maximum speed ), but unfortunately this requires you to fully understand at a very low level how Magento deals with inserting products and all of the tables that are touched in this process.

An intermediate solution may be to use the magento models etc. to create these products. For example to create a new simple product you can use this type of code:

$newProduct = Mage::getModel('catalog/product')
        ->setAttributeSetId($attributeSetId)
        ->setTypeId('simple')
        ->setStatus(1)
        ->setTaxClassId(2)
        ->setVisibility(4)
        ->setSku($sku)
        ->setName($name)
        ->setDescription($description)
        ->setShortDescription($shortDescription)
        ->setPrice($price)
        ->save();

This is a very simple example and there is so much more you can do here.

I have used a similar method with a custom module for importing products from csv files and it takes a few hours to import around 1500 products.

I think though that with the volumes you are talking about then any way you decide to get these products into Magento is going to take a long time. I would also question why you need so many products in the first place.

Drew
Thanks! But it will take too much time to understand each and every point about magento database regarding products.. I Can't wait till then .. I have to set all products ASAP
Richa
Thats why i suggested you try the middle ground - understanding magento models and using those. They are much faster than using the api. You may want to look at purchasing an extension here: http://www.magentocommerce.com/magento-connect . I know there are several that will allow you to import from a spreadsheet
Drew