Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

auto mysql upload??


bowen

Recommended Posts

HI,

 

Does any1 know of a script that can automatically upload a database so it can be set into a cron-job??

 

i.e.

 

our works database is on navision software which can export .csv files complete with all the product info/prices ect ect.... as our products and stock holdings are consantly changing so i need a script that runs automatically, which talks to our servers at our location, then uploads the images and csv file to the web servers which then drops the content then reloads the new content leaving the database intact but with all the current products/prices and stock ect??? as the vast ammount of our time is spent changing the databases ect.

 

i have a bulk upload contribution but not sure how i can do it the way i need...

 

i really hope sum1 can help.....

 

thanks in advance....,....

Link to comment
Share on other sites

A better idea would be to custom write a script to re do the DataBase entries and either add to them or update the via a cron which you set up. Since the info is in CVS format, this should not be a difficult thing to do, and would not be dependant on the specialized form that EP (easy populate) needs.

 

I have made up several for clients and and after fiddling with EP several times, dropped the idea and now use my own as it is far more versitile to deal with issues like this. My suggestion is to do the same, custom write a utility to deal with this rather then trying to use a tool which was not designed to do this....

 

cheers,

Peter M.

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

A better idea would be to custom write a script to re do the DataBase entries and either add to them or update the via a cron which you set up. Since the info is in CVS format, this should not be a difficult thing to do, and would not be dependant on the specialized form that EP (easy populate) needs.

 

I have made up several for clients and and after fiddling with EP several times, dropped the idea and now use my own as it is far more versitile to deal with issues like this. My suggestion is to do the same, custom write a utility to deal with this rather then trying to use a tool which was not designed to do this....

 

cheers,

Peter M.

Why you're refering to EP??

Link to comment
Share on other sites

HI,

 

Thanks for the ideas.

 

I have a cron job script with my hosts (although it is limited to 1 cron job) but i need to have the file automatically sent from the pc. up to the web server then for the script to auto drop the content (all the product info) and repopulate with the current stock ect.

 

i will be able to figure out the tables ect but its how to get it automatically pulled from pc to server to run the update. and also to have a command that exports orders in csv format back to pc without the need to run upload/downloads??

 

thanks

Link to comment
Share on other sites

Why you're refering to EP??
Because EP is generally what is used to populate the catalog with products, the product info ect. EP reads an excel file (which is really a CVS file) and repopulates the cart system.

 

 

i will be able to figure out the tables ect but its how to get it automatically pulled from pc to server to run the update. and also to have a command that exports orders in csv format back to pc without the need to run upload/downloads??
We ran a FTP utility which automatically FTP'ed the file up to the server daily, at a set time, then the script (CRON run) reads the folder and if a file exists, then reads the files and performs the necessary DB manipulations, then moves the file to a completed folder.

 

This same example could be used to download I would imagine, but never really tried to download as well, but I am sure the FTP programs out there could be set up with a sceduled task to do this daily as well....

 

cheers,

Peter M.

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

Because EP is generally what is used to populate the catalog with products, the product info ect. EP reads an excel file (which is really a CVS file) and repopulates the cart system.

My comment and contribution link was setting up a cron job. Nothing to do with EP.

 

I would prefer the controls to be with the osc Admin. Otherwise I mean you can use phpmyadmin to import whatever you like. So setup a script that has no time-out dependencies (can imports a number of products at a time) and then make sure all dependent product tables are synchronized. There is a tips and tricks thread for CSV import along with other comments in the forum. There is a also a number of csv modules apart of the ep that you can use/modify.

http://www.oscommerce.com/community/contributions,401

http://www.oscommerce.com/community/contributions,485

 

So scripts like these can be simply linked with a cron job. Why you want to do ftp btw? If it's to update the database from various manufacturers, I would prefer to make the script reading from another server if necessary through an XML feed or something similar.

Link to comment
Share on other sites

My comment and contribution link was setting up a cron job. Nothing to do with EP.
That is fine, I was commenting on the EP and setting it up is all ;)

 

I would prefer the controls to be with the osc Admin. Otherwise I mean you can use phpmyadmin to import whatever you like.
Yes, but you can not automate MyAdmin very easily to deal with it. And a CRON job, I just set them up and forget them, I do not need osC to manage them, as they are independant of osC generally....

 

There is a also a number of csv modules apart of the ep that you can use/modify.
Generally each CVS must be modified to manage the various ways the data is presented in the file, if there is a basic file from which to start from even better :)

 

Why you want to do ftp btw? If it's to update the database from various manufacturers, I would prefer to make the script reading from another server if necessary through an XML feed or something similar.
Not my requirement, he want to go from PC to the server and vise-versa. I too would use XML or some other feed based system to do this if I were to automate it totally ;)

 

cheers,

Peter M

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

Hi,

 

I have got some ftp software which can use timed up/dowloads so i will work around that.

 

XML would probably be the best option but unfortunately i dont know the first thing about XML. ;) I will have to use the methods i know about for now and will get myself an XML book to work try and work it out.

 

to have it fully automated would be better for us because we can have an automatic output from our software (microsoft navision) which an do daily exports of current stock lines, quantites descriptions, prices, rrp's ect in an csv file. this then needs to be automatically loaded to our web server then into the MySql database to show as stock on the site.

 

The download side would be a different file (but still in csv) for our 'wholesale' customers. we are trying to have an online returns document so if a retail shop wishes to return products for whatever reason they fill in an online form with info we need, then this is 'pushed' back to our computers which can be picked up by navision and imported to our system automatically cuttin down a few days a week keying in returns.

 

its a task and a half but i'll keep cracking on.

 

:thumbsup: thanks to all for your help (and if any1 knows of an xml script with a how to guide to help me along the easy route then please let me know) :rolleyes:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...