rb10 Posted February 2, 2022 Share Posted February 2, 2022 (edited) hi, i have error 500 during import product file csv prestashop version 1.7.6.8 i have enable debug and see this error (attached) someone know how solve this ? Edited February 3, 2022 by rb10 solved (see edit history) Link to comment Share on other sites More sharing options...
knacky Posted February 3, 2022 Share Posted February 3, 2022 (edited) Field active must be 0 or 1, not false or true or blank. Edited February 3, 2022 by knacky (see edit history) Link to comment Share on other sites More sharing options...
rb10 Posted February 3, 2022 Author Share Posted February 3, 2022 3 hours ago, knacky said: Field active must be 0 or 1, not false or true or blank. thanks for reply, in file active is set to "1" , but still error Link to comment Share on other sites More sharing options...
ManuelAva Posted February 3, 2022 Share Posted February 3, 2022 Can you share your override of AdminImportController? Link to comment Share on other sites More sharing options...
rb10 Posted February 3, 2022 Author Share Posted February 3, 2022 40 minutes ago, ManuelAva said: Can you share your override of AdminImportController? Sure <?php @ini_set('max_execution_time', 0); define('MAX_LINE_SIZE', 0); define('UNFRIENDLY_ERROR', false); define('MAX_COLUMNS', 6); @ini_set('auto_detect_line_endings', '1'); class AdminImportController extends AdminImportControllerCore { 'active' => array('AdminImportController', 'getBoolean'), 'tax_rate' => array('AdminImportController', 'getPrice'), 'price_tex' => array('AdminImportController', 'getPrice'), 'price_tin' => array('AdminImportController', 'getPrice'), 'reduction_price' => array('AdminImportController', 'getPrice'), 'reduction_percent' => array('AdminImportController', 'getPrice'), 'wholesale_price' => array('AdminImportController', 'getPrice'), 'ecotax' => array('AdminImportController', 'getPrice'), 'name' => array('AdminImportController', 'createMultiLangField'), 'description' => array('AdminImportController', 'createMultiLangField'), 'description_short' => array('AdminImportController', 'createMultiLangField'), 'meta_title' => array('AdminImportController', 'createMultiLangField'), 'meta_keywords' => array('AdminImportController', 'createMultiLangField'), 'meta_description' => array('AdminImportController', 'createMultiLangField'), 'link_rewrite' => array('AdminImportController', 'createMultiLangField'), 'available_now' => array('AdminImportController', 'createMultiLangField'), 'available_later' => array('AdminImportController', 'createMultiLangField'), 'category' => array('AdminImportController', 'split'), 'online_only' => array('AdminImportController', 'getBoolean'), ); } 1 Link to comment Share on other sites More sharing options...
ManuelAva Posted February 3, 2022 Share Posted February 3, 2022 (edited) 9 minutes ago, rb10 said: Sure <?php @ini_set('max_execution_time', 0); define('MAX_LINE_SIZE', 0); define('UNFRIENDLY_ERROR', false); define('MAX_COLUMNS', 6); @ini_set('auto_detect_line_endings', '1'); class AdminImportController extends AdminImportControllerCore { 'active' => array('AdminImportController', 'getBoolean'), 'tax_rate' => array('AdminImportController', 'getPrice'), 'price_tex' => array('AdminImportController', 'getPrice'), 'price_tin' => array('AdminImportController', 'getPrice'), 'reduction_price' => array('AdminImportController', 'getPrice'), 'reduction_percent' => array('AdminImportController', 'getPrice'), 'wholesale_price' => array('AdminImportController', 'getPrice'), 'ecotax' => array('AdminImportController', 'getPrice'), 'name' => array('AdminImportController', 'createMultiLangField'), 'description' => array('AdminImportController', 'createMultiLangField'), 'description_short' => array('AdminImportController', 'createMultiLangField'), 'meta_title' => array('AdminImportController', 'createMultiLangField'), 'meta_keywords' => array('AdminImportController', 'createMultiLangField'), 'meta_description' => array('AdminImportController', 'createMultiLangField'), 'link_rewrite' => array('AdminImportController', 'createMultiLangField'), 'available_now' => array('AdminImportController', 'createMultiLangField'), 'available_later' => array('AdminImportController', 'createMultiLangField'), 'category' => array('AdminImportController', 'split'), 'online_only' => array('AdminImportController', 'getBoolean'), ); } Thanks. Did you do that? I guess you are trying to override $validators property but it is not syntactillay correct. You might try this <?php @ini_set('max_execution_time', 0); define('MAX_LINE_SIZE', 0); define('UNFRIENDLY_ERROR', false); define('MAX_COLUMNS', 6); @ini_set('auto_detect_line_endings', '1'); class AdminImportController extends AdminImportControllerCore { public static $validators = array('active' => array('AdminImportController', 'getBoolean'), 'tax_rate' => array('AdminImportController', 'getPrice'), 'price_tex' => array('AdminImportController', 'getPrice'), 'price_tin' => array('AdminImportController', 'getPrice'), 'reduction_price' => array('AdminImportController', 'getPrice'), 'reduction_percent' => array('AdminImportController', 'getPrice'), 'wholesale_price' => array('AdminImportController', 'getPrice'), 'ecotax' => array('AdminImportController', 'getPrice'), 'name' => array('AdminImportController', 'createMultiLangField'), 'description' => array('AdminImportController', 'createMultiLangField'), 'description_short' => array('AdminImportController', 'createMultiLangField'), 'meta_title' => array('AdminImportController', 'createMultiLangField'), 'meta_keywords' => array('AdminImportController', 'createMultiLangField'), 'meta_description' => array('AdminImportController', 'createMultiLangField'), 'link_rewrite' => array('AdminImportController', 'createMultiLangField'), 'available_now' => array('AdminImportController', 'createMultiLangField'), 'available_later' => array('AdminImportController', 'createMultiLangField'), 'category' => array('AdminImportController', 'split'), 'online_only' => array('AdminImportController', 'getBoolean'), ); } Edited February 3, 2022 by ManuelAva (see edit history) Link to comment Share on other sites More sharing options...
rb10 Posted February 3, 2022 Author Share Posted February 3, 2022 11 minutes ago, ManuelAva said: Thanks. Did you do that? I guess you are trying to override $validators property but it is not syntactillay correct. You might try this <?php @ini_set('max_execution_time', 0); define('MAX_LINE_SIZE', 0); define('UNFRIENDLY_ERROR', false); define('MAX_COLUMNS', 6); @ini_set('auto_detect_line_endings', '1'); class AdminImportController extends AdminImportControllerCore { public static $validators = array('active' => array('AdminImportController', 'getBoolean'), 'tax_rate' => array('AdminImportController', 'getPrice'), 'price_tex' => array('AdminImportController', 'getPrice'), 'price_tin' => array('AdminImportController', 'getPrice'), 'reduction_price' => array('AdminImportController', 'getPrice'), 'reduction_percent' => array('AdminImportController', 'getPrice'), 'wholesale_price' => array('AdminImportController', 'getPrice'), 'ecotax' => array('AdminImportController', 'getPrice'), 'name' => array('AdminImportController', 'createMultiLangField'), 'description' => array('AdminImportController', 'createMultiLangField'), 'description_short' => array('AdminImportController', 'createMultiLangField'), 'meta_title' => array('AdminImportController', 'createMultiLangField'), 'meta_keywords' => array('AdminImportController', 'createMultiLangField'), 'meta_description' => array('AdminImportController', 'createMultiLangField'), 'link_rewrite' => array('AdminImportController', 'createMultiLangField'), 'available_now' => array('AdminImportController', 'createMultiLangField'), 'available_later' => array('AdminImportController', 'createMultiLangField'), 'category' => array('AdminImportController', 'split'), 'online_only' => array('AdminImportController', 'getBoolean'), ); } thanks, 🙂 now seem works fine can i share with you also file csv for check is good... importa_esempio.csv Link to comment Share on other sites More sharing options...
ManuelAva Posted February 3, 2022 Share Posted February 3, 2022 (edited) 31 minutes ago, rb10 said: thanks, 🙂 now seem works fine can i share with you also file csv for check is good... importa_esempio.csv 483 B · 2 downloads Looks ok. There are examples in prestashop, where you import your products/categories/etc, that you can download. I'd suggest that you check them for comparison. Don't forget to mark this topyc as solved Edited February 3, 2022 by ManuelAva (see edit history) Link to comment Share on other sites More sharing options...
rb10 Posted February 3, 2022 Author Share Posted February 3, 2022 (edited) 2 hours ago, ManuelAva said: Looks ok. There are examples in prestashop, where you import your products/categories/etc, that you can download. I'd suggest that you check them for comparison. Don't forget to mark this topyc as solved ok, thanks !!! Edited February 3, 2022 by rb10 (see edit history) 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