[In-Commerce] Support for alternative currency on per-record basis

1 view
Skip to first unread message

Alexander Obuhovich

unread,
May 29, 2012, 8:45:42 AM5/29/12
to In-Portal Development
Currently all product prices in In-Commerce are stored in primary currency.

For example 100 in database means:
  • 100$ when USD is primary currency
  • 100 р. when RUB is primary currency
  • etc.
Also In-Commerce does automatic currency conversion (before it is displayed to user) based on same rule: from PRIMARY to user-selected.


I'm proposing to allow PRIMARY currency be specified in each product separately (if there is a need). This of course would only affect currency display on product detail page, but won't affect subtotal amount calculation and such code.
These other things can be done as an improved that idea version.



Ready for testing.


--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
alternative_currency_field_core.patch
alternative_currency_field_modules.patch

Alexander Obuhovich

unread,
May 29, 2012, 8:54:25 AM5/29/12
to In-Portal Development
Here are the example usage tags (presuming that products have Currency field in database, that contains ISO3 currency code):
  • <inp2:p_Field name="Price" currency="selected" currency_field="Currency"/> - display price in user selected currency and add currency sign to it
  • <inp2:p_Field name="Price" currency="field" currency_field="Currency"/> - display price in original currency from "Currency" field (despite what user have selected) and add currency sign to it
This tag still works: <inp2:p_Field name="Price" currency="primary"/>
Reply all
Reply to author
Forward
0 new messages