------------------------------------------------------------------------------
README.txt
------------------------------------------------------------------------------
This module is a modification of uc_multicurrency by Tim Rohaly with 
code also from Ubercart CCK currency. We have taken out code that was not 
needed for our use. Store administrators can determine which currencies the 
store will support. They can set the converation rate between currencies. 
If the store administrator does not set the conversion rate, using 
currency API, the module gets the rate from Yahoo! Finance. The module creates 
a "Currency selection block" that allows users to set the currency they would 
like to purchase in. 

Code works with PayPal, Cybersource but modules and Ubercart code has to be modified (patches supported).

Current author: Kiran Joshi working for Maxus Media & Software Pte. Ltd.
Original author: Tim Rohaly
Cache support added: Anton Lyakh working for Soft Industry LTD

------------------------------------------------------------------------------
Module dependencies
------------------------------------------------------------------------------
Currency API (http://drupal.org/project/currency)
Ubercart (http://drupal.org/project/ubercart)


------------------------------------------------------------------------------
Installation
------------------------------------------------------------------------------
1) Unpack folder into appropriate modules directory inside Drupal
2) First enable the module "Currency API"
3) Only after enable the module "Ubercart Multi-Currency"
4) Apply required patches to Ubercart (see below)
5) Go to "Administer -> Site building -> Block" 
  a) Enable "Currency Selection" to the region you want to display in 
6) To add and setup currencies go to "Store administration -> Configuration -> Multi-Currency Settings"

------------------------------------------------------------------------------
What works out of the box?
------------------------------------------------------------------------------
Store administrators can select which currencies the store supports.
Store administrators can set conversion rates between currencies.
Store administrators can allow automatic updated conversion rates.
Store administrators can show the currency selection block to allow users to
  choose which currency they want to view the prices in.
Price displays work for shopping cart 
  (the block, the forms, the update quantity forms).
The currency, conversion rate and other information is saved with the orders.


------------------------------------------------------------------------------
What changes are required?
------------------------------------------------------------------------------
Ubercart code needs to be patched in order for this module to work.
Patches are supplied with this module in the 'patches' directory (currently for ubercart-6.x-2.7).

Patch apply example:
1. Go to a directory where the patched file is located, for example ./sites/all/modules/ubercart/uc_order for the file uc_order.admin.inc.
2. Run command:
patch uc_order.admin.inc < /path/to/uc_multi_currency/patches/uc_order.admin.inc.patch


Required patches:
 uc_order.admin.inc - for "View orders" page (location ./ubercart/uc_order).
 uc_price.inc - in current uc_price() version no changes where made to $options, so a currency sign was lost (location ./ubercart/uc_store/includes).
 uc_quote.module - recalculate shipping value when changing currency at checkout page (location ./ubercart/shipping/uc_quote).

Optional patches:
 uc_paypal.module, uc_paypal.pages - for PayPal (location ./ubercart/payment/uc_paypal)
 uc_cybersource.module - for CyberSource (location ./ubercart/payment/uc_cybersource)

Currently there are patches only for PayPal and CyberSource payment modules. 
Other payment modules that use and pass currency must be patched too.

--------------------------------------
If you are theming and need to display the price with the converted value:
Ubercart calls a php function called uc_price. It needs "$context" info
to help the function know how to manipulate the price and display.
If you check the theme function, it's probably already sending "$context".
If not, you need to create it. If it' there, you might need to edit it.
If you want converted prices, $context should be:
  $context = array(
    'revision' => 'themed',
    'type' => 'product',
  );

Then, when uc_price is called, make sure $context is sent:
  uc_price($price, $context);

------------------------------------------------------------------------------
Limitations
------------------------------------------------------------------------------
This module does not link country to the currency. If you want to link the
user country to the currency, you will need to handle that seperately.

There has been no testing with VAT, discounts or other aspects that affect 
price. Part of the problem is that Ubercart was not designed to handle a 
store selling a single product in multiple currencies. So further testing
will be required with other modules.

------------------------------------------------------------------------------
Cache implementation
------------------------------------------------------------------------------
The caching support is made by taking workflow from Drupal after hook_boot().
The cache logic is reworked so that pages are stored in the cache table with currency added to its cid.
For example http://devel.com/USD or http://devel.com/nodeEUR.

