1

If I use the following format to show an item price:

.defaultVariant.salePrice|currency('GBP')

or

.defaultVariant.salePrice|commerceCurrency(cart.currency)

the website is returns as:

9,99 £

Instead of what is expected:

£9.99

Has anyone ever seen this before? I am using Craft CMS 3.28 and Commerce Pro 2.1.10.

  • I think this is very likely to be a locale issue - see: craftcms.stackexchange.com/questions/22179/… – Jeremy Daalder Aug 5 at 2:24
  • Yes, I think you are correct. I have setup the same dev environment on another PC and its showing correctly so something is up on that machine. I cannot mark your response as an answer to give you the rep so mentioned you below. If you wanted to post it as an answer, I will edit. Thanks for your help! – Shaun Hall Aug 5 at 10:44
  • 1
    It converted my 'trivial response' to a comment. I can live without the points :) – Jeremy Daalder Aug 12 at 1:18
1

As Jeremy Daalder pointed out, Its the local system settings causing this. A workaround is available in the link he posted.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.