Jump to content

I want to change order of "states" for a japan shop


Jeremy

Recommended Posts

Hello

I'm making prestashop shopping site in Japanese.
I want to change order of "states" in the page of address registration or change address .

It's now in alphabetical order, but I want to make it order by ISO code.

I went to the country.php and changed the name by iso code but it did not work can anyone tell what to do.

 

 

Thanks

$countries = array();

        $result = 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) $idLang.')

LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = c.`id_zone`)

WHERE 1'.($active ? ' AND c.active = 1' : '').($containStates ? ' AND c.`contains_states` = '.(int) $containStates : '').'

ORDER BY cl.name ASC');

        foreach ($result as $row) {

            $countries[$row['id_country']] = $row;

Edited by Jeremy (see edit history)
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...