kronoszx Posted December 31, 2016 Share Posted December 31, 2016 (edited) If you use csv import from backoffice url images import ok, from script you have to add a line to AdminImportController in fuction productImport(). where its the diferenci between internal prestashop call and from script call? trying to undestand the diference I add temporallya line echo "<br><br>fabricante: " ;var_dump($manufacturer); after line (2878) AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $manufacturer); into manufactureImport(); if I import from backoffice a csv file with only one manufacturer all ok and get this var_dump output fabricante: object(Manufacturer)#59 (33) { ["id"]=> string(1) "2" ["id_manufacturer"]=> NULL ["name"]=> string(4) "NIKE" ["description"]=> array(1) { [1]=> string(4) "NIKE" } ["short_description"]=> array(1) { [1]=> string(4) "NIKE" } ["id_address"]=> NULL but if I set an import from script i get this output from var_dump fabricante: object(Manufacturer)#25 (34) { ["id"]=> string(1) "2" ["id_manufacturer"]=> NULL ["name"]=> array(1) { [1]=> string(4) "NIKE" } ["description"]=> array(1) { [1]=> string(4) "NIKE" } ["short_description"]=> array(1) { [1]=> string(4) "NIKE" } ["id_address"]=> NULL Warning: preg_match() expects parameter 2 to be string, array given in /home/erpecdes/public_html/classes/Validate.php on line 295 why they are diferent! if I use the same csv file and same arraywalk function to set the $manufacturer array? Edited December 31, 2016 by kronoszx (see edit history) Link to comment Share on other sites More sharing options...
kronoszx Posted January 1, 2017 Author Share Posted January 1, 2017 problem solved, from outside the backoffice its necesary to redefine validators.THANKS 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