Jump to content

How to modify defaut country (france)


Recommended Posts

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

  • 1 month later...
×
×
  • Create New...