Jump to content

Using import to update products is too low


qq2kk

Recommended Posts

Hello,

I am new to PS and have been learning to use PS for a few weeks.

I am using CSV to update the price, qty, etc for 10000+ products but it seems the import function is too slow.  I need to update these fields daily but it is too slow because it takes an hour to process.
 

I just want to update these fields

Quote

Reference #,Status(0 Inactive/1 Active),Quantity,Weight,Price,Discount amount,Shipping Discount,Battery Type,Action when out of stock (0/1/2),Visibility
SKY02S,0,100,300,369.99,,0,,2,both
STM40,0,100,20,34.99,,3,,2,both

Is there any suggestion to modify the AdminImportController.php to speed up the processing time?

 

Alternatively, shall i just use excel to concatenate fields in SQL statements (i think i need to update these tables ps_product, ps_specific_price, ps_stock_available?) and load the file by phpmyadmin instead (and rebuild the search index manually after)? Will this work?

Or is there any recommended module to update these fields (included Customs fields)?

Thank you.

M~FJCRPA[(0K0)IOVMXV2RW.png

Edited by qq2kk (see edit history)
Link to comment
Share on other sites

The default "import product" doesn't delete the discount if the discount amount is empty, i tried to empty the table before import but it takes an hour to process the import which means there is an hour of time the shop will have incorrect price (price without discount).

Instead of checking whether there is a record in DB, i simply run the statement to delete the discounts of this product if CSV does not have a value for the discount price.

in AdminImportController.php

Quote

if ((isset($info['reduction_price']) && $info['reduction_price'] > 0) || (isset($info['reduction_percent']) && $info['reduction_percent'] > 0)) { ...

....

} else if (isset($info['reduction_price'])) {
            Db::getInstance()->delete('specific_price', 'id_product='.$product->id);
}

I don't know is there any better and appropriate fix for this. Please let me know if there is.

Edited by qq2kk (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...