Backend Show Main Currency - Even when order other

  • Posts: 152
  • Thank you received: 1
9 years 5 months ago #206219

Hi Guys,

One of the updates in 2.5
We store the currency rate of the currency when the order is created if the currency is not the main one

So I'd like to make use of this in the backend so all orders can be tracked in one currency. How? at the moment if I have the main currency in ZAR - if I switch to USD (front-end currency switcher) the order in the back shows in USD - I'd like to see it in ZAR

How?


Believe in Better

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
9 years 5 months ago #206224

Hello,
Can you tell me through some screenshots for example where do you exactly want to switch the displaying of the currency ?
Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 1
9 years 5 months ago #206298

Hi,

In the orders listing page -that shows all orders, there is a column for Total - in there :), it would be great if I can see the order listed in the currency they paid and then the site currency value next to it in brackets..

So at the moment its in USD but the site currency is ZAR. So it would be great if it was like: $100 (R1000) - but with the correct exchange value for the time of purchase


Believe in Better

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
9 years 4 months ago #206318

Hello,
To do what you want you'll have to directly edit hte code of the "listing" file of the "order" view of your back-end template via "Hikashop->Display->Views" and change these lines :

<td class="hikashop_order_total_value">
	<?php echo $this->currencyHelper->format($row->order_full_price,$row->order_currency_id);?>
</td>

Last edit: 9 years 5 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 1
9 years 4 months ago #206460

Thank you Mo, could you be so kind as to provide the code that I should change it to? I have found the line - but dont know what to put there instead?


Believe in Better

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 4 months ago #206572

You can do like that:

<td class="hikashop_order_total_value">
	<?php echo $this->currencyHelper->format($row->order_full_price,$row->order_currency_id);?> (<?php echo $this->currencyHelper->format($this->currencyHelper->convertUniquePrice($row->order_full_price,$row->order_currency_id,hikashop_getCurrency()),hikashop_getCurrency());?>)
</td>
And that will convert the price with the current currency rate.

The following user(s) said Thank You: nowherenowhere

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 1
9 years 4 months ago #206603

Thank you Nic!

Could I also pull this into some of the other views? Like the invoice PDF and order details view?


Believe in Better

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
9 years 4 months ago #206612

Hello,
For the Invoice PDF changing these lines through the "plugins/hikashop/attachinvoice/attachinvoice/invoice.php" file :

<td colspan="3" class="newarea">
	<?php echo JText::_( 'HIKASHOP_TOTAL' ); ?>
</td>
<td  class="price" >
	<?php echo $currencyHelper->format($order->order_full_price,$order->order_currency_id); ?>
</td>
by :
<td colspan="3" class="newarea">
	<?php echo JText::_( 'HIKASHOP_TOTAL' ); ?>
</td>
<td  class="price" >
	<?php echo $currencyHelper->format($order->order_full_price,$order->order_currency_id);?> (<?php echo $currencyHelper->format($currencyHelper->convertUniquePrice($order->order_full_price,$order->order_currency_id,hikashop_getCurrency()),hikashop_getCurrency());?>)
</td>
Will probably do the job.

The following user(s) said Thank You: nowherenowhere

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum