View Full Version : Subscriptions - Currency
I want to know how to add another currency to the Paid Subscriptions area. I've searched but can't find anything. Can you please help?
Can anyone please help? I want to add NZ currency but no idea how.
kevcj
06-20-2007, 01:54 AM
Have you been over to www.vbulletin.com, they have better support for the core vbulletin functions.
Yeah i've asked there for almost 6 months with no answer
dannefaerd
07-06-2007, 01:15 AM
If you figure this out let me know ... I want to add it as well (same currency too!)
Dismounted
07-06-2007, 04:51 AM
Currencies are defined in each payment gateway's files.
Dismounted, that doesn't help me. I need to know how to do it.
dannefaerd, i've posted in several forums trying to find out and still haven't been able to get anyone to tell me how :( It must be possible, and surely not that hard.
Dismounted
07-06-2007, 05:54 AM
In the table 'paymentapi', edit the field 'currency'. It is a comma-separated list of currencies.
Can i do this through vBulletin?
tokenyank
07-19-2007, 08:54 AM
In includes/paymentapi/*whichever-gateway-you-want-to-use.php*
Find:
var $supported_currency = array('usd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'cad' => true);
and replace with:
var $supported_currency = array('usd' => true, 'nzd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'cad' => true);
Marco van Herwaarden
07-19-2007, 09:38 AM
even if the price of the subscription is in USD for example, the payment processor (ie. PayPal and such) could still allow the payment to be made in local currency.
In includes/paymentapi/*whichever-gateway-you-want-to-use.php*
Find:
var $supported_currency = array('usd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'cad' => true);
and replace with:
var $supported_currency = array('usd' => true, 'nzd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'cad' => true);
That didn't work :( When i go into subscriptions i still can't add a NZ sub price. As it's not shown there.
tokenyank
07-19-2007, 10:19 PM
Well, not using subs, I can't tell you exactly what to do, but the gateway files will allow NZD to be an option, then looking at admincp/subscriptions.php and seeing this:
print_cells_row(array(
$vbphrase['us_dollars'],
$vbphrase['pounds_sterling'],
$vbphrase['euros'],
$vbphrase['aus_dollars'],
$vbphrase['cad_dollars'],
$vbphrase['subscription_length'],
$vbphrase['recurring'],
$vbphrase['ccbill_subid'],
$vbphrase['twocheckout_prodid'],
$vbphrase['options']
), 1);
$direction = verify_text_direction('');
$sub['cost'][] = array();
foreach ($sub['cost'] AS $i => $sub_occurence)
{
$usd = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][usd]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['usd'], 2, '.', '') . '" />';
$gbp = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][gbp]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['gbp'], 2, '.', '') . '" />';
$eur = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][eur]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['eur'], 2, '.', '') . '" />';
$aud = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][aud]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['aud'], 2, '.', '') . '" />';
$cad = '<input type="text" class="bginput" name="sub[time][' . $i . '][cost][cad]" dir="' . $direction . '" tabindex="1" size="7" value="' . number_format($sub_occurence['cost']['cad'], 2, '.', '') . '" />';
$length = '<input type="text" class="bginput" name="sub[time][' . $i . '][length]" dir="' . $direction . '" tabindex="1" size="7" value="' . $sub_occurence['length'] . '" />';
tells me you'd have to create an NZD phrase and the html to add it to the 'table'.
That would sort out your admincp to allow NZD. No idea how that would translate to your enduser though as I have never set up subs and don't know where they parse from or anything so anything past the above would be pure speculation.
Is this corrected in 3.7.0 ?
Marco van Herwaarden
04-18-2008, 11:01 AM
Please ask this at vB.com or check the vB.com Bug Tracker.
None of this still works :( Does anyone have any ideas? I really want NZD to be my main currency.
fotografik
07-22-2008, 03:49 PM
Here is what I did to add in an "unsupported" currency into the subscriptions:-
Do this edit contributed by tokenyank below:-
In includes/paymentapi/*whichever-gateway-you-want-to-use.php*
Find:
var $supported_currency = array('usd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'cad' => true);
and replace with:
var $supported_currency = array('usd' => true, 'gbd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'nzd' => true);
Edit /admincp/subscriptions.php and replace all occurences of CAD with NZD - all means all ... there will be replacement of 'cad' and 'cad_dollars' to become 'nzd' and 'nzd_dollars'
Edit /includes/class_paid_subscriptions as follows :-
Find:
var $_CURRENCYSYMBOLS = array(
'usd' => 'US$',
'gbp' => '£',
'eur' => '€',
'cad' => 'CA$',
'aud' => 'AU$',
Replace with:
var $_CURRENCYSYMBOLS = array(
'usd' => 'US$',
'gbp' => '£',
'eur' => '€',
'nzd' => 'NZD,
'aud' => 'AU$',
I am assuming you do not need to use the CAD currency, thus what we have just done is to replace CAD currency symbols and headings to NZD.
Hope this works for you.
Dismounted
07-23-2008, 10:23 AM
Just a small note, your last edit would cause an error, you're missing a single quote on the end of "NZD". Also, using your edits, you could have added an extra array value instead of replacing the CAD one.
I did all of this, but this bit here:
In includes/paymentapi/*whichever-gateway-you-want-to-use.php*
doesn't exist - the bits to edit. So what do i need to edit in there? Using 3.8.0
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.