Magento Forum

   
Page 2 of 180
the quest for an efficient product import script
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

updated version 0.2.7

- fixed bug for obsolete in_array

File Attachments
magento_mass_importer.zip  (File Size: 10KB - Downloads: 248)
 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

updated version 0.2.8

-remove warning for obsolete ignore_value array
- added reindexing support (through magento command line indexer)

File Attachments
magento_mass_importer.zip  (File Size: 10KB - Downloads: 199)
 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

updated version 0.2.9

- fixed utf8 encoding issues

File Attachments
magento_mass_importer.zip  (File Size: 11KB - Downloads: 223)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Harry-S
Jr. Member
 
Total Posts:  8
Joined:  2009-11-04
 

hi! you script speed is awesome!!!!
but i have a trouble? attribute set do not assigned to product, the field name is \"attribute_set\" and value \"Default\"
must i type other values?
thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

hi,
indeed you found a bug, will post a 0.2.10 within minutes to fix it !!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

updated version 0.2.10

- fixed attribute set id retrieval for “Default” (use entity_id=4 to force product attribute set)

File Attachments
magento_mass_importer.zip  (File Size: 11KB - Downloads: 302)
 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

to all who downloaded the script, could you post the stats please ?

> images or no images imported
> number of attributes per product
> total number of records & speed reported by script , this will help me to have an idea of the average speed

 
Magento Community Magento Community
Magento Community
Magento Community
 
pastanislas
Member
 
Total Posts:  46
Joined:  2008-07-29
 

Here’s mine
- Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz - 2Gb Ram
- Magento 1.4.1.1
- Nginx Webserver + Xcache
- 1004 recorded products
- no images imported
- 7 custom dropdown attributes
- 35 columns in csv file
- reported speed 12596 rec/mn

 
Magento Community Magento Community
Magento Community
Magento Community
 
Harry-S
Jr. Member
 
Total Posts:  8
Joined:  2009-11-04
 

i just try to add product into different stores
when i add product in default store and then into other store all data in first store overwritten with data from second store
how can i fix it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

to Harry-S

the script currently handle single store
i may achieve to make it handle multiple stores if you can post a few lines of your csv file (with headers) (in order for me to find how multiple store are handled in csv)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mr Lei
Jr. Member
 
Total Posts:  13
Joined:  2010-05-05
 

This script no work old version. 1.3.2.4 ...

Mr Lei

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

i expected so, i’m relying on new 1.4 flat model for some operations.

as said in the head post, the script was only tested on 1.4.1.x

but thanks for the confirmation, i’ll add a test for magento version to abort script.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mr Lei
Jr. Member
 
Total Posts:  13
Joined:  2010-05-05
 

dweeves hour work is great… a use them in new version my aplication but a have lot open aplication in old version 1.3.2.4 and a use import product in this script

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
 
$profileId=PROFILENR;
 
Mage::app()->getRequest()->setParam('files',$filename);
 
$logFileName$filename.'.log';
 
$recordCount 0;
 
$profile Mage::getModel('dataflow/profile');
 
$userModel Mage::getModel('admin/user');
 
$userModel->setUserId(0);
 
Mage::getSingleton('admin/session')->setUser($userModel);
  if (
$profileId{
            $profile
->load($profileId);
            if (!
$profile->getId()) {
              Mage
::getSingleton('adminhtml/session')->addError('The profile you are trying to save no longer exists');
            
}
        }

        Mage
::register('current_convert_profile'$profile);
        
$profile->run();
        
$batchModel Mage::getSingleton('dataflow/batch');

        if (
$batchModel->getId()) {
            
if ($batchModel->getAdapter()) {
              $batchId 
$batchModel->getId();
              
$batchImportModel $batchModel->getBatchImportModel();
              
$importIds $batchImportModel->getIdCollection();
              
$batchModel Mage::getModel('dataflow/batch')->load($batchId);
              
$adapter Mage::getModel($batchModel->getAdapter());
              foreach (
$importIds as $importId{
                      $recordCount
++;
                      
try{
                              $batchImportModel
->load($importId);
                           if (!
$batchImportModel->getId()) {    $errors[] Mage::helper('dataflow')->__('Skip undefined row');
                               continue;
                           
}
                           $importData 
$batchImportModel->getBatchData();
                           try 
{
                                 $adapter
->saveRow($importData);
                            
catch (Exception $e{
                           
continue;
                        
}

                       } 
catch(Exception $ex{
                         
echo "\n Nie zaiportowany ".$filename;
                         continue; 
                      
}
                }

                
foreach ($profile->getExceptions() as $e{
                    
echo $e->getMessage();
                
}

            }
          }
         
         
echo "Import Completed".$filename;

if i trail add product whit short description and next a update big description, all work ok.
I can update big string description in product but a cant add new product whit big strings…

Mr Lei

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

To Mr Lei:

i’m afraid i won’t be of great help for you 1.3.x big description problem.

you seem to use standard dataflow importer through your script so maybe it’s a known bug.

i recommend you to open a special topic for your problem (if not already done),and find some help from standard import specialist.

this topic is mainly based on not using standard import smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

Call for Data !!!!

in order to achieve multi store,multi websites support in 0.3 need a csv file that handles this use case.

if you’ve got one, working with standard import , please post it (or part of it) in that thread

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 180