Showing what currency was used on invoice

Ask the community for help and support.
Post Reply
gsmiley007
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Has thanked: 9 times
Been thanked: 2 times

Showing what currency was used on invoice

Post by gsmiley007 »

My site defaults to USD, but i have the option to display in CAD. However when I look at the invoice, it doesn't show what currency they used. Is there a way to show what currency they paid with on the invoice?

Thanks
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: Showing what currency was used on invoice

Post by ecartz »

https://github.com/CE-PhoenixCart/Phoen ... p#L91..L92

Code: Select all

          echo '<td class="text-right">' . $currencies->format($product['final_price'] * $product['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>';
          echo '<th class="text-right">' . $currencies->format(tep_add_tax($product['final_price'], $product['tax'], true) * $product['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</th>';
It's already there. If all your orders are showing as USD, perhaps everyone is paying in USD. Alternately, perhaps you are showing both USD and CAD as $. If you adjust either the symbol left or right for at least one currency, you could distinguish it more.

You could also use the invoiceData or extraComments hooks to display the $order->info['currency'].
gsmiley007
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Has thanked: 9 times
Been thanked: 2 times

Re: Showing what currency was used on invoice

Post by gsmiley007 »

Sorry to be clear, the customers are choosing to display and purchase using CAN dollars. So the invoices are showing in Canadian, when I look at the invoices in the store, i don't know which currency they used.

Both US and Can put the $ in the front, so adjusting the symbol would look weird to customers.

I'm not really a php coder, so i dont know how to use invoicedata or extra comment hooks
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: Showing what currency was used on invoice

Post by ecartz »

gsmiley007 wrote: Mon May 17, 2021 2:19 am Both US and Can put the $ in the front, so adjusting the symbol would look weird to customers.
I mean that you could change one or both like US$/CA$ (symbol left) or $1 USD/$1 CAD (symbol right).
Xpajun
VIP Member
VIP Member
Posts: 104
Joined: Thu Mar 04, 2021 1:18 pm
Has thanked: 2 times
Been thanked: 6 times

Re: Showing what currency was used on invoice

Post by Xpajun »

I use $ for USD A$ for AUD and would use C$ for CAD if I had it on my store
Current Store is now running 1.0.7.5 - php 7.3.24
Now working on 1.0.8.19 - php 7.3.24
Xpajun
VIP Member
VIP Member
Posts: 104
Joined: Thu Mar 04, 2021 1:18 pm
Has thanked: 2 times
Been thanked: 6 times

Re: Showing what currency was used on invoice

Post by Xpajun »

Or you could keep The $ as the prefix and then USD or CAD as the suffix - just tried it on 1.0.7.5 and it works there so should work on any versions after that build
Current Store is now running 1.0.7.5 - php 7.3.24
Now working on 1.0.8.19 - php 7.3.24
gsmiley007
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Has thanked: 9 times
Been thanked: 2 times

Re: Showing what currency was used on invoice

Post by gsmiley007 »

That works, i think they strip out the space, so I can't have $134 CAN but $134CAN is good enough.

Thanks
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: Showing what currency was used on invoice

Post by ecartz »

gsmiley007 wrote: Mon May 17, 2021 2:36 pm That works, i think they strip out the space, so I can't have $134 CAN but $134CAN is good enough.
I think that

Code: Select all

&#32;CAD
would work.
gsmiley007
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Has thanked: 9 times
Been thanked: 2 times

Re: Showing what currency was used on invoice

Post by gsmiley007 »

Nice, thanks
Post Reply