[ic] Correcting the products database

Gort IC icgort33 at gmail.com
Sat Jan 16 00:25:54 UTC 2016


On Sat, Jan 16, 2016 at 5:43 AM, David Etheredge <David_e at charter.net> wrote:
> Using IC 5.10.0 and Strap
>
> #1) I would like to be able to load products from the products.txt file
> rather than use the items editor. This allows me to make changes using a
> spreadsheet. How can I tell interchange to read the products.txt file  and
> if there are changes, dump the database file and rebuild from products.txt?
> The import function only adds new products and the delete items function
> fails.

I have a couple of clients on Windows machines who export their
products from their POS systems as CSV file into a designated
directory on their local machine.

I had them install an FTP program that looks for new files in that
directory and then auto uploads them to a directory on the server.

On the server a bash script via cron looks for the new CSV file. When
a new CSV file is detected the scripts manipulates the file (adds
column names, converts to unix line endings etc), backs up then
replaces the existing products.txt file, deletes .products.sql and
restarts the catalogue (which then replaces all product data in
mysql).

I have a both an older IC foundation based catalog and strap catalog
that this works well for. The store owner only needs to export their
data as CSV and the rest is pretty much automated.

Replacing products.txt, removing .products.sql and restarting the
catalogue has been a standard operation in IC going back to minivend.
What can get you into trouble however is duplicate skus or a bad row
of data so I always backup products.txt first as an error can be fatal
as the catalogue might not restart correctly.



More information about the interchange-users mailing list