Admin Order Manager, Display charge to reflects country $

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
TTMedia
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 83
Joined: Mon Dec 03, 2007 11:49 am

Admin Order Manager, Display charge to reflects country $

Post by TTMedia » Thu Nov 20, 2008 3:41 pm

We provide currency transactions in US and CA, and would like to see the orders in Order Manager (admin) to show the charge that was done to the customer for their rate.

Ex. Any Canadian order would show all the values as CAD in the order manager pages, Vice versa for US Customers. All International Customers would see USD.

The fix in the email template was to change to "ulc" but that does not work in the Order Manager pages.. it only show CA pricing across the board (for US orders as well).

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Admin Order Manager, Display charge to reflects country $

Post by mazhar » Fri Nov 21, 2008 5:39 am

Well the "ulc" means user local currency so if you use the ulc on the admin side then all orders will be shown in the admin user's local currency.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Admin Order Manager, Display charge to reflects country $

Post by mazhar » Fri Nov 21, 2008 6:32 am

You can write your own ToString conversion function that return the information depending upon the local currency of the user who placed the order. For example you can create a custom function that takes the price and the user of the order and returns the price string depending upon the currency setting of the user. For example check the ToString function in attached helper class. Place this class in the App_Code and then use it by passing a user and a price value. For example

Code: Select all

Order order = OrderDataSource.Load(199);
foreach(OrderItem oi in order.Items)
{
if (oi.OrderItemType == OrderItemType.Product)
                Response.Write(oi.Price.ToString();//CHelper.ToString(order.User,oi.Price));
}

Post Reply