Showing what currency was used on invoice

Open to all! Ask other shopowners for help.
Post Reply
gsmiley007
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
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


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 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
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
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
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 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
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 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.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 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.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
gsmiley007
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
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
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 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
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
Has thanked: 9 times
Been thanked: 2 times

Re: Showing what currency was used on invoice

Post by gsmiley007 »

Nice, thanks


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply