当前位置: 首页>>代码示例>>PHP>>正文


PHP add_product_field函数代码示例

本文整理汇总了PHP中add_product_field函数的典型用法代码示例。如果您正苦于以下问题:PHP add_product_field函数的具体用法?PHP add_product_field怎么用?PHP add_product_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了add_product_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 function init()
 {
     add_paysystem_to_list(array('paysys_id' => $this->get_plugin_name(), 'title' => $this->config['title'] == '' ? $this->title : $this->config['title'], 'description' => $this->config['description'] == '' ? $this->description : $this->config['description'], 'fixed_price' => $this->fixed_price, 'public' => $this->public, 'recurring' => $this->recurring, 'built_in_trials' => $this->built_in_trials));
     if ($this->recurring) {
         add_product_field('is_recurring', 'Recurring Billing', 'checkbox', 'should user be charged automatically<br />
                      when subscription expires');
     }
     if ($this->built_in_trials) {
         add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'trial period duration');
         add_product_field('trial1_price', 'Trial 1 Price', 'money', 'enter 0.0 to offer free trial');
     }
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:12,代码来源:paysys.inc.php

示例2: foreach

                foreach ($problems as $s) {
                    if (preg_match('/^EXPIRED-(\\d+)$/', $s, $args)) {
                        $prt = $db->get_product($args[1]);
                        $titles[] = '"' . $prt['title'] . '"';
                    }
                }
                if ($titles) {
                    $error[] = "\"{$pr[title]}\" cannot be ordered " . "because you already have expired subscription(s) " . "for: " . join(', ', $titles);
                }
            }
        }
    }
    return $error;
}
add_product_field('##12', 'Product Availability/Visibilty', 'header');
add_product_field('scope', 'Scope', 'select', "Limits who can order this product<br />\n    (Does not affect existing customers)", '', array('options' => array('' => 'Visible for all', 'disabled' => 'Disabled (hidden both on signup.php and member.php)', 'signup' => 'Only Signup (hide from member.php page)', 'member' => 'Only Members having completed subscriptions (hide from signup page)')));
add_product_field('order', 'Sorting order', 'text', "This is a numeric field. Products<br />\n    will be sorted according to this number, then alphabetically\n    ");
add_product_field('price_group', 'Price Group ID', 'text', "This is a numeric field. Products with a negative price_group<br />\n    will not be displayed on the default Signup page. You can link to<br />\n    an alternate Signup page like this 'signup.php?price_group=-1'<br /> to display\n    products ONLY from Price Group -1. You can enter<br />\n    comma-separated ',' lists of pricegroups as well\n    ");
add_product_field('renewal_group', 'Renewal Group', 'text', "Value in this field defines how aMember will calculate<br />\n    subscription start date when user renews his membership.<br />\n    Please read <a href='http://manual.amember.com/Product_Renewal_Group_Explained' target=_blank>this article</a> to get idea of this feature.<br />\n    In short - set the same values for products offering the same level of access<br />\n    - set different values for products offering different level of access\n    ");
add_product_field('need_agreement', 'Display Agreement', 'checkbox', "Specify whether the user must agree to your Customer<br />\n    Agreement before being allowed to proceed with payment.<br />\n    Please put your agreement text into template:<br />\n    <em>templates/agreement.html</em>", '');
add_product_field('##13', 'Additional Options', 'header');
if (!is_lite()) {
    add_product_field('autoresponder_renew', 'Send Automatic Emails after Renewal', 'select', "When user renews subscription, aMember can<br />\n    resend days counter and start emails again from first one<br />\n    or aMember can continue old mailing cycle.\n    ", '', array('options' => array('' => 'Continue old mailing cycle', '1' => 'Reset days counter to zero, start new cycle')));
    add_product_field('dont_mail_expire', 'Do not send expiration e-mail for this product', 'hidden', "if you set this, expiration e-mail will not be send<br />\n    for subscriptions to this product.\n    ", '', array('options' => array('' => 'Send expiration e-mail (default)', '1' => 'Do not send expiration e-mail', '2' => 'Always send expiration e-mail')));
}
add_product_field('terms', 'Custom Subscription Terms to Display', 'text', "this text will be displayed to customer near the<br />\n    product title on signup.php and member.php pages<br /> \n    to explain payment terms<br />\n    if you keep it empty, it will be generated automatically<br />\n    if that is filled-in, you have to change it manually when<br />\n    you change product price or other parameters\n    ", '', array('insert_before' => '##11', 'size' => 60));
unset($GLOBALS['COUPON_NOT_USED']);
unset($GLOBALS['COUPON_DISCOUNT']);
unset($GLOBALS['TAX_AMOUNT']);
unset($GLOBALS['TAXES']);
unset($GLOBALS['PAYMENT_TERMS']);
开发者ID:subashemphasize,项目名称:test_site,代码行数:31,代码来源:product.inc.php

