How do I have to import products in Magento using a direct connection to the database

后端 未结 4 640
心在旅途
心在旅途 2021-02-10 08:09

I have about 50.000 of records to import in a Magento store. What I have already tested: The file is about 50 MB.

  • Splitted files
  • API
  • Magento Clas
4条回答
  •  迷失自我
    2021-02-10 08:35

    If you disable the indexer while your load runs and then re-enable and run afterwards, it should improve your load time.

    $indexer = Mage::getSingleton('index/indexer');
    $indexer->lockIndexer();
    
    // ... run your processing ...
    
    $indexer->unlockIndexer();
    
    // Reindex everything
    $processes = $indexer->getProcessesCollection();
    foreach ($processes as $process)
    {
        // echo 'Processing: ' . $process->getIndexerCode() . "n";
        $process->reindexEverything();
    }
    

提交回复
热议问题