0

In drupal commerce, I have a product variation type with a price. In the 'manage display' area, in the 'format' section I have 'strip trailing zeroes' selected.

My prices are all either whole dollar amounts or half dollar amounts, for example $5.00 or $9.50. With 'strip trailing zeroes' selected, whole dollar amounts are displayed as expected: $5. However, half dollar amounts are displayed as $9.5.

How can I configure half dollar amounts to be displayed as $9.50 while whole dollar amounts display as $5?

  • Seems like you discovered a bug, unless they intended to work like this when there is only one zero which is odd if you ask me. You could report this as a bug and see what the maintainers say, or simply programmatically create your custom format. – No Sssweat May 9 at 2:28
  • Thanks for your reply @NoSssweat, much appreciated. I'll add a bug report to the issue queue on drupal.org and will investigate how to create a custom format. – Sameer May 10 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.