jbibinet Posted October 10, 2013 Share Posted October 10, 2013 Hello, We are working with prestashop 1.5.4 I would like to know how to change the defaut country (france) in the registration form for new customers. Anyone has done it before? Jack Link to comment Share on other sites More sharing options...
vekia Posted October 10, 2013 Share Posted October 10, 2013 hello change default language in localization tab in your back office you've got more countries active ? (localization > countries) Link to comment Share on other sites More sharing options...
jbibinet Posted October 10, 2013 Author Share Posted October 10, 2013 Hello, I have all zone 1 countries activated. We are in switzerland, so when a customer register, he has France in th e first place and the it is sort in alphabetical order. I would like to put Switzerland in the first place. Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted October 10, 2013 Share Posted October 10, 2013 Hi, you need override Country::getCountries() method and change order direction from ASC to DESC: foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT cl.*,c.*, cl.`name` country, z.`name` zone FROM `'._DB_PREFIX_.'country` c '.Shop::addSqlAssociation('country', 'c').' LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int)$id_lang.') LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = c.`id_zone`) WHERE 1'.($active ? ' AND c.active = 1' : '').($contain_states ? ' AND c.`contains_states` = '.(int)$contain_states : '').' ORDER BY cl.name DESC') as $country) Regards Link to comment Share on other sites More sharing options...
semseb Posted November 12, 2013 Share Posted November 12, 2013 Hello, I have exactly the same problem. I override /www/classes/country.php order direction from ASC to DESC. Do you have another solution ? Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted November 13, 2013 Share Posted November 13, 2013 Hi, did you sure that override has been applyed? Try to temporaly modify core class Country.php. Regards Link to comment Share on other sites More sharing options...
semseb Posted November 13, 2013 Share Posted November 13, 2013 Hi,Yes I just try again, it does not work, I always "France" preselected... Regards Seb Link to comment Share on other sites More sharing options...
Recommended Posts