Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Advanced Profiles - Product Import - number_of_records: how to increase this
 
sdnick
Jr. Member
 
Total Posts:  3
Joined:  2009-09-07
 

Can anyone tell me how i can import more than one record at a time using advanced profile import?

*using the standard import profile i set Number of Records to 1000 and it works great - changing the setting below does not affect the import

<action type="dataflow/convert_adapter_io" method="load">
<var name="type">file</var>
<var name="path">var/import/</var>
<var name="filename"><![CDATA[CA_feed.xml]]></var>
<var name="format"><![CDATA[xml]]></var>
</action>

<action type="dataflow/convert_parser_xml_excel" method="parse">
<var name="single_sheet"><![CDATA[]]></var>
<var name="fieldnames">true</var>
<var name="store"><![CDATA[0]]></var>
<var name="number_of_records">1</var>
<var name="decimal_separator"><![CDATA[.]]></var>
<var name="adapter">catalog/convert_adapter_Productimport</var>
<var name="method">parse</var>
</action>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Uwe Mesecke
Jr. Member
 
Total Posts:  4
Joined:  2009-11-02
Rostock/Germany
 

According to Mage/Adminhtml/Block/System/Convert/Profile/Run.php line 125 the number of records is read from the gui data:

$numberOfRecords $profile->getData('gui_data/import/number_of_records');

Using Advanced Profiles there is no gui data saved in the profile. At the moment I am trying to find a solution myself and will post it here when I found it. But I am afraid there is no quick solution as the advanced profiles are to variable to manually build the gui data from the xml.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Uwe Mesecke
Jr. Member
 
Total Posts:  4
Joined:  2009-11-02
Rostock/Germany
 

Ok this was easier than I thought. It seems as the number_of_records is also saved as a parameter in the BatchModel. So we can fix this by adding a few lines in Mage/Adminhtml/Block/System/Convert/Profile/Run.php around line 125.

$numberOfRecords $profile->getData('gui_data/import/number_of_records');
if (!
$numberOfRecords{
    $params 
$batchModel->getParams();
    
$numberOfRecords $params['number_of_records'];
}
$numberOfRecords 
$numberOfRecords $numberOfRecords 1;

This is nothing more than a quick hack and you should apply this patch at your own risk. This should better be fixed by a person with better understanding of the whole dataflow/batch process.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nafnaf1000
Sr. Member
 
Total Posts:  209
Joined:  2008-02-21
 

@Uwe Mesecke

wow. thank you for that fix.
unfortentley it id d not fix my problem......still slow as heck.

2.4 meg file 4000 line items 45min to run......I NEED HELP.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Uwe Mesecke
Jr. Member
 
Total Posts:  4
Joined:  2009-11-02
Rostock/Germany
 

hmmm according to the bug you reported the problems seems to be the remote file… perhaps you can make a cronjob that downloads the remote file before importing. Just a workaround but you wrote that local files are not a problem… so make the remote file a local one wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
nafnaf1000
Sr. Member
 
Total Posts:  209
Joined:  2008-02-21
 

yes, after more testing a see it is also a problem on import.....

buy with a local file....it errors out very fast.....successful import still deadly slow.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Uwe Mesecke
Jr. Member
 
Total Posts:  4
Joined:  2009-11-02
Rostock/Germany
 

just guessing as I’ve never done a product import so far:

* caching enabled?
* more than one “number_of_records” at a time?
* mass updates enabled (should be in the standard magento product adapter: see this blogpost)
* webserver and database tuned? (see http://www.magentocommerce.com/whitepaper/)

you could also try enabling the profiler and look where the script is running most of the time… perhaps this can give you another hint…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Webtechnology
Jr. Member
 
Total Posts:  2
Joined:  2013-03-20
 

You can get the detail instructions for importing and exporting products in magento from here http://www.webtechnologycodes.com/how-to-import-export-data-in-magento-using-advanced-profiles. Just get the code from the blog and use it in your project.I have verified it in many versions

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top