示例3: setup_plugin_hook

    $config['cc_company'] = 1;
    $config['cc_phone'] = 1;
}
require_once "{$config['root_dir']}/plugins/payment/payready/pay.inc.php";
setup_plugin_hook('get_member_links', 'payready_get_member_links');
setup_plugin_hook('daily', 'payready_rebill');
add_product_field('is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br />
             when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes')));
add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'Trial 1 duration');
add_product_field('trial1_price', 'Trial 1 Price', 'money', 'set 0 for free trial');
add_product_field('rebill_times', 'Recurring Times', 'text', 'Recurring Times. This is the number of payments which<br />
     will occur at the regular rate. If omitted, payment will<br />
     continue to recur at the regular rate until the subscription<br />
     is cancelled.<br />
     NOTE: not for all payment processing this option is working');
add_product_field('authorize_currency', 'PayReady Currency', 'select', 'valid only for PayReady processing.<br /> You should not change it<br /> if you use 
    another payment processors', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'CAD' => 'CAD', 'JPY' => 'JPY')));
global $config;
$config['cc_type_options'] = array('1' => 'VISA', '2' => 'Master Card', '3' => 'American Express', '4' => 'Discover Card');
add_member_field('cc_type', 'Credit Card Type', 'select', '', '', array('options' => $config['cc_type_options']));
add_member_field('cc_street', 'Billing Street Address', 'text', "", '', array('hidden_anywhere' => 1));
add_member_field('cc_city', 'Billing City', 'text', "", '');
add_member_field('cc_state', 'Billing State', 'select', "", '', array('options' => db_getStatesForCountry('US', true)));
add_member_field('cc_zip', 'Billing ZIP', 'text', "", '');
add_member_field('cc_country', 'Billing Country', 'select', "", '', array('options' => db_getCountryList(true)));
add_member_field('cc_name_f', 'Billing First Name', 'text', '');
add_member_field('cc_name_l', 'Billing Last Name', 'text', '');
if ($config['payment']['payready']['wells_fargo']) {
    add_member_field('cc_company', 'Billing Company', 'text', '');
    add_member_field('cc_phone', 'Billing Company', 'text', '');
}
add_member_field('cc', 'Credit Card # (visible)', 'readonly', "credit card number (read-only)", '', array('hidden_anywhere' => 1));
开发者ID:subashemphasize,项目名称:test_site,代码行数:32,代码来源:payready.inc.php

示例4: add_paysystem_to_list

/*
*
*
*     Author: Alex Scott
*      Email: alex@cgi-central.net
*        Web: http://www.cgi-central.net
*    Details: The installation file
*    FileName $RCSfile$
*    Release: 3.1.8PRO ($Revision: 1781 $)
*
* Please direct bug reports,suggestions or feedback to the cgi-central forums.
* http://www.cgi-central.net/forum/
*                                                                          
* aMember PRO is a commercial software. Any distribution is strictly prohibited.
*
*/
add_paysystem_to_list(array('paysys_id' => 'paycom', 'title' => $config['payment']['paycom']['title'] ? $config['payment']['paycom']['title'] : _PLUG_PAY_PAYCOM_TITLE, 'description' => $config['payment']['paycom']['description'] ? $config['payment']['paycom']['description'] : _PLUG_PAY_PAYCOM_DESC, 'public' => 1, 'fixed_price' => 1));
add_product_field('paycom_id', 'PayCom Product/Subscription ID', 'text', 'you must create the same product<br />
             in paycom and enter its ID here');
// need to configure products in clickbank and set thanks page to ./thanks.php
class payment_paycom extends payment
{
    function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
    {
        global $db, $config, $plugin_config;
        $t =& new_smarty();
        $t->assign(array('this_config' => $this->config, 'member' => $db->get_user($member_id), 'payment' => $pm = $db->get_payment($payment_id), 'product' => $db->get_product($pm['product_id'])));
        $t->display(dirname(__FILE__) . '/paycom.html');
        exit;
    }
}
开发者ID:subashemphasize,项目名称:test_site,代码行数:31,代码来源:paycom.inc.php

示例5: init

 function init()
 {
     parent::init();
     if (!$this->config['country']) {
         $this->config['country'] = 'UK';
     }
     add_product_field('eway_currency', 'EWAY Currency', 'select', '', '', array('options' => array('GBP' => 'GBP')));
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:8,代码来源:eway_international.inc.php

示例6: payment_adultprocessor

 function payment_adultprocessor($config)
 {
     parent::payment($config);
     add_product_field('adultprocessor_siteid', 'Adultprocessor Site ID', 'text', '', '');
     add_product_field('adultprocessor_scheduleid', 'Adultprocessor Schedule ID', 'text', '', '');
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:6,代码来源:adultprocessor.inc.php

示例7: init

 function init()
 {
     parent::init();
     add_payment_field('epayph_vars', 'ePay subscription terms', 'hidden', '');
     add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'read ePay docs for explanation, leave empty to not use trial', 'validate_period');
     add_product_field('trial1_price', 'Trial 1 Price', 'money', 'set 0 for free trial');
     add_product_field('rebill_times', 'Recurring Times', 'text', 'Recurring Times. This is the number of payments which<br />
          will occur at the regular rate. If omitted, payment will<br />
          continue to recur at the regular rate until the subscription<br />
          is cancelled.<br />
          NOTE: this option is working for particular payment processing methods only');
     if ($this->config['allow_create']) {
         add_product_field('epayph_id', 'ePay Product ID', 'text', 'an ID of corresponding product in your ePay account (item_number)');
     }
     if ($this->config['other_account']) {
         add_product_field('epayph_other_account', 'Other ePay Account', 'text', 'email address of an other ePay account<br />which will be used with this product');
     }
     add_product_field('epayph_currency', 'ePay Currency', 'select', 'valid only for ePay processing.<br /> You should not change it<br /> if you use
         another payment processors', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'CAD' => 'CAD', 'AUD' => 'AUD', 'JPY' => 'JPY', 'PHP' => 'PHP')));
     add_payment_field('txn_id', 'ePay Transaction Id', 'readonly', 'internal');
     add_payment_field('failed_orig_expiration', 'Failed payment original expiration date', 'readonly', 'internal');
     add_member_field('epayph_email_rewritten', 'ePay had reset user e-mail', 'hidden', 'internal');
     if ($this->config['testing']) {
         $this->epayph_domain = "www.epay.ph";
     } else {
         $this->epayph_domain = "www.epay.ph";
     }
 }
开发者ID:Neuralink,项目名称:epayph_amember,代码行数:28,代码来源:epayph.inc.php

示例8: init

 function init()
 {
     parent::init();
     add_product_field('globillnet_id', 'Globill.net ID', 'text', 'You must create this same subscription<br />in Globill.net and enter its number here', 'validate_globillnet_id');
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:5,代码来源:globillnet.inc.php

示例9: init

 function init()
 {
     parent::init();
     add_product_field('twocheckout_id', '2Checkout ID', 'text', 'you must create the same product<br />
          in 2Checkout and enter its number here<br />
          it can be found at 2CO -> PRODUCTS -> VIEW: 2CO ID', 'validate_twocheckout_id');
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:7,代码来源:twocheckout_r.inc.php

示例10: add_product_field

<?php

add_product_field('is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br />
             when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes')));
add_paysystem_to_list(array('paysys_id' => 'verotel', 'title' => $config['payment']['verotel']['title'] ? $config['payment']['verotel']['title'] : _PLUG_PAY_VEROTEL_TITLE, 'description' => $config['payment']['verotel']['description'] ? $config['payment']['verotel']['description'] : _PLUG_PAY_VEROTEL_DESC, 'public' => 1, 'recurring' => 1, 'fixed_price' => 1));
add_product_field('verotel_id', 'VeroTel Site ID', 'text', '');
function verotel_vsf(&$vars)
{
    $err = array();
    if (preg_match('/^.*_+.*$/', $vars['login'])) {
        $err[] = "Verotel does not accept usernames with underscores";
    }
    return $err;
}
setup_plugin_hook('validate_signup_form', 'verotel_vsf');
class payment_verotel extends payment
{
    function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
    {
        global $config, $db;
        $product =& get_product($product_id);
        $member = $db->get_user($member_id);
        $c_product_id = $product->config['verotel_id'];
        if (!$c_product_id) {
            fatal_error("Verotel Product ID empty for Product# {$product_id}");
        }
        $vars = array('verotel_id' => $this->config['merchant_id'], 'verotel_product' => $c_product_id, 'verotel_website' => $c_product_id, 'verotel_usercode' => $member['login'], 'verotel_passcode' => $member['pass'], 'verotel_custom1' => $payment_id, 'verotel_custom2' => $member_id, 'verotel_custom3' => $product_id);
        $vars1 = array();
        foreach ($vars as $kk => $vv) {
            $v = urlencode($vv);
            $k = urlencode($kk);
开发者ID:subashemphasize,项目名称:test_site,代码行数:31,代码来源:verotel.inc.php

示例11: die

 *	2009-09-06	v3.1.8.2	K.Gary	Fixed bug where set wrong session variable name.
 *	2009-09-03	v3.1.8.1	K.Gary	Clear one-click session variables in receipts when upsells and offers are complete.
 *	2009-05-28	v3.1.8.0	K.Gary	Tested with aMember version 3.1.8
 *	2009-05-28	v3.1.7.1	K.Gary	Changed revision naming rules to match aMembers current level
 *	2009-05-26	v1.1		K.Gary	Added field for copy to display on thank you page when a product is purchased.
 *	2009-05-20	v1.0		K.Gary	Original Version.
 *
 * =============================================================================
 *
 **/
if (!defined('INCLUDED_AMEMBER_CONFIG')) {
    die("Direct access to this location is not allowed");
}
global $db;
add_product_field('amthankyou_header', 'amThankYou v3.2.3.1', 'header', '', '', array('insert_before' => '##12'));
add_product_field('amthankyou_copy', 'Thank You Page Copy', 'textarea', 'Enter the copy you want to show on the<br />
                   thank you page when this product is purchased.', '', array('insert_after' => 'amthankyou_header'));
function check_setup_amthankyou()
{
    global $plugin_config, $config, $db;
    $this_config = $plugin_config['protect']['amthankyou'];
    return '';
}
// end check_setup_amthankyou
if (!check_setup_amthankyou()) {
    // setup_plugin_hook('subscription_updated', 'amthankyou_updated');
    // setup_plugin_hook('subscription_rebuild', 'amthankyou_rebuild');
    // setup_plugin_hook('subscription_added',   'amthankyou_added');
    // setup_plugin_hook('subscription_deleted', 'amthankyou_deleted');
    // setup_plugin_hook('subscription_removed', 'amthankyou_removed');
    setup_plugin_hook('filter_output', 'amthankyou_filter_output');
}
开发者ID:subashemphasize,项目名称:test_site,代码行数:32,代码来源:amthankyou.inc.php

示例12: init

    function init()
    {
        parent::init();
        add_product_field('moneybookers_currency', 'moneybookers Currency', 'select', 'valid only for moneybookers processing.<br /> You should not change it<br /> if you use 
			another payment processors', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'CAD' => 'CAD', 'JPY' => 'JPY')));
    }
开发者ID:subashemphasize,项目名称:test_site,代码行数:6,代码来源:moneybookers.inc.php

示例13: add_paysystem_to_list

* Please direct bug reports,suggestions or feedback to the cgi-central forums.
* http://www.cgi-central.net/forum/
*                                                                          
* aMember PRO is a commercial software. Any distribution is strictly prohibited.
*
*/
$plugins['payment'][] = 'globill_phone';
$plugins['payment'][] = 'globill_check';
add_paysystem_to_list(array('paysys_id' => _PLUG_PAY_GLOBILL_ID, 'title' => _PLUG_PAY_GLOBILL_TITLE, 'description' => sprintf(_PLUG_PAY_GLOBILL_DESC, '<a href="http://www.globill.com" target=_blank>', '</a>'), 'public' => 1, 'recurring' => 1));
add_paysystem_to_list(array('paysys_id' => _PLUG_PAY_GLOBILL_PH_ID, 'title' => _PLUG_PAY_GLOBILL_PH_TITLE, 'description' => sprintf(_PLUG_PAY_GLOBILL_PH_DESC, '<a href="http://www.globill.com" target=_blank>', '</a>'), 'public' => 1, 'recurring' => 1));
add_paysystem_to_list(array('paysys_id' => _PLUG_PAY_GLOBILL_CH_ID, 'title' => _PLUG_PAY_GLOBILL_CH_TITLE, 'description' => sprintf(_PLUG_PAY_GLOBILL_CH_DESC, '<a href="http://www.globill.com" target=_blank>', '</a>'), 'public' => 1, 'recurring' => 1));
add_product_field('globill_cc_id', 'GloBill CC ID', 'text', 'you must create the same product<br />
             in GloBill for CC billing. Enter pricegroup here');
add_product_field('globill_phone_id', 'GloBill Phone ID', 'text', 'you must create the same product<br />
             in GloBill for Phone billing. Enter pricegroup here');
add_product_field('globill_check_id', 'GloBill Check ID', 'text', 'you must create the same product<br />
             in GloBill for Online Check payment. Enter pricegroup here');
// need to configure products in clickbank and set thanks page to ./thanks.php
class payment_globill extends payment
{
    function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
    {
        global $config, $db, $plugin_config;
        $product =& get_product($product_id);
        $payment = $db->get_payment($payment_id);
        $member = $db->get_user($member_id);
        $this_config = $plugin_config['payment']['globill'];
        $vars = array('id' => $this_config['site_id'], 'username' => $member['login'], 'password' => $member['pass'], 'email' => $member['email'], 'firstname' => $member['name_f'], 'lastname' => $member['name_l'], 'address' => $member['street'], 'city' => $member['city'], 'state' => $member['state'], 'zip' => $member['zip'], 'country' => $member['country'], 'user1' => $payment_id, 'user2' => $member_id, 'user3' => $product_id);
        if ($payment['paysys_id'] == 'globill') {
            $pg = $product->config['globill_cc_id'];
            if (!$pg) {
                return _PLUG_PAY_GLOBILL_CANNOTORDER;
开发者ID:subashemphasize,项目名称:test_site,代码行数:32,代码来源:globill.inc.php

示例14: init

 function init()
 {
     parent::init();
     add_product_field('worldpay_currency', 'WorldPay Currency', 'select', 'currency for WorldPay gateway', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'JPY' => 'JPY', 'AUD' => 'AUD')));
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:5,代码来源:worldpay.inc.php

示例15: init

 function init()
 {
     parent::init();
     add_product_field('gtbill_price_id', 'GTBill Price ID', 'text', 'Subscription plan PriceID.<br />Can be sent in as a comma delimited string, Ex. 1,2,3', 'validate_gtbill_price_id');
     add_product_field('gtbill_currency', 'GTBill Currency', 'select', 'currency for GTBill gateway', '', array('options' => array('USD' => 'US Dollar', 'EUR' => 'Euro', 'GBP' => 'Pound Sterling')));
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:6,代码来源:gtbill.inc.php


注:本文中的add_product_field函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。