Importing products along with stock levels.

Hello.
I have a CSV containing many thousands of products along with their stock levels. Is it possible to import these stock levels along with the products?

There doesn’t appear to be a predefined option for this in the import module so how would I go about modifying the module or manually adding these values to the database? (I can’t sit and add these figures through the web interface, it’ll take forever :blink: ).

Thank you.

You might want to start here, instructions on how to create your own module, then you’ll be a little more familiar with how the module works and the core files you’ll be modiying.

http://wiki.dolibarr.org/index.php/Developer_documentation#To_develop_a_new_module.2Faddon_for_GUI

I am doing something similar for a client with the CSV import function as well, but yours sounds a little less demanding. Good luck either way

i faced the same challenge;
for adding the stock manually to the database, you must have a list of row_id from products table, that you will put alongside the CSV listing of your products on a spreadsheet. make sure the file columns match the table structure of the Product_stock table, with the row_id column matches the products row_id from the products table, then import straight into the Product_stock table, using any MySQL management tool.

you have to be careful the row_id of the product matches its stock detail on the same CSV file, otherwise you might have products’ stock mixed up, like 50 for product X instead of Y. i found it easy though…