Showing what currency was used on invoice
-
- 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
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
Thanks
-
- Lead Developer
- Posts: 2657
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 182 times
Re: Showing what currency was used on invoice
https://github.com/CE-PhoenixCart/Phoen ... p#L91..L92
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'].
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>';
You could also use the invoiceData or extraComments hooks to display the $order->info['currency'].
-
- 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
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
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
-
- Lead Developer
- Posts: 2657
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 182 times
Re: Showing what currency was used on invoice
I mean that you could change one or both like US$/CA$ (symbol left) or $1 USD/$1 CAD (symbol right).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.
-
- VIP Member
- Posts: 113
- Joined: Thu Mar 04, 2021 1:18 pm
- Has thanked: 2 times
- Been thanked: 6 times
Re: Showing what currency was used on invoice
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.20 - php 7.3.24
Now working on 1.0.8.20 - php 7.3.24
-
- VIP Member
- Posts: 113
- Joined: Thu Mar 04, 2021 1:18 pm
- Has thanked: 2 times
- Been thanked: 6 times
Re: Showing what currency was used on invoice
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.20 - php 7.3.24
Now working on 1.0.8.20 - php 7.3.24
-
- 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
That works, i think they strip out the space, so I can't have $134 CAN but $134CAN is good enough.
Thanks
Thanks
-
- Lead Developer
- Posts: 2657
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 182 times
Re: Showing what currency was used on invoice
I think thatgsmiley007 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.
Code: Select all
 CAD
-
- Posts: 82
- Joined: Sun Mar 14, 2021 9:28 pm
- Has thanked: 9 times
- Been thanked: 2 times