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


PHP TaxRulesGroup::getTaxRulesGroupsForOptions方法代码示例

本文整理汇总了PHP中TaxRulesGroup::getTaxRulesGroupsForOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP TaxRulesGroup::getTaxRulesGroupsForOptions方法的具体用法?PHP TaxRulesGroup::getTaxRulesGroupsForOptions怎么用?PHP TaxRulesGroup::getTaxRulesGroupsForOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TaxRulesGroup的用法示例。


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

示例1: __construct

 public function __construct()
 {
     global $cookie;
     $this->table = 'tax';
     $this->className = 'Tax';
     $this->lang = true;
     $this->edit = true;
     $this->delete = true;
     $this->fieldsDisplay = array('id_tax' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 140), 'rate' => array('title' => $this->l('Rate'), 'align' => 'center', 'suffix' => '%', 'width' => 50), 'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false));
     $this->optionTitle = $this->l('Tax options');
     $this->_fieldsOptions = array('PS_TAX' => array('title' => $this->l('Enable tax:'), 'desc' => $this->l('Select whether or not to include tax on purchases'), 'cast' => 'intval', 'type' => 'bool'), 'PS_TAX_DISPLAY' => array('title' => $this->l('Display tax in cart:'), 'desc' => $this->l('Select whether or not to display tax on a distinct line in the cart'), 'cast' => 'intval', 'type' => 'bool'), 'PS_TAX_ADDRESS_TYPE' => array('title' => $this->l('Base on:'), 'cast' => 'pSQL', 'type' => 'select', 'list' => array(array('name' => $this->l('Invoice Address'), 'id' => 'id_address_invoice'), array('name' => $this->l('Delivery Address'), 'id' => 'id_address_delivery')), 'identifier' => 'id'), 'PS_USE_ECOTAX' => array('title' => $this->l('Use ecotax'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'));
     if (Configuration::get('PS_USE_ECOTAX')) {
         $this->_fieldsOptions['PS_ECOTAX_TAX_RULES_GROUP_ID'] = array('title' => $this->l('Ecotax:'), 'desc' => $this->l('The tax to apply on the ecotax (e.g., French ecotax: 19.6%).'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_tax', 'identifier' => 'id_tax_rules_group', 'list' => TaxRulesGroup::getTaxRulesGroupsForOptions());
     }
     parent::__construct();
 }
开发者ID:hecbuma,项目名称:quali-fisioterapia,代码行数:16,代码来源:AdminTaxes.php

示例2: __construct

 public function __construct()
 {
     $this->table = 'tax';
     $this->className = 'Tax';
     $this->lang = true;
     $this->addRowAction('edit');
     $this->addRowAction('delete');
     $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), 'enableSelection' => array('text' => $this->l('Enable selection')), 'disableSelection' => array('text' => $this->l('Disable selection')));
     $this->fields_list = array('id_tax' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 'auto'), 'rate' => array('title' => $this->l('Rate'), 'align' => 'center', 'suffix' => '%', 'width' => 50), 'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false));
     $ecotax_desc = '';
     if (Configuration::get('PS_USE_ECOTAX')) {
         $ecotax_desc = $this->l('If you disable the ecotax, the ecotax for all your products will be set to 0');
     }
     $this->fields_options = array('general' => array('title' => $this->l('Tax options'), 'fields' => array('PS_TAX' => array('title' => $this->l('Enable tax:'), 'desc' => $this->l('Select whether or not to include tax on purchases'), 'cast' => 'intval', 'type' => 'bool'), 'PS_TAX_DISPLAY' => array('title' => $this->l('Display tax in cart:'), 'desc' => $this->l('Select whether or not to display tax on a distinct line in the cart'), 'cast' => 'intval', 'type' => 'bool'), 'PS_TAX_ADDRESS_TYPE' => array('title' => $this->l('Base on:'), 'cast' => 'pSQL', 'type' => 'select', 'list' => array(array('name' => $this->l('Invoice Address'), 'id' => 'id_address_invoice'), array('name' => $this->l('Delivery Address'), 'id' => 'id_address_delivery')), 'identifier' => 'id'), 'PS_USE_ECOTAX' => array('title' => $this->l('Use ecotax'), 'desc' => $ecotax_desc, 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool')), 'submit' => array()));
     if (Configuration::get('PS_USE_ECOTAX')) {
         $this->fields_options['general']['fields']['PS_ECOTAX_TAX_RULES_GROUP_ID'] = array('title' => $this->l('Ecotax:'), 'desc' => $this->l('The tax to apply on the ecotax (e.g. French ecotax: 19.6%).'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_tax', 'identifier' => 'id_tax_rules_group', 'list' => TaxRulesGroup::getTaxRulesGroupsForOptions());
     }
     parent::__construct();
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:19,代码来源:AdminTaxesController.php

示例3: __construct

 public function __construct()
 {
     $this->bootstrap = true;
     $this->table = 'tax';
     $this->className = 'Tax';
     $this->lang = true;
     $this->addRowAction('edit');
     $this->addRowAction('delete');
     parent::__construct();
     $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash'));
     $this->fields_list = array('id_tax' => array('title' => $this->trans('ID', array(), 'Admin.Global'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'name' => array('title' => $this->trans('Name', array(), 'Admin.Global'), 'width' => 'auto'), 'rate' => array('title' => $this->l('Rate'), 'align' => 'center', 'suffix' => '%', 'class' => 'fixed-width-md'), 'active' => array('title' => $this->trans('Enabled', array(), 'Admin.Global'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm', 'remove_onclick' => true));
     $ecotax_desc = '';
     if (Configuration::get('PS_USE_ECOTAX')) {
         $ecotax_desc = $this->l('If you disable the ecotax, the ecotax for all your products will be set to 0.');
     }
     $this->fields_options = array('general' => array('title' => $this->l('Tax options'), 'fields' => array('PS_TAX' => array('title' => $this->l('Enable tax'), 'desc' => $this->l('Select whether or not to include tax on purchases.'), 'cast' => 'intval', 'type' => 'bool'), 'PS_TAX_DISPLAY' => array('title' => $this->l('Display tax in the shopping cart'), 'desc' => $this->l('Select whether or not to display tax on a distinct line in the cart.'), 'cast' => 'intval', 'type' => 'bool'), 'PS_TAX_ADDRESS_TYPE' => array('title' => $this->l('Based on'), 'cast' => 'pSQL', 'type' => 'select', 'list' => array(array('name' => $this->l('Invoice address'), 'id' => 'id_address_invoice'), array('name' => $this->l('Delivery address'), 'id' => 'id_address_delivery')), 'identifier' => 'id'), 'PS_USE_ECOTAX' => array('title' => $this->l('Use ecotax'), 'desc' => $ecotax_desc, 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool')), 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Actions'))));
     if (Configuration::get('PS_USE_ECOTAX') || Tools::getValue('PS_USE_ECOTAX')) {
         $this->fields_options['general']['fields']['PS_ECOTAX_TAX_RULES_GROUP_ID'] = array('title' => $this->l('Ecotax'), 'hint' => $this->l('Define the ecotax (e.g. French ecotax: 19.6%).'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_tax_rules_group', 'list' => TaxRulesGroup::getTaxRulesGroupsForOptions());
     }
     $this->_where .= ' AND a.deleted = 0';
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:21,代码来源:AdminTaxesController.php

示例4: displayAdminConfigurationForm

 protected function displayAdminConfigurationForm($configData)
 {
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     $fields_form = array();
     $fields_form[0] = array();
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('admin_configuration_invipay_account')), 'input' => $this->getAdministractionConfigurationMetaData('form', array(0)));
     $fields_form[1] = array();
     $fields_form[1]['form'] = array('legend' => array('title' => $this->l('admin_configuration_invipay_presta')), 'input' => $this->getAdministractionConfigurationMetaData('form', array(1)));
     $fields_form[2] = array();
     $fields_form[2]['form'] = array('legend' => array('title' => $this->l('admin_configuration_invipay_payment_cost')), 'input' => $this->getAdministractionConfigurationMetaData('form', array(2)));
     $fields_form[3] = array();
     $fields_form[3]['form'] = array('legend' => array('title' => $this->l('admin_configuration_invipay_promo')), 'input' => $this->getAdministractionConfigurationMetaData('form', array(3)), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     $fields_form[2]['form']['input']['PAYMENT_METHOD_COST_TAX_RULE']['options']['query'] = TaxRulesGroup::getTaxRulesGroupsForOptions();
     $helper = new HelperForm();
     $helper->module = $this;
     $helper->name_controller = $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = $default_lang;
     $helper->title = $this->displayName;
     $helper->show_toolbar = true;
     $helper->toolbar_scroll = true;
     $helper->submit_action = 'submit' . $this->name;
     $helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
     $helper->fields_value = $configData;
     return $helper->generateForm($fields_form);
 }
开发者ID:invipay,项目名称:invipay-prestashop,代码行数:28,代码来源:invipaypaygate.php


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