Jump to content

Afficher prix format 00€00 au lieu de 00,00 €


Recommended Posts

Merci pour la réponse ;)

Alors justement, j'étais dessus à l'instant, mais j'y comprends rien ... c'est une usine à migraine cette fonction pour moi :/

 

Je penses que la modif doit concerner ce bloc de la fonction :

if (($c_format == 2) && ($context->language->is_rtl == 1))
			$c_format = 4;

		switch ($c_format)
		{
			/* X 0,000.00 */
			case 1:
				$ret = $c_char.$blank.number_format($price, $c_decimals, '.', ',');
				break;
			/* 0 000,00 X*/
			case 2:
				$ret = number_format($price, $c_decimals, ',', ' ').$blank.$c_char;
				break;
			/* X 0.000,00 */
			case 3:
				$ret = $c_char.$blank.number_format($price, $c_decimals, ',', '.');
				break;
			/* 0,000.00 X */
			case 4:
				$ret = number_format($price, $c_decimals, '.', ',').$blank.$c_char;
				break;
			/* X 0'000.00  Added for the switzerland currency */
			case 5:
				$ret = $c_char.$blank.number_format($price, $c_decimals, '.', "'");
				break;
		}
		if ($is_negative)
			$ret = '-'.$ret;
		if ($no_utf8)
			return str_replace('€', chr(128), $ret);
		return $ret;
	}

Si un bon samaritain à une idée  :ph34r: ,

Link to comment
Share on other sites

Salut,

 

Au niveau de la case 2 (Si tu utilises l'affichage "comme en euros"), tu peux remplacer :

$ret = $c_char.$blank.number_format($price, $c_decimals, '.', "'");

par :

$ret = number_format($price, $c_decimals, $c_char, "'");

Mais tu devras aussi modifier les fichiers JS car si t'as des déclinaisons, dès que tu en sélectionneras une, l'affichage du prix sera comme avant.

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...