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)

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 ?


All times are GMT. The time now is 01:56 AM.

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.00988 seconds
  • Memory Usage 1,742KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete