On the “Ref.” field, I referenced my products following a consistent format that looks like:
xxxx yy zz
xxxx = product code
yy = colour
zz = size
After a few months of using Dolibarr, I noticed that when I modify a product through the browser and saving it, it adds “_” in my Product “Ref.” field which makes my “Ref.” inconsistent.
I figured I should change how I should reference my products to play nicer with the system and decided to go with the following format:
xxxx-yy-zz
Basically replacing the spaces with “-”.
I created a .CSV file with the above modifications which took roughly 10 mins. However, when I run Product Import simulation, I noticed that it is inserting new products not updating.
Is there a way to update the Product “Ref.” field via importing a .CSV file?
I think it is inserting new products because when you import the .CSV file the only available “Key (column) to use for updating existing data” is the “Ref.” column.
Other programs I have used allow me to update the equivalent of Dolibarr’s “Ref.” column without inserting because I was able to use “Technical ID” as Key (Column). However, I do not see this option in Dolibarr.
You would need to program something, or find someone who can program it for you.
You can access the API using this url under your dolibarr installation /api/index.php/explorer/#/
it requires that you have enabled the API, and that your webserver has not prohibited access to the API - which it should do unless coming from the right address.
Basically using the API someone would get all products/services - or chunks there off, and then update each product/service one by one.
You could probably export the CSV and then cut it down to 2 columns: ID and the ref you want to have it changed to, then it is basically for each line in that CSV send a short json to the API with ID and the u
Hi,
If you need help with a small Programm or importer, Just give me a note. I built a lot of importers to even import directly from exel files via API. Because the CSV importer is not enough for my tasks. Even just modify your ref would be no problem via API.