Currency formatting bug in email confirmation?

This forum is for questions and issues arising from the use of AbleCommerce 7.0 outside the United States. International purchases of AbleCommerce 7.0 are way up. Thank you!
Post Reply
danielb
Ensign (ENS)
Ensign (ENS)
Posts: 5
Joined: Tue Apr 29, 2008 5:27 pm

Currency formatting bug in email confirmation?

Post by danielb » Mon May 12, 2008 12:37 pm

Hey.

When the store is set to use another currency than USD, the email's from the checkout confirmation is still sent with USD formatting. Eg. $249.00 instead of Kr 249,00 (we use Norwegian Kroner - NOK - Kr in our store)

Looks like the methods that's sending the comfirmation email don't check the store settings, but use whatever is set as globalization default for the server/site.



Daniel

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Currency formatting bug in email confirmation?

Post by Logan Rhodehamel » Tue Jun 24, 2008 12:26 pm

Darn, the default email content is not correct.

If you go to Configure -> Email -> Email Templates you can edit the email content.

In the order notification email, you'll find code like this:

Code: Select all

$orderItem.ExtendedPrice.ToString("C")
The "C" is the problem, it actually should have this:

Code: Select all

$orderItem.ExtendedPrice.ToString("lc")
So if you replace all instances of ("C") with ("lc") you'll get the properly formatted currencies in your email.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

Post Reply