vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Subscriptions - Currency (https://vborg.vbsupport.ru/showthread.php?t=147355)

Mum 05-16-2007 03:47 AM

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?

Mum 05-17-2007 11:01 PM

Is this not possible?

Mum 05-19-2007 05:42 AM

Bump

Mum 05-21-2007 06:50 AM

bump

Mum 05-22-2007 10:33 PM

Bump

Mum 05-31-2007 08:40 AM

Can anyone please help? I want to add NZ currency but no idea how.

Mum 06-11-2007 06:58 PM

Bump

Mum 06-19-2007 02:33 PM

bump

kevcj 06-20-2007 01:54 AM

Have you been over to www.vbulletin.com, they have better support for the core vbulletin functions.

Mum 06-20-2007 01:57 AM

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.

Mum 07-06-2007 05:42 AM

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.

Mum 07-18-2007 02:42 AM

Can i do this through vBulletin?

tokenyank 07-19-2007 08:54 AM

In includes/paymentapi/*whichever-gateway-you-want-to-use.php*

Find:
Code:

var $supported_currency = array('usd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'cad' => true);
and replace with:
Code:

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.

Mum 07-19-2007 07:49 PM

Quote:

Originally Posted by tokenyank (Post 1295499)
In includes/paymentapi/*whichever-gateway-you-want-to-use.php*

Find:
Code:

var $supported_currency = array('usd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'cad' => true);
and replace with:
Code:

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:
Code:

        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.

zlos 04-18-2008 05:26 AM

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.

Mum 04-21-2008 06:33 PM

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:-

Quote:

Originally Posted by tokenyank (Post 1295499)
In includes/paymentapi/*whichever-gateway-you-want-to-use.php*

Find:
Code:

var $supported_currency = array('usd' => true, 'gbp' => true, 'eur' => true, 'aud' => true, 'cad' => true);
and replace with:
Code:

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:
Code:

        var $_CURRENCYSYMBOLS = array(
                'usd' => 'US$',
                'gbp' => '&pound;',
                'eur' => '&euro;',
                'cad' => 'CA$',
                'aud' => 'AU$',

Replace with:
Code:

        var $_CURRENCYSYMBOLS = array(
                'usd' => 'US$',
                'gbp' => '&pound;',
                'eur' => '&euro;',
                '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.

Mum 05-29-2010 07:58 AM

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


All times are GMT. The time now is 06:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01192 seconds
  • Memory Usage 1,768KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete