Totti Posted April 14, 2015 Share Posted April 14, 2015 Hello,you can call the function to import csv from a php script ? Link to comment Share on other sites More sharing options...
selectshop.at Posted April 14, 2015 Share Posted April 14, 2015 What exactly do you want to do ? To call functions via php scripts it is better to use the webservice. If you want to import regularly a csv, so you should use a cron. Link to comment Share on other sites More sharing options...
Totti Posted April 26, 2015 Author Share Posted April 26, 2015 I want to call code from the csv import function, passing it the field mappings and the file to upload. Link to comment Share on other sites More sharing options...
selectshop.at Posted April 26, 2015 Share Posted April 26, 2015 In this case you should use and code webservice API. http://doc.prestashop.com/display/PS16/Web+service+one-page+documentation Link to comment Share on other sites More sharing options...
Totti Posted April 27, 2015 Author Share Posted April 27, 2015 I would like to directly use the class that uses prestashop to import the csv. Link to comment Share on other sites More sharing options...
selectshop.at Posted April 27, 2015 Share Posted April 27, 2015 Than create a csv, load this to your server and import it with native function on Tab: "advanced parameters -> import csv -> load csv -> map the fields -> import". If you want to make changes on the class, than you should override the native script /classes/CSV.php Automatic import you can only do with a cronjob added to your server, or with own coded webservice script. Link to comment Share on other sites More sharing options...
Totti Posted April 28, 2015 Author Share Posted April 28, 2015 Than create a csv, load this to your server and import it with native function on Tab: "advanced parameters -> import csv -> load csv -> map the fields -> import". If you want to make changes on the class, than you should override the native script /classes/CSV.php Automatic import you can only do with a cronjob added to your server, or with own coded webservice script. "Automatic import you can only do with a cronjob added to your server, or with own coded webservice script." how do you? I would like to draw a link where I pass the name of the csv upload and mapping. Link to comment Share on other sites More sharing options...
selectshop.at Posted April 29, 2015 Share Posted April 29, 2015 Oh sorry, yes in this case not possible, cause you have to map the field before, which is a case for a webservice. Another possibility for automatic import is to use Presta Store Manager + Automatic Import module. Whit this you can automatize your import for each csv added for download on the net. 1 Link to comment Share on other sites More sharing options...
Totti Posted April 29, 2015 Author Share Posted April 29, 2015 But this program does not call at the end of classes prestashop ? Thanks. Link to comment Share on other sites More sharing options...
selectshop.at Posted April 29, 2015 Share Posted April 29, 2015 No, Presta Store Manager has a direct connector to the database and automatic import module (is an extra module) is a service you map once and than automatically your csv is imported one/or more times per day/week, etc. Is like to have your data base update more than one time automatically with data from your supplier for ex. You can update all possible fields, not only the one Prestashop is calling. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now