moNTeZIon Posted July 20, 2015 Share Posted July 20, 2015 (edited) Hi guys, I would like to predetermine the options on the CSV Import screen, for example: - Use field separator: "|" - Use multiple value separator: ";" - Force IDs: "YES" By this way I would avoid possible mistakes made by the end user. Thanks! Edited July 27, 2015 by moNTeZIon (see edit history) Link to comment Share on other sites More sharing options...
parsifal Posted July 27, 2015 Share Posted July 27, 2015 (edited) You can do what you ask by editing this file: /PRESTASHOP_DIR/ADMIN_DIR/themes/default/template/controllers/import/helpers/form/form.tpl FIRST, MAKE A BACKUP OF THIS FILE! Then, you should change the "value" attribute of the HTML elements with the following IDs: <input id="separator" ... /> ... <input id="multiple_value_separator" ... /> Also, for the Force ID option, you can change the following line: <input id="forceIDs" name="forceIDs" type="checkbox" /> to: <input id="forceIDs" name="forceIDs" type="checkbox" checked/> Edited July 27, 2015 by parsifal (see edit history) Link to comment Share on other sites More sharing options...
moNTeZIon Posted July 27, 2015 Author Share Posted July 27, 2015 (edited) Thanks Parsifal! Great reply! It works fine. One more option I would like to predetermine is on the second screen, the option "Lines to jump". Is set to 1, I would like to set to 0. That is possible too? Thankssssssss Edited July 27, 2015 by moNTeZIon (see edit history) Link to comment Share on other sites More sharing options...
parsifal Posted July 27, 2015 Share Posted July 27, 2015 (edited) Of course it is possible: /PRESTASHOP_DIR/ADMIN_DIR/themes/default/template/controllers/import/helpers/view/view.tpl Find the following line: <input class="fixed-width-sm" type="text" name="skip" id="skip" value="1" /> As expected, you simply change the value attribute to 0. And always, ALWAYS, make a backup of the file in question, before editing! Edited July 27, 2015 by parsifal (see edit history) Link to comment Share on other sites More sharing options...
moNTeZIon Posted July 27, 2015 Author Share Posted July 27, 2015 Great! SOLVED SOLVED SOLVED! And I've made the backup before! :D:D:D:D:D Thanksssssss Link to comment Share on other sites More sharing options...
parsifal Posted July 27, 2015 Share Posted July 27, 2015 Happy to help! Link to comment Share on other sites More sharing options...
Recommended Posts