Jump to content

Adjust the position of the currency options


Recommended Posts

in this case it will be necessary to alter currency class (classes/Currency.php)

there is a funciton

	public static function getCurrencies($object = false, $active = true, $group_by = false)
	{
		$tab = Db::getInstance()->executeS('
		SELECT *
		FROM `'._DB_PREFIX_.'currency` c
		'.Shop::addSqlAssociation('currency', 'c').
		' WHERE `deleted` = 0'.
		($active ? ' AND c.`active` = 1' : '').
		($group_by ? ' GROUP BY c.`id_currency`' : '').
		' ORDER BY `name` ASC');
		if ($object)
			foreach ($tab as $key => $currency)
				$tab[$key] = Currency::getCurrencyInstance($currency['id_currency']);
		return $tab;
	}

change order by name ASC to order by name DESC

Link to comment
Share on other sites

in this case it will be necessary to alter currency class (classes/Currency.php)

there is a funciton

	public static function getCurrencies($object = false, $active = true, $group_by = false)
	{
		$tab = Db::getInstance()->executeS('
		SELECT *
		FROM `'._DB_PREFIX_.'currency` c
		'.Shop::addSqlAssociation('currency', 'c').
		' WHERE `deleted` = 0'.
		($active ? ' AND c.`active` = 1' : '').
		($group_by ? ' GROUP BY c.`id_currency`' : '').
		' ORDER BY `name` ASC');
		if ($object)
			foreach ($tab as $key => $currency)
				$tab[$key] = Currency::getCurrencyInstance($currency['id_currency']);
		return $tab;
	}

change order by name ASC to order by name DESC

 

 

 

Hi Vekia,

 

Thank you so much for your help!

Link to comment
Share on other sites

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