Magento Forum

   
Poll
Do you think the product import in Magento is too slow?
Yes, it should be improved! 613
No, it’s fine. There are more important things to work on. 19
What are you talking about? 1
Total Votes: 633
You must be a logged-in member to vote
Import Speed / Performance optimization
 
michael_g08
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2009-03-06
Ukraine
 

On the one of the hosts problem is been solved by moving script and csv file out of magento category. Up one or two levels

 
Magento Community Magento Community
Magento Community
Magento Community
 
sphays
Jr. Member
 
Total Posts:  6
Joined:  2009-06-10
 

Update...I was able to finally get passed this error. We were using a wildcard to grant access privileges from any domain, but for some reason had to grant access from the specific domain (IP address, or alias name, etc...). This allowed the script to make it to the next error smile that we can probably track down and fix pretty quickly regarding column name mismatches:

Fatal error: Uncaught exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘store’ in ‘field list’’ in /home/sstaley/public_html/test29464/lib/Zend/Db/Statement/Pdo.php:238 Stack trace: #0 /home/sstaley/public_html/test29464/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array) #1 /home/sstaley/public_html/test29464/lib/Zend/Db/Adapter/Abstract.php(457): Zend_Db_Statement->execute(Array) #2 /home/sstaley/public_html/test29464/lib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query(’LOAD DATA INFIL...’, Array) #3 /home/sstaley/public_html/test01.php(62): Zend_Db_Adapter_Pdo_Abstract->query(’LOAD DATA INFIL...’) #4 /home/sstaley/public_html/test01.php(20): updateTempTableFromFile(Object(Zend_Db_Adapter_Pdo_Mysql), ‘/import/sam.csv’) #5 {main} thrown in /home/sstaley/public_html/test29464/lib/Zend/Db/Statement/Pdo.php on line 238

Thanks for the help...hopefully this will help others with a similar specific problem.

and by the way...any tips on tracking down the above issues would be great as well smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
sphays
Jr. Member
 
Total Posts:  6
Joined:  2009-06-10
 

Ok, another Update....

Finally got the script completing with no errors...but

The only value that seems to be updating is ‘qty’

My csv has the columns:
sku | price | qty | vendor | cost

(’vendor’ replaced ‘vendor_id’ in the base script and lines for ‘cost’ were added)

the temp table populates fine and has all the correct values and columns, but we just cannot get anything to update except qty.

Thanks for any help in getting this working....

 
Magento Community Magento Community
Magento Community
Magento Community
 
michael_g08
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2009-03-06
Ukraine
 

Hi sphays.

If You look on page #2 of this thread You can see another script I have posted.
It can do much more.
If You are good with PHP, MySQL, and magento API You can made changes to it. and use for Yoursef.

Regards, Michael.

 
Magento Community Magento Community
Magento Community
Magento Community
 
a-tech
Jr. Member
 
Total Posts:  1
Joined:  2009-07-27
 

Hi guys, this is my first post.

I’ve been helped so much with many of the posts on this forum, and this one looks like it will save me the most hassle I have with Magento, EXCEPT, I cant figure out for the life of me how to get this script going.

Is there some way to easily run custom scripts like these within magento?

I’ve tried to run the file with the php command in ssh (its a linux server) and I get an error regarding the pdo attribute in the driver options for the database connect.

Fatal error: Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’ in importstockcustom.php on line 9

It seems my host doesnt have mysql pdo installed, but pdo sql lite, so I changed line 18 to

$db_magento Zend_Db::factory('Pdo_Sqlite'$dbConfig);

But it doesnt seem to fix the issue.

Any help here in either dealing with the error above or perhaps an easier way to run custom scripts such as the one posted by michael_g08

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
michael_g08
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2009-03-06
Ukraine
 

@a-tech
Hi.
Than do not use Zend DB. Use simple msqli extension.

http://ua.php.net/mysqli

P.S. But Zend_DB have to work. Magento uses it.
Take a look there http://framework.zend.com/manual/en/zend.db.html#zend.db.adapter.connecting.constructor.
Maybe will help.

Regards, Michael.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CamilooLimited
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2009-08-05
Manchester, UK
 

Hello,

We have just launched a magento extension which allows easy adding, subtracting and changing of stock levels. We’ve included a video which shows how fast it is compared to using Dataflow. As its nested nicely into Magento it is user friendly.

http://www.magentocommerce.com/extension/1732/easy-stock-uploader-by-camiloo

Mark Newby,
Managing Director,
Camiloo Limited

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryry
Jr. Member
 
Total Posts:  9
Joined:  2008-11-10
 

How do I use the script ?

Please help it’s the last thing i need to get working

 
Magento Community Magento Community
Magento Community
Magento Community
 
MarkNewby
Member
 
Avatar
Total Posts:  32
Joined:  2008-10-06
MD of Camiloo Limited
 

@ryry - not sure if you mean our module or not - but it comes with full instructions, and you can email our support helpdesk if you have any problems getting started.
Apologies if you meant michael_g08’s script, just did not want to leave a question unanswered.

Mark.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryry
Jr. Member
 
Total Posts:  9
Joined:  2008-11-10
 

@Mark, sorry ment Michael’s script, alredy have custom cron-job doing update throught dataflow but it takes ages and ages and iam really stuck with this

Any help really appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
michael_g08
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2009-03-06
Ukraine
 

@ryry.
Hi, this is a wiki how to use the script: http://www.magentocommerce.com/wiki/stock_level_import_script

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryry
Jr. Member
 
Total Posts:  9
Joined:  2008-11-10
 

Thanks Michael, So do I need to just put the script in a folder and run through browser ? or do I need an api thing?

I am new to magento and php so struggling to get my head around some of it

Thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
michael_g08
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2009-03-06
Ukraine
 

1. You have to change username, password and DB name in script
2. Change path to Mage.php
3. Change path to your csv
4. Create table in Your DB - “temp_table” with fields `store` Int(32),`sku` CHAR(20), `qty` INT(32),`is_in_stock` INT(32)
5. Run script in browser.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryry
Jr. Member
 
Total Posts:  9
Joined:  2008-11-10
 

Thanks Michael, Much appreciated, great script

Thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryry
Jr. Member
 
Total Posts:  9
Joined:  2008-11-10
 

Do I need zend frame work installed to make it work, keep getting http 500 errors?
Thanks

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