Re: updating articles from csv [was: Re: Everyone on gmail is receiving the messages, but no one else is.]

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: updating articles from csv [was: Re: Everyone on gmail is receiving the messages, but no one else is.]

wvengen
Administrator
Hi Angelo,

Good steps!

In Germany and at FoodCoopNL we use the "external database" option, found on top of the supplier list (which should really become a preference to enable or not within Foodsoft). This works with the sharedlists application, which manages supplier article information. It also contains methods to synchronise this with supplier (there is a German standard using FTP, and in NL we parse email attachments).
  https://github.com/bennibu/sharedlists              (Germany)
  https://github.com/foodcoop-adam/sharedlists  (NL)
In the NL repository, look at the lib/*_file.rb files for a number of import formats (it may take some heuristics to parse article information from the spreadsheets that some farmers send).

Another way would be to use the upload articles functionality in Foodsoft. It wouldn't be hard to add support for different file formats (just like sharedlists has now). Then, after writing an import filter, you could upload articles directly from the csv (bonus if #113 were fixed to allow updating articles too). The "make articles (un)available" option would be useful here.

- Willem

On 28-09-14 09:12, Angelo [via foodsoft] wrote:
I'm trying to automate the updating of pricing and availability information from our biggest supplier.  They have a csv that they make available, so we were going have a routne to copy it into a blank table, manipulate it, then copy it to the production database.  Maybe weekly, or biweekly.  We were going to use SQL.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: updating articles from csv [was: Re: Everyone on gmail is receiving the messages, but no one else is.]

angelo
>It also contains methods to synchronise this with supplier

I thought it was just a way for users to share the work they did on rearranging supplier's databases to fit with foodsoft.

Our biggest supplier at the moment has as a huge database which is organized in the way I described in my older post about csv upload.  Could sharedlists help with this?

http://foodsoft.51229.x6.nabble.com/file/n307/foodsoft_azure.png
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: updating articles from csv [was: Re: Everyone on gmail is receiving the messages, but no one else is.]

wvengen
Administrator
On 06-10-14 21:47, angelo [via foodsoft] wrote:
>It also contains methods to synchronise this with supplier

I thought it was just a way for users to share the work they did on rearranging supplier's databases to fit with foodsoft.

Our biggest supplier at the moment has as a huge database which is organized in the way I described in my older post about csv upload.  Could sharedlists help with this?

http://foodsoft.51229.x6.nabble.com/file/n307/foodsoft_azure.png
There are three options:
  • Use Foodsoft CSV upload using a pre-selection from the supplier's articles. At this moment, you need to delete all articles, then import new CSV when updating them (#113).
  • Install sharedlists (from this fork perhaps), create user using rails console, create a supplier, write an import filter for your supplier's file-format (which could split "8 x 16 ozs" into unit="16 ozs" ans unit_quantity=8, for example) (see lib/*_file.rb), and import it (could even be automated by email or ftp).
  • Write your own script to update Foodsoft database from the supplier database. Preferably do this in rails, since that makes sure the correct database structure is maintained (like managing the ArticlePrice association). Or output a CSV, which you upload in Foodsoft.

- Willem

Loading...