Email template invoice variable always displays US currency sign

joshua's Avatar

joshua

Feb 16, 2011 @ 01:22 PM

Even though my currency is set to euros, the invoice template generated by {$invoice.asciiLayout} shows a dollar sign for the amounts. Can this be changed?

Joshua

  1. Support Staff 1 Posted by Marc Guyer on Feb 16, 2011 @ 02:15 PM

    Marc Guyer's Avatar

    It certainly can be changed. We can go two ways:

    1. Customize the invoice entirely.
    2. Wait for us to deploy a patch to change the currency on the convenience var.

    For the first option, there are some KB Articles and an example:

    https://gist.github.com/800598#file_invoice_layout.txt
    http://support.cheddargetter.com/kb/operational-how-tos/email-notif...
    http://support.cheddargetter.com/kb/operational-how-tos/email-notif...

    For the second option, we'd be happy to expedite a patch through deployment.

    Just let us know how you'd like to proceed.

  2. 2 Posted by joshua on Feb 16, 2011 @ 08:10 PM

    joshua's Avatar

    I'll look into customizing the invoice, but it may be interesting to patch as there are a few other places where it shows up in dollars, like the customer invoice history GUI.

  3. 3 Posted by joshua on Feb 16, 2011 @ 08:10 PM

    joshua's Avatar

    To be clear, I would prefer the patch but if it needs more than a day, I'll customize the invoice. Let me know!

  4. Support Staff 4 Posted by Marc Guyer on Feb 16, 2011 @ 09:32 PM

    Marc Guyer's Avatar

    It would unfortunately be a bit longer than a day. Probably a week.

  5. 5 Posted by joshua on Feb 17, 2011 @ 07:20 PM

    joshua's Avatar

    Does the invoice variable $charge.eachAmount display without a dollar sign? Also, is there a way to quickly test this?

  6. Support Staff 6 Posted by Marc Guyer on Feb 17, 2011 @ 07:48 PM

    Marc Guyer's Avatar

    Does the invoice variable $charge.eachAmount display without a dollar sign?

    Correct.

    Also, is there a way to quickly test this?

    The "Payment Receipt" preview contains some fake charges. You should be able to see it there if you've specified charges in the template. Maybe something like this:

    {foreach from=$charges item="charge"}
        {if $charge.type == 'recurring'}
            Subscription: {$charge.eachAmount|string_format:"%01.2f"}
        {elseif $charge.type == 'setup'}
            Setup Fee: {$charge.eachAmount|string_format:"%01.2f"}
        {elseif $charge.type == 'item'}
            {$charge.description}: {$charge.quantity}@{$charge.eachAmount} = {$charge.quantity*$charge.eachAmount|string_format:"%01.2f"}
        {elseif $charge.type == 'custom'}
            {$charge.description}: {$charge.quantity}@{$charge.eachAmount} = {$charge.quantity*$charge.eachAmount|string_format:"%01.2f"}
        {/if}
    {/foreach}
    
  7. 7 Posted by Gavin on May 23, 2011 @ 10:25 PM

    Gavin's Avatar

    Any plans on patching up the templates to support rendering other currencies?

    Thanks,
    Gav

  8. 8 Posted by nikolas on Sep 26, 2011 @ 02:07 PM

    nikolas's Avatar

    Can you please apply option 2 (deploy a patch) to our product with the code betmate? All currency info should be EUR instead of $.

    Thank you.

  9. Marc Guyer closed this discussion on Sep 14, 2016 @ 01:20 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac