Upcoming Events
NYC CiviCRM Meetup - September 7th
September 7th, 2010
This next NYC meetup will feature a case study or 2, a look at what's new in (more...)
Configuring, Customizing and Extending CiviCRM - New York
September 16th, 2010
This comprehensive two-day hands on training course is targeted at (more...)
CiviCRM User and Administrator Training - New York
September 16th, 2010
A comprehensive two day hands on training course covering the configuration, (more...)
CiviCRM Code and Test Sprint - New York
September 18th, 2010
This code and test sprint is targeted at experienced developers who want to (more...)
CiviCRM Toronto Meetup
September 21st, 2010
Come meet others from the Toronto Area who are interested in, using or (more...)
CiviCRM Philly Meetup – September 2010
September 23rd, 2010
Come meet others from the Philadelphia Area who are interested in, using or (more...)
CiviCRM Seminar - Dublin
September 28th, 2010
NfP Services are hosting a free seminar at The IBOA, Stephen St Upper, Dublin 8 (more...)
London developer and implementer training
September 30th, 2010
This comprehensive two-day hands on training course is targeted at implementers, (more...)
London user and administrator training
September 30th, 2010
A comprehensive two day hands on training course covering the configuration, (more...)
Berlin user and administrator training
October 6th, 2010
A comprehensive one day hands on training course covering the configuration, (more...)
Berlin developer and implementer training
October 7th, 2010
This comprehensive one-day hands on training course is targeted at implementers, (more...)
Benelux meetup in Brussels: Connect, communicate and activate your supporters and constituents
October 11th, 2010
Come meet others who are interested in, using or developing for CiviCRM. For (more...)
CiviCRM Toronto Meetup
October 19th, 2010
Come meet others from the Toronto Area who are interested in, using or (more...)
CiviCRM Toronto Meetup
November 16th, 2010
Come meet others from the Toronto Area who are interested in, using or (more...)
Multi-currency support for CiviCRM v2.2.3
- Not Just a Contact Database
-
These optional components give you more power to connect and engage your supporters.

civiCONTRIBUTE
Online fundraising and donor management.

civiEVENT
Online event registration and participant tracking.

civiMEMBER
Online signup and membership management.

civiMAIL
Personalized email blasts and newsletters.

civiREPORT
Report generation and template management.
The CiviCRM team is planning to hold a UK and Europe developer camp and user meetup in the last week of June 23-27 (if you are interested in attending, please do take this survey.)
A couple of months ago, we decided to run CiviCRM on the civicrm.org servers. Eating your own dog food does spur quite a bit of changes and tweaks to make the product a lot more usable :). For the event in the UK, we needed to accept payment in either euros or pounds. However we do not have multi-currency support within CiviEvent :(
Once again, Drupal hooks and custom templates to the rescue. I implemented two hooks, the buildForm hook to set the currency in the config object
function civicrm_civicrm_buildForm( $formName,
&$form ) {
if ( ( ( strpos( $formName, 'CRM_Event_Form_Registration_' ) !== false ) && ( $form->getVar( '_eventId' ) == 1 ) ) ||
( ( strpos( $formName, 'CRM_Contribute_Form_Contribution_' ) !== false ) && ( $form->getVar( '_id' ) == 1 ) ) ) {
civicrm_set_currency( $form );
}
}
function civicrm_set_currency( &$form ) {
static $processed = false;
if ( $processed ) {
return;
}
$processed = true;
$currency = CRM_Utils_Request::retrieve( 'currency', 'String', $form, false, 'GBP' );
$config =& CRM_Core_Config::singleton( );
if ( strtoupper( $currency ) == 'EUR' ) {
$config->defaultCurrency = 'EUR';
} else {
$config->defaultCurrency = 'GBP';
}
return $config->defaultCurrency;
}
and the buildAmount hook to modify the amount based on the currency chosen
function civicrm_civicrm_buildAmount( $pageType,
&$form,
&$amount ) {
// only modify the event pages for the UK event
if ( $form->getVar( '_id' ) == 1 ||
$form->getVar( '_eventId' ) != 1 ) {
$currency = civicrm_set_currency( $form );
// as of may 5th: 1 USD = 0.75 EUR, 1 USD = 0.667 GBP
$ratio = ( $currency == 'EUR' ) ? 0.75 : ( 2.0 / 3.0 );
foreach ( $amount as $amountID =>& $amountInfo ) {
$amountInfo['value'] = ceil( $amountInfo['value'] * $ratio );
}
}
}
I also needed a way to allow folks to switch to the currency of their choice. I created a custom template for that event and added the following section to the Register.tpl file just above the payment options
{if $config->defaultCurrency eq 'EUR'}
{ts}If you want to pay in pounds, click {/ts}<a href="{crmURL p='civicrm/event/register' q="reset=1&id=`$event.id`¤cy=GBP"}"title="{ts}Pay for Camp in pounds.{/ts}">{ts}here{/ts}</a>
{else}
{ts}If you want to pay in euros, click {/ts}<a href="{crmURL p='civicrm/event/register' q="reset=1&id=`$event.id`¤cy=EUR"}"title="{ts}Pay for Camp in euros.{/ts}">{ts}here\{/ts}</a>
{/if}
Finally i had to go in and make some changes to some of the core files to allow multiple currencies and group together currencies of the same type. I made the required changes to the contribution search and summary screens. I think I've got most of it. Some of the issues filed for this feature are here:
Allow hooks to control defaultCurrency
Add multi currency support to CiviCRM
Participant record does not have a fee_currency field
Big tip of the hat to Tom (mrfelton on #civicrm) for his initial thoughts and ideas on how to go about addressing this issue







Comments
hi did you finish this one or
hi did you finish this one or else working
How can I use this information?
How can I use this information to build an event that works with Euros while the default currency of my site is USD?
mrfelton on #civicrm = Tom,
mrfelton on #civicrm = Tom, not Ken! but thanks all the same!!