Answers.Body: <p>The current formatter looks at the currency's format and the current locale of the user. What locale are you set to?</p>
  
  <p>You can drop the zeros with the stripZeros param in the currencyConvert filter. See docs here: <a href="https://craftcommerce.com/docs/twig-filters" rel="nofollow noreferrer">https://craftcommerce.com/docs/twig-filters</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-14T11:05:46.057Z
Answers.Text: The locale was set to English, whereas this will be a French website. So the currency format is now correct, thank you!
  
  But unfortunately this still doesn't work for dropping the zeros : `{{ product.variants[0].salePrice | commerceCurrency(cart.currency, stripZeros = true) }}`. Do you have any idea of what's going wrong, or should I contact the Craft Commerce support for this?
Answers.UserDisplayName: Romain P.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-15T09:36:44.383Z
Answers.Text: The twig filter params are positional like php function params. If you want to strip zeros you need that param in the fourth position.
Answers.UserDisplayName: Luke Holder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-16T09:06:34.223Z
Answers.Text: Thank you, but I forgot to mention that I tried all of these possibilities, and none works for me to drop the zeros.
  
  `{{ product.variants[0].salePrice | commerceCurrency(cart.currency, stripZeros = true) }}`,
  `{{ product.variants[0].salePrice | commerceCurrency(cart.currency, convert=true, format=true, stripZeros=true) }}`,
  `{{ product.variants[0].salePrice | commerceCurrency('EUR', convert=true, format=true, stripZeros=true) }}`.
Answers.UserDisplayName: Romain P.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-17T08:47:21.750Z
Answers.Text: I finally contacted the Craft support and Brad told me that they recently fixed a bug (again) around this. He sent me a new NumberFormatter.php file (located in craft/app/etc/i18n) which fix this issue and that should be included in the next plugin update.
Answers.UserDisplayName: Romain P.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-10T22:13:37.223Z
Answers.LastActivityDate: 2016-11-10T22:13:37.223Z
Answers.UserDisplayName: Luke Holder
Body: <p>Using commerceCurrency filter from the Craft commerce plugin, how can I add the currency name after the price instead of before the price, and drop the zeros when not necessary ?</p>
  
  <p>For example :</p>
  
  <pre><code>{{ product.variants[0].salePrice | commerceCurrency(cart.currency) }}
  </code></pre>
  
  <blockquote>
    <p>€68.00</p>
  </blockquote>
  
  <p>How can I output this :</p>
  
  <blockquote>
    <p>68€</p>
  </blockquote>
  
  <p>Thank you!</p>
  
Tags: <templating><plugin-craftcommerce><filter>
Title: How to set the commerceCurrency filter in an European style
ThreadText: # How to set the commerceCurrency filter in an European style
  
  (Asked by: username_0 on 2016-11-10)
  
  Using commerceCurrency filter from the Craft commerce plugin, how can I add the currency name after the price instead of before the price, and drop the zeros when not necessary ?
  
  For example :
  
  ```
  {{ product.variants[0].salePrice | commerceCurrency(cart.currency) }}
  
  ```
  
  > €68.00
  
  How can I output this :
  
  > 68€
  
  Thank you!
  
  **Tags:** templating, plugin-craftcommerce, filter
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-11-10. Score: 1 | Accepted answer
  
  The current formatter looks at the currency's format and the current locale of the user. What locale are you set to?
  
  You can drop the zeros with the stripZeros param in the currencyConvert filter. See docs here: <https://craftcommerce.com/docs/twig-filters>
  
  > **Comments:**
  > **username_0**: The locale was set to English, whereas this will be a French website. So the currency format is now correct, thank you!  But unfortunately this still doesn't work for dropping the zeros : `{{ product.variants[0].salePrice | commerceCurrency(cart.currency, stripZeros = true) }}`. Do you have any idea of what's going wrong, or should I contact the Craft Commerce support for this?  
  > **username_1**: The twig filter params are positional like php function params. If you want to strip zeros you need that param in the fourth position.  
  > **username_0**: Thank you, but I forgot to mention that I tried all of these possibilities, and none works for me to drop the zeros.  `{{ product.variants[0].salePrice | commerceCurrency(cart.currency, stripZeros = true) }}`, `{{ product.variants[0].salePrice | commerceCurrency(cart.currency, convert=true, format=true, stripZeros=true) }}`, `{{ product.variants[0].salePrice | commerceCurrency('EUR', convert=true, format=true, stripZeros=true) }}`.  
  > **username_0**: I finally contacted the Craft support and Brad told me that they recently fixed a bug (again) around this. He sent me a new NumberFormatter.php file (located in craft/app/etc/i18n) which fix this issue and that should be included in the next plugin update.  
  
  ---
  
  