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


PHP Currency::getCurrencies方法代码示例

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


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

示例1: displayFormSettings

 public function displayFormSettings()
 {
     $veykuwqwjkus = "currency";
     ${"GLOBALS"}["tthknplj"] = "currencies";
     $lfapjegsknsa = "currency_list";
     $this->context->controller->addCSS($this->_path . "css/agilepaypal.css", "all");
     ${${"GLOBALS"}["teujyh"]} = array();
     array_push(${$lfapjegsknsa}, array("id" => 0, "name" => $this->l('Please choose')));
     $tfcoqgvrd = "helper";
     ${${"GLOBALS"}["sajaoqav"]} = Currency::getCurrencies(false, false);
     foreach (${${"GLOBALS"}["tthknplj"]} as ${$veykuwqwjkus}) {
         $unlqgrxvnkrh = "currency";
         array_push(${${"GLOBALS"}["teujyh"]}, array("id" => ${${"GLOBALS"}["duxtnwtj"]}["id_currency"], "name" => ${$unlqgrxvnkrh}["name"]));
     }
     ${${"GLOBALS"}["ogzmjfmjkidg"]} = array("form" => array("legend" => array("title" => $this->l('Settings'), "image" => $this->_path . "logo.gif"), "input" => array(array("type" => "text", "label" => $this->l('PayPal business e-mail'), "class" => "width10", "name" => "business", "size" => 33), array("type" => "select", "label" => $this->l('Paypal Account Currency'), "name" => "paypal_currency", "options" => array("query" => ${${"GLOBALS"}["teujyh"]}, "id" => "id", "name" => "name"), "desc" => $this->l('Please select the your Paypal Account Currency.')), array("type" => "radio", "label" => $this->l('Sandbox mode (Test)'), "name" => "sandbox", "values" => array(array("id" => "sandbox_yes", "value" => 1, "label" => $this->l('Yes')), array("id" => "sandbox_no", "value" => 0, "label" => $this->l('No')))), array("type" => "radio", "label" => $this->l('Mutiple Sellers Mode'), "name" => "support_sellers", "hint" => $this->l('If you have installed the Agile Multiple Seller module'), "form_group_class" => Module::isInstalled("agilemultipleseller") ? "" : "hidden", "values" => array(array("id" => "support_sellers_yes", "value" => 1, "label" => $this->l('Yes')), array("id" => "support_sellers_no", "value" => 0, "label" => $this->l('No'))), "desc" => array($this->l('All settings are the same for all sellers, except the Paypal account information which is managed in the Agile Multiple Seller module'))), array("type" => "htmlhr", "name" => "section1", "values" => array()), array("type" => "text", "label" => $this->l('Banner image URL'), "class" => "width10", "name" => "header", "size" => 82, "desc" => $this->l('The image should be hosted on a secured server in order to avoid security warnings. Size should be limited to 750x90px.')), array("type" => "htmlhr", "name" => "section2", "values" => array()), array("type" => "agile_radio_checkbox", "label" => $this->l('Express Checkout Enabled'), "name" => "express_enabled", "values" => array(array("id" => "express_enabled_yes", "value" => 1, "label" => $this->l('Yes'), "onclick" => "showitem('.express_enabled_yes')", "checkbox_list" => array("class" => "express_enabled_yes agile-radio-checkbox", "query" => array(array("id" => "hidecountry", "val" => 1, "name" => $this->l('Hide Countries') . "<font color=red>&nbsp;--&nbsp;" . $this->l('If your store ships to one country only.') . "</font>"), array("id" => "hidecarrier", "val" => 1, "name" => $this->l('Hide Carriers') . "<font color=red>&nbsp;--&nbsp;" . $this->l('If your store has one carrier, or no carrier') . "</font>"), array("id" => "hideterms", "val" => 1, "name" => $this->l('Hide Terms and Conditions') . "&nbsp;&nbsp;" . $this->l('Hide Terms and Conditions') . "&nbsp;--&nbsp;" . $this->l('If your want to hide the "Terms & Conditions" agreement checkbox at the express checkout screen'))), "id" => "id", "name" => "name")), array("id" => "express_enabled_no", "value" => 0, "label" => $this->l('No'), "onclick" => "hideitem('.express_enabled_yes')"))), array("type" => "htmlhr", "name" => "section3", "values" => array()), array("type" => "radio", "label" => $this->l('Force "Checkout" goes though summary page'), "name" => "force_summary", "values" => array(array("id" => "force_summary_yes", "value" => 1, "label" => $this->l('Yes')), array("id" => "force_summary_no", "value" => 0, "label" => $this->l('No'))), "desc" => $this->l('There are two buttons (Cart and Checkout) in the cart block. The "Checkout" button will bypass the order summary page, so the user will not be able to choose Express Checkout. Selecting "Yes" will force Checkout to go though the order summary page')), array("type" => "htmlhr", "name" => "section4", "values" => array()), array("type" => "agile_radio_checkbox", "label" => $this->l('Enable Recurring Payment'), "name" => "recurringpayment", "hint" => $this->l('Determine whether allow customers to subcribe for automatic, periodic payments, such as membership payments, etc.'), "values" => array(array("id" => "recurringpayment_yes", "value" => 1, "label" => $this->l('Yes'), "p" => $this->l('This will allow customers to subcribe for automatic, periodic payments, such as membership payments, etc.'), "onclick" => "showitem('.recurringpayment_yes')", "checkbox_list" => array("class" => "recurringpayment_yes agile-radio-checkbox", "query" => array(array("id" => "recurringdaily", "val" => 1, "name" => $this->l('Daily')), array("id" => "recurringweekly", "val" => 1, "name" => $this->l('Weekly')), array("id" => "recurringmonthly", "val" => 1, "name" => $this->l('Mobthly')), array("id" => "recurringyearly", "val" => 1, "name" => $this->l('Yearly'))), "id" => "id", "name" => "name")), array("id" => "recurringpayment_no", "value" => 0, "label" => $this->l('No'), "onclick" => "hideitem('.recurringpayment_yes')"))), array("type" => "htmlhr", "name" => "section5", "values" => array()), array("type" => "agile_text_addon", "label" => $this->l('Paypal Micropayment Account(Optional)'), "class" => "width10", "name" => "business2", "hint" => $this->l('Please leave this field empty if you are not using it'), "size" => 33, "addon_text" => $this->l('Max Amount:'), "addon_name" => "micro_amount", "addon_id" => "micro_amount", "size_addon" => 10, "desc" => array($this->l('What is Paypal Micropayment Account?'), $this->l('PayPal offers support for Micropayments to merchants for US to US, GB to GB, AU to AU, and EU to EU transactions for Business and Premier accounts. This feature is offered at a special rate of 5% + $0.05 per transaction. ') . "<a href=\"https://www.paypalobjects.com/IntegrationCenter/ic_micropayments.html\" target=\"_blank\" style=\"color:Blue\">" . $this->l('See here for detail') . "</a>")), array("type" => "agile_radio_checkbox", "label" => $this->l('Membership Integrattion'), "name" => "am_integrated", "hint" => $this->l(' Integrated with membership module'), "form_group_class" => Module::isInstalled("agilemembership") ? "" : "hidden", "values" => array(array("id" => "am_integrated_yes", "value" => 1, "label" => $this->l('Yes'), "onclick" => "showitem('.am_integrated_yes')", "checkbox_list" => array("class" => "am_integrated_yes agile-radio-checkbox", "query" => array(array("id" => "am_show_choice", "val" => 1, "name" => $this->l('Allow customer to choose repeating times')), array("id" => "am_mix_product", "val" => 1, "name" => $this->l('Prevent Membership and other product mix in the shopping cart')), array("id" => "subscribe_only", "val" => 1, "name" => $this->l('Make this module for membership payment only'))), "id" => "id", "name" => "name")), array("id" => "am_integrated_no", "value" => 0, "label" => $this->l('No'), "onclick" => "hideitem('.am_integrated_yes')")))), "submit" => array("title" => $this->l('Update settings'))));
     $fjxhbnyyanl = "lang";
     ${$tfcoqgvrd} = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->name;
     ${$fjxhbnyyanl} = new Language((int) Configuration::get("PS_LANG_DEFAULT"));
     $helper->default_form_language = $lang->id;
     $helper->module = $this;
     $helper->allow_employee_form_lang = Configuration::get("PS_BO_ALLOW_EMPLOYEE_FORM_LANG") ? Configuration::get("PS_BO_ALLOW_EMPLOYEE_FORM_LANG") : 0;
     $helper->identifier = $this->identifier;
     $helper->submit_action = "submitPaypal";
     $helper->currentIndex = $this->context->link->getAdminLink("AdminModules", false) . "&configure=" . $this->name . "&tab_module=" . $this->tab . "&module_name=" . $this->name;
     $helper->token = Tools::getAdminTokenLite("AdminModules");
     $helper->tpl_vars = array("fields_value" => $this->getConfigFieldsValues(), "languages" => $this->context->controller->getLanguages(), "id_language" => $this->context->language->id);
     $this->_html .= $helper->generateForm(array(${${"GLOBALS"}["ogzmjfmjkidg"]}));
     $this->context->controller->addCSS($this->_path . "css/agilepaypal.css", "all");
     $this->context->controller->addJS($this->_path . "js/agilepaypal.js");
 }
开发者ID:evilscripts,项目名称:gy,代码行数:32,代码来源:agilepaypal.php

示例2: renderForm

 public function renderForm()
 {
     if (!$this->object->id) {
         $this->object->price = -1;
     }
     $this->fields_form = array('legend' => array('title' => $this->trans('Catalog price rules', array(), 'Admin.Catalog.Feature'), 'icon' => 'icon-dollar'), 'input' => array(array('type' => 'text', 'label' => $this->trans('Name', array(), 'Admin.Global'), 'name' => 'name', 'maxlength' => 255, 'required' => true), array('type' => 'select', 'label' => $this->trans('Shop', array(), 'Admin.Global'), 'name' => 'shop_id', 'options' => array('query' => Shop::getShops(), 'id' => 'id_shop', 'name' => 'name'), 'condition' => Shop::isFeatureActive(), 'default_value' => Shop::getContextShopID()), array('type' => 'select', 'label' => $this->trans('Currency', array(), 'Admin.Global'), 'name' => 'id_currency', 'options' => array('query' => array_merge(array(0 => array('id_currency' => 0, 'name' => $this->trans('All currencies', array(), 'Admin.Global'))), Currency::getCurrencies(false, true, true)), 'id' => 'id_currency', 'name' => 'name')), array('type' => 'select', 'label' => $this->trans('Country', array(), 'Admin.Global'), 'name' => 'id_country', 'options' => array('query' => array_merge(array(0 => array('id_country' => 0, 'name' => $this->trans('All countries', array(), 'Admin.Global'))), Country::getCountries((int) $this->context->language->id)), 'id' => 'id_country', 'name' => 'name')), array('type' => 'select', 'label' => $this->trans('Group', array(), 'Admin.Global'), 'name' => 'id_group', 'options' => array('query' => array_merge(array(0 => array('id_group' => 0, 'name' => $this->trans('All groups', array(), 'Admin.Global'))), Group::getGroups((int) $this->context->language->id)), 'id' => 'id_group', 'name' => 'name')), array('type' => 'text', 'label' => $this->trans('From quantity', array(), 'Admin.Catalog.Feature'), 'name' => 'from_quantity', 'maxlength' => 10, 'required' => true), array('type' => 'text', 'label' => $this->trans('Price (tax excl.)', array(), 'Admin.Catalog.Feature'), 'name' => 'price', 'disabled' => $this->object->price == -1 ? 1 : 0, 'maxlength' => 10, 'suffix' => $this->context->currency->getSign('right')), array('type' => 'checkbox', 'name' => 'leave_bprice', 'values' => array('query' => array(array('id' => 'on', 'name' => $this->trans('Leave initial price', array(), 'Admin.Catalog.Feature'), 'val' => '1', 'checked' => '1')), 'id' => 'id', 'name' => 'name')), array('type' => 'datetime', 'label' => $this->trans('From', array(), 'Admin.Global'), 'name' => 'from'), array('type' => 'datetime', 'label' => $this->trans('To', array(), 'Admin.Global'), 'name' => 'to'), array('type' => 'select', 'label' => $this->trans('Reduction type', array(), 'Admin.Catalog.Feature'), 'name' => 'reduction_type', 'options' => array('query' => array(array('reduction_type' => 'amount', 'name' => $this->trans('Amount', array(), 'Admin.Global')), array('reduction_type' => 'percentage', 'name' => $this->trans('Percentage', array(), 'Admin.Global'))), 'id' => 'reduction_type', 'name' => 'name')), array('type' => 'select', 'label' => $this->trans('Reduction with or without taxes', array(), 'Admin.Catalog.Feature'), 'name' => 'reduction_tax', 'align' => 'center', 'options' => array('query' => array(array('lab' => $this->trans('Tax included', array(), 'Admin.Global'), 'val' => 1), array('lab' => $this->trans('Tax excluded', array(), 'Admin.Global'), 'val' => 0)), 'id' => 'val', 'name' => 'lab')), array('type' => 'text', 'label' => $this->trans('Reduction', array(), 'Admin.Catalog.Feature'), 'name' => 'reduction', 'required' => true)), 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Actions')));
     if (($value = $this->getFieldValue($this->object, 'price')) != -1) {
         $price = number_format($value, 6);
     } else {
         $price = '';
     }
     $this->fields_value = array('price' => $price, 'from_quantity' => ($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 1, 'reduction' => number_format(($value = $this->getFieldValue($this->object, 'reduction')) ? $value : 0, 6), 'leave_bprice_on' => $price ? 0 : 1, 'shop_id' => ($value = $this->getFieldValue($this->object, 'id_shop')) ? $value : 1);
     $attribute_groups = array();
     $attributes = Attribute::getAttributes((int) $this->context->language->id);
     foreach ($attributes as $attribute) {
         if (!isset($attribute_groups[$attribute['id_attribute_group']])) {
             $attribute_groups[$attribute['id_attribute_group']] = array('id_attribute_group' => $attribute['id_attribute_group'], 'name' => $attribute['attribute_group']);
         }
         $attribute_groups[$attribute['id_attribute_group']]['attributes'][] = array('id_attribute' => $attribute['id_attribute'], 'name' => $attribute['name']);
     }
     $features = Feature::getFeatures((int) $this->context->language->id);
     foreach ($features as &$feature) {
         $feature['values'] = FeatureValue::getFeatureValuesWithLang((int) $this->context->language->id, $feature['id_feature'], true);
     }
     $this->tpl_form_vars = array('manufacturers' => Manufacturer::getManufacturers(), 'suppliers' => Supplier::getSuppliers(), 'attributes_group' => $attribute_groups, 'features' => $features, 'categories' => Category::getSimpleCategories((int) $this->context->language->id), 'conditions' => $this->object->getConditions(), 'is_multishop' => Shop::isFeatureActive());
     return parent::renderForm();
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:27,代码来源:AdminSpecificPriceRuleController.php

示例3: __construct

 public function __construct()
 {
     global $cookie;
     $this->table = 'order';
     $this->className = 'Order';
     $this->view = true;
     $this->colorOnBackground = true;
     $this->_select = '
         a.id_order AS id_pdf,
         CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
         cc.`iso_code` AS `iso_code`,
         osl.`name` AS `osname`,
         os.`color`,
         IF((SELECT COUNT(so.id_order) FROM `' . _DB_PREFIX_ . 'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new,
         (SELECT COUNT(od.`id_order`) FROM `' . _DB_PREFIX_ . 'order_detail` od WHERE od.`id_order` = a.`id_order` GROUP BY `id_order`) AS product_number';
     $this->_join = 'LEFT JOIN `' . _DB_PREFIX_ . 'customer` c ON (c.`id_customer` = a.`id_customer`)
      LEFT JOIN `' . _DB_PREFIX_ . 'order_history` oh ON (oh.`id_order` = a.`id_order`)
     LEFT JOIN `' . _DB_PREFIX_ . 'order_state` os ON (os.`id_order_state` = oh.`id_order_state`)
     LEFT JOIN `' . _DB_PREFIX_ . 'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = ' . (int) $cookie->id_lang . ')
     LEFT JOIN `' . _DB_PREFIX_ . 'currency` cc  on (cc.`id_currency` = a.`id_currency`)';
     $this->_where = 'AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `' . _DB_PREFIX_ . 'order_history` moh WHERE moh.`id_order` = a.`id_order` GROUP BY moh.`id_order`)';
     $statesArray = array();
     $states = OrderState::getOrderStates((int) $cookie->id_lang);
     foreach ($states as $state) {
         $statesArray[$state['id_order_state']] = $state['name'];
     }
     $currenciesArray = array();
     $currencies = Currency::getCurrencies(false, 0);
     foreach ($currencies as $currency) {
         $currenciesArray[$currency['id_currency']] = $currency['iso_code'];
     }
     $this->fieldsDisplay = array('id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'new' => array('title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'new', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'news-new.gif'), 'orderby' => false), 'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'iso_code' => array('title' => $this->l('Currency'), 'width' => 60, 'align' => 'center', 'type' => 'select', 'select' => $currenciesArray, 'filter_key' => 'cc!id_currency', 'filter_type' => 'int'), 'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'price' => true, 'currency' => true), 'payment' => array('title' => $this->l('Payment'), 'width' => 100), 'osname' => array('title' => $this->l('Status'), 'widthColumn' => 230, 'type' => 'select', 'select' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200), 'date_add' => array('title' => $this->l('Date'), 'width' => 35, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'), 'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false));
     parent::__construct();
 }
开发者ID:priyankajsr19,项目名称:indusdiva2,代码行数:34,代码来源:AdminOrders.php

示例4: renderForm

 public function renderForm()
 {
     if (!$this->object->id) {
         $this->object->price = -1;
     }
     $shops = Shop::getShops();
     if (count($this->context->employee->getAssociatedShops()) > 1) {
         $shops = array_merge(array(0 => array('id_shop' => 0, 'name' => $this->l('All shops'))), $shops);
     }
     $this->fields_form = array('legend' => array('title' => $this->l('Specific price rules')), 'input' => array(array('type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', 'size' => 33, 'maxlength' => 32, 'required' => true, 'hint' => $this->l('Forbidden characters:') . ' <>;=#{}'), array('type' => 'select', 'label' => $this->l('Shop:'), 'name' => 'id_shop', 'options' => array('query' => $shops, 'id' => 'id_shop', 'name' => 'name'), 'condition' => Shop::isFeatureActive(), 'default_value' => Shop::getContextShopID()), array('type' => 'select', 'label' => $this->l('Currency:'), 'name' => 'id_currency', 'options' => array('query' => array_merge(array(0 => array('id_currency' => 0, 'name' => $this->l('All currencies'))), Currency::getCurrencies()), 'id' => 'id_currency', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Country:'), 'name' => 'id_country', 'options' => array('query' => array_merge(array(0 => array('id_country' => 0, 'name' => $this->l('All countries'))), Country::getCountries((int) $this->context->language->id)), 'id' => 'id_country', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Group:'), 'name' => 'id_group', 'options' => array('query' => array_merge(array(0 => array('id_group' => 0, 'name' => $this->l('All groups'))), Group::getGroups((int) $this->context->language->id)), 'id' => 'id_group', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('From quantity:'), 'name' => 'from_quantity', 'size' => 6, 'maxlength' => 10, 'required' => true), array('type' => 'text', 'label' => $this->l('Price (tax excl.):'), 'name' => 'price', 'size' => 6, 'disabled' => $this->object->price == -1 ? 1 : 0, 'maxlength' => 10, 'suffix' => $this->context->currency->getSign('right')), array('type' => 'checkbox', 'name' => 'leave_bprice', 'values' => array('query' => array(array('id' => 'on', 'name' => $this->l('Leave base price'), 'val' => '1', 'checked' => '1')), 'id' => 'id', 'name' => 'name')), array('type' => 'date', 'label' => $this->l('From:'), 'name' => 'from', 'size' => 12), array('type' => 'date', 'label' => $this->l('To:'), 'name' => 'to', 'size' => 12), array('type' => 'select', 'label' => $this->l('Reduction type:'), 'name' => 'reduction_type', 'options' => array('query' => array(array('reduction_type' => 'amount', 'name' => $this->l('Amount')), array('reduction_type' => 'percentage', 'name' => $this->l('Percentage'))), 'id' => 'reduction_type', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('Reduction:'), 'name' => 'reduction', 'required' => true)), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     if (($value = $this->getFieldValue($this->object, 'price')) != -1) {
         $price = number_format($value, 2);
     } else {
         $price = '';
     }
     $this->fields_value = array('price' => $price, 'from_quantity' => ($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 1, 'reduction' => number_format(($value = $this->getFieldValue($this->object, 'reduction')) ? $value : 0, 2), 'leave_bprice_on' => $price ? 0 : 1);
     $attribute_groups = array();
     $attributes = Attribute::getAttributes((int) $this->context->language->id);
     foreach ($attributes as $attribute) {
         if (!isset($attribute_groups[$attribute['id_attribute_group']])) {
             $attribute_groups[$attribute['id_attribute_group']] = array('id_attribute_group' => $attribute['id_attribute_group'], 'name' => $attribute['attribute_group']);
         }
         $attribute_groups[$attribute['id_attribute_group']]['attributes'][] = array('id_attribute' => $attribute['id_attribute'], 'name' => $attribute['name']);
     }
     $features = Feature::getFeatures((int) $this->context->language->id);
     foreach ($features as &$feature) {
         $feature['values'] = FeatureValue::getFeatureValuesWithLang((int) $this->context->language->id, $feature['id_feature'], true);
     }
     $this->tpl_form_vars = array('manufacturers' => Manufacturer::getManufacturers(), 'suppliers' => Supplier::getSuppliers(), 'attributes_group' => $attribute_groups, 'features' => $features, 'categories' => Category::getSimpleCategories((int) $this->context->language->id), 'conditions' => $this->object->getConditions(), 'is_multishop' => Shop::isFeatureActive());
     return parent::renderForm();
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:31,代码来源:AdminSpecificPriceRuleController.php

示例5: renderForm

    public function renderForm()
    {
        if (!($obj = $this->loadObject(true))) {
            return;
        }
        $address_layout = AddressFormat::getAddressCountryFormat($obj->id);
        if ($value = Tools::getValue('address_layout')) {
            $address_layout = $value;
        }
        $default_layout = '';
        $default_layout_tab = array(array('firstname', 'lastname'), array('company'), array('vat_number'), array('address1'), array('address2'), array('postcode', 'city'), array('Country:name'), array('phone'), array('phone_mobile'));
        foreach ($default_layout_tab as $line) {
            $default_layout .= implode(' ', $line) . "\r\n";
        }
        $this->fields_form = array('legend' => array('title' => $this->l('Countries'), 'image' => '../img/admin/world.gif'), 'input' => array(array('type' => 'text', 'label' => $this->l('Country:'), 'name' => 'name', 'lang' => true, 'size' => 30, 'required' => true, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}', 'desc' => $this->l('Country name')), array('type' => 'text', 'label' => $this->l('ISO code:'), 'name' => 'iso_code', 'size' => 4, 'maxlength' => 3, 'class' => 'uppercase', 'required' => true, 'desc' => $this->l('Two -- or three -- letter ISO code (e.g. U.S. for United States)') . '.
							<a href="http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm" target="_blank">' . $this->l('Official list here') . '
							</a>.'), array('type' => 'text', 'label' => $this->l('Call prefix:'), 'name' => 'call_prefix', 'size' => 4, 'maxlength' => 3, 'class' => 'uppercase', 'required' => true, 'desc' => $this->l('International call prefix, (e.g. 1 for United States)')), array('type' => 'select', 'label' => $this->l('Default currency:'), 'name' => 'id_currency', 'options' => array('query' => Currency::getCurrencies(), 'id' => 'id_currency', 'name' => 'name', 'default' => array('label' => $this->l('Default store currency'), 'value' => 0))), array('type' => 'select', 'label' => $this->l('Zone:'), 'name' => 'id_zone', 'options' => array('query' => Zone::getZones(), 'id' => 'id_zone', 'name' => 'name'), 'desc' => $this->l('Geographical region')), array('type' => 'radio', 'label' => $this->l('Need zip/postal code:'), 'name' => 'need_zip_code', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'need_zip_code_on', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'need_zip_code_off', 'value' => 0, 'label' => $this->l('No')))), array('type' => 'text', 'label' => $this->l('Zip/post code format:'), 'name' => 'zip_code_format', 'class' => 'uppercase', 'required' => true, 'desc' => $this->l('Zip Code format (L for a letter, N for a number and C for the ISO code). For example, NNNNN for the United States. No verification if undefined.')), array('type' => 'address_layout', 'label' => $this->l('Address format:'), 'name' => 'address_layout', 'address_layout' => $address_layout, 'encoding_address_layout' => urlencode($address_layout), 'encoding_default_layout' => urlencode($default_layout), 'display_valid_fields' => $this->displayValidFields()), array('type' => 'radio', 'label' => $this->l('Address Standardization:'), 'name' => 'standardization', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'standardization_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'standardization_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'radio', 'label' => $this->l('Active:'), 'name' => 'active', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled'))), 'desc' => $this->l('Display this country to your customers (the selected country will always be displayed in the Back Office)')), array('type' => 'radio', 'label' => $this->l('Contains following  states:'), 'name' => 'contains_states', 'required' => false, 'class' => 't', 'values' => array(array('id' => 'contains_states_on', 'value' => 1, 'label' => '<img src="../img/admin/enabled.gif" alt="' . $this->l('Yes') . '" title="' . $this->l('Yes') . '" />' . $this->l('Yes')), array('id' => 'contains_states_off', 'value' => 0, 'label' => '<img src="../img/admin/disabled.gif" alt="' . $this->l('No') . '" title="' . $this->l('No') . '" />' . $this->l('No')))), array('type' => 'radio', 'label' => $this->l('Do you need a tax identification number?'), 'name' => 'need_identification_number', 'required' => false, 'class' => 't', 'values' => array(array('id' => 'need_identification_number_on', 'value' => 1, 'label' => '<img src="../img/admin/enabled.gif" alt="' . $this->l('Yes') . '" title="' . $this->l('Yes') . '" />' . $this->l('Yes')), array('id' => 'need_identification_number_off', 'value' => 0, 'label' => '<img src="../img/admin/disabled.gif" alt="' . $this->l('No') . '" title="' . $this->l('No') . '" />' . $this->l('No')))), array('type' => 'radio', 'label' => $this->l('Display tax label (e.g. "Tax incl."):'), 'name' => 'display_tax_label', 'required' => false, 'class' => 't', 'values' => array(array('id' => 'display_tax_label_on', 'value' => 1, 'label' => '<img src="../img/admin/enabled.gif" alt="' . $this->l('Yes') . '" title="' . $this->l('Yes') . '" />' . $this->l('Yes')), array('id' => 'display_tax_label_off', 'value' => 0, 'label' => '<img src="../img/admin/disabled.gif" alt="' . $this->l('No') . '" title="' . $this->l('No') . '" />' . $this->l('No'))))));
        if (Shop::isFeatureActive()) {
            $this->fields_form['input'][] = array('type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'checkBoxShopAsso');
        }
        $this->fields_form['submit'] = array('title' => $this->l('Save   '), 'class' => 'button');
        if ($this->object->iso_code == 'US') {
            $this->object->standardization = Configuration::get('PS_TAASC');
        }
        return parent::renderForm();
    }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:26,代码来源:AdminCountriesController.php

示例6: getWidgetVariables

 public function getWidgetVariables($hookName, array $configuration)
 {
     $current_currency = null;
     $serializer = new ObjectPresenter();
     $currencies = array_map(function ($currency) use($serializer, &$current_currency) {
         $currencyArray = $serializer->present($currency);
         // serializer doesn't see 'sign' because it is not a regular
         // ObjectModel field.
         $currencyArray['sign'] = $currency->sign;
         $url = $this->context->link->getLanguageLink($this->context->language->id);
         $extraParams = array('SubmitCurrency' => 1, 'id_currency' => $currency->id);
         $partialQueryString = http_build_query($extraParams);
         $separator = empty(parse_url($url)['query']) ? '?' : '&';
         $url .= $separator . $partialQueryString;
         $currencyArray['url'] = $url;
         if ($currency->id === $this->context->currency->id) {
             $currencyArray['current'] = true;
             $current_currency = $currencyArray;
         } else {
             $currencyArray['current'] = false;
         }
         return $currencyArray;
     }, Currency::getCurrencies(true, true));
     return array('currencies' => $currencies, 'current_currency' => $current_currency);
 }
开发者ID:prestashop,项目名称:ps_currencyselector,代码行数:25,代码来源:ps_currencyselector.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->fields_options = array('general' => array('title' => $this->l('Configuration'), 'fields' => array('PS_LANG_DEFAULT' => array('title' => $this->l('Default language:'), 'desc' => $this->l('The default language used in your shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_lang', 'list' => Language::getlanguages(false)), 'PS_COUNTRY_DEFAULT' => array('title' => $this->l('Default country:'), 'desc' => $this->l('The default country used in your shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_country', 'list' => Country::getCountries($this->context->language->id)), 'PS_CURRENCY_DEFAULT' => array('title' => $this->l('Default currency:'), 'desc' => $this->l('The default currency used in your shop') . '<div class="warn">' . $this->l('If you change the default currency, you will have to manually edit every product price.') . '</div>', 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_currency', 'list' => Currency::getCurrencies())), 'submit' => array()), 'localization' => array('title' => $this->l('Localization'), 'width' => 'width2', 'icon' => 'localization', 'fields' => array('PS_WEIGHT_UNIT' => array('title' => $this->l('Weight unit:'), 'desc' => $this->l('The default weight unit for your shop (e.g. kg or lbs)'), 'validation' => 'isWeightUnit', 'required' => true, 'type' => 'text'), 'PS_DISTANCE_UNIT' => array('title' => $this->l('Distance unit:'), 'desc' => $this->l('The default distance unit for your shop (e.g. km or mi)'), 'validation' => 'isDistanceUnit', 'required' => true, 'type' => 'text'), 'PS_VOLUME_UNIT' => array('title' => $this->l('Volume unit:'), 'desc' => $this->l('The default volume unit for your shop'), 'validation' => 'isWeightUnit', 'required' => true, 'type' => 'text'), 'PS_DIMENSION_UNIT' => array('title' => $this->l('Dimension unit:'), 'desc' => $this->l('The default dimension unit for your shop (e.g. cm or in)'), 'validation' => 'isDistanceUnit', 'required' => true, 'type' => 'text')), 'submit' => array('title' => $this->l('Save'), 'class' => 'button')), 'options' => array('title' => $this->l('Advanced'), 'width' => 'width2', 'icon' => 'localization', 'fields' => array('PS_LOCALE_LANGUAGE' => array('title' => $this->l('Language locale:'), 'desc' => $this->l('Your server\'s language locale.'), 'validation' => 'isLanguageIsoCode', 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL), 'PS_LOCALE_COUNTRY' => array('title' => $this->l('Country locale:'), 'desc' => $this->l('Your server\'s country locale.'), 'validation' => 'isLanguageIsoCode', 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL)), 'submit' => array('title' => $this->l('Save'), 'class' => 'button')));
     if (function_exists('date_default_timezone_set')) {
         $this->fields_options['general']['fields']['PS_TIMEZONE'] = array('title' => $this->l('Time zone:'), 'validation' => 'isAnything', 'type' => 'select', 'list' => Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT name FROM ' . _DB_PREFIX_ . 'timezone'), 'identifier' => 'name', 'visibility' => Shop::CONTEXT_ALL);
     }
 }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:8,代码来源:AdminLocalizationController.php

示例8: __construct

 public function __construct()
 {
     $this->bootstrap = true;
     parent::__construct();
     $this->fields_options = array('general' => array('title' => $this->trans('Configuration', array(), 'Admin.Global'), 'fields' => array('PS_LANG_DEFAULT' => array('title' => $this->l('Default language'), 'hint' => $this->l('The default language used in your shop.'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_lang', 'list' => Language::getLanguages(false)), 'PS_DETECT_LANG' => array('title' => $this->l('Set language from browser'), 'desc' => $this->l('Set browser language as default language'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '1'), 'PS_COUNTRY_DEFAULT' => array('title' => $this->l('Default country'), 'hint' => $this->l('The default country used in your shop.'), 'cast' => 'intval', 'type' => 'select', 'class' => 'chosen', 'identifier' => 'id_country', 'list' => Country::getCountries($this->context->language->id)), 'PS_DETECT_COUNTRY' => array('title' => $this->l('Set default country from browser language'), 'desc' => $this->l('Set country corresponding to browser language'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '1'), 'PS_CURRENCY_DEFAULT' => array('title' => $this->l('Default currency'), 'hint' => $this->l('The default currency used in your shop.') . ' - ' . $this->l('If you change the default currency, you will have to manually edit every product price.'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_currency', 'list' => Currency::getCurrencies(false, true, true))), 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Actions'))), 'localization' => array('title' => $this->l('Local units'), 'icon' => 'icon-globe', 'fields' => array('PS_WEIGHT_UNIT' => array('title' => $this->l('Weight unit'), 'hint' => $this->l('The default weight unit for your shop (e.g. "kg" for kilograms, "lbs" for pound-mass, etc.).'), 'validation' => 'isWeightUnit', 'required' => true, 'type' => 'text', 'class' => 'fixed-width-sm'), 'PS_DISTANCE_UNIT' => array('title' => $this->l('Distance unit'), 'hint' => $this->l('The default distance unit for your shop (e.g. "km" for kilometer, "mi" for mile, etc.).'), 'validation' => 'isDistanceUnit', 'required' => true, 'type' => 'text', 'class' => 'fixed-width-sm'), 'PS_VOLUME_UNIT' => array('title' => $this->l('Volume unit'), 'hint' => $this->l('The default volume unit for your shop (e.g. "L" for liter, "gal" for gallon, etc.).'), 'validation' => 'isWeightUnit', 'required' => true, 'type' => 'text', 'class' => 'fixed-width-sm'), 'PS_DIMENSION_UNIT' => array('title' => $this->l('Dimension unit'), 'hint' => $this->l('The default dimension unit for your shop (e.g. "cm" for centimeter, "in" for inch, etc.).'), 'validation' => 'isDistanceUnit', 'required' => true, 'type' => 'text', 'class' => 'fixed-width-sm')), 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Actions'))), 'options' => array('title' => $this->l('Advanced'), 'fields' => array('PS_LOCALE_LANGUAGE' => array('title' => $this->l('Language identifier'), 'hint' => $this->l('The ISO 639-1 identifier for the language of the country where your web server is located (en, fr, sp, ru, pl, nl, etc.).'), 'validation' => 'isLanguageIsoCode', 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL, 'class' => 'fixed-width-sm'), 'PS_LOCALE_COUNTRY' => array('title' => $this->l('Country identifier'), 'hint' => $this->l('The ISO 3166-1 alpha-2 identifier for the country/region where your web server is located, in lowercase (us, gb, fr, sp, ru, pl, nl, etc.).'), 'validation' => 'isLanguageIsoCode', 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL, 'class' => 'fixed-width-sm')), 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Actions'))));
     if (function_exists('date_default_timezone_set')) {
         $this->fields_options['general']['fields']['PS_TIMEZONE'] = array('title' => $this->l('Time zone'), 'validation' => 'isAnything', 'type' => 'select', 'class' => 'chosen', 'list' => Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT name FROM ' . _DB_PREFIX_ . 'timezone'), 'identifier' => 'name', 'visibility' => Shop::CONTEXT_ALL);
     }
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:9,代码来源:AdminLocalizationController.php

示例9: hookRightColumn

 /**
  * Returns module content for header
  *
  * @param array $params Parameters
  * @return string Content
  */
 function hookRightColumn($params)
 {
     global $smarty;
     $currencies = Currency::getCurrencies();
     if (!sizeof($currencies)) {
         return '';
     }
     $smarty->assign('currencies', $currencies);
     return $this->display(__FILE__, 'blockcurrenciesincolumn.tpl');
 }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:16,代码来源:blockcurrenciesincolumn.php

示例10: testRegisteredCurrenciesCanBeAccessed

 /**
  * @covers \SebastianBergmann\Money\Currency::getCurrencies
  */
 public function testRegisteredCurrenciesCanBeAccessed()
 {
     $currencies = Currency::getCurrencies();
     $this->assertInternalType('array', $currencies);
     $this->assertArrayHasKey('EUR', $currencies);
     $this->assertInternalType('array', $currencies['EUR']);
     $this->assertArrayHasKey('display_name', $currencies['EUR']);
     $this->assertArrayHasKey('numeric_code', $currencies['EUR']);
     $this->assertArrayHasKey('default_fraction_digits', $currencies['EUR']);
     $this->assertArrayHasKey('sub_unit', $currencies['EUR']);
 }
开发者ID:vmendieta,项目名称:PFinal-WebUCA2015,代码行数:14,代码来源:CurrencyTest.php

示例11: getCurrencies

 private function getCurrencies()
 {
     $currencies = array();
     $shopCurrencies = Currency::getCurrencies();
     if ($shopCurrencies && count($shopCurrencies)) {
         foreach ($shopCurrencies as $currency) {
             $currencies[] = $currency['iso_code'];
         }
     }
     return $currencies;
 }
开发者ID:powa,项目名称:prestashop-extension,代码行数:11,代码来源:PowaTagProduct.php

示例12: _prepareHook

 private function _prepareHook($params)
 {
     if (Configuration::get('PS_CATALOG_MODE')) {
         return false;
     }
     if (!count(Currency::getCurrencies())) {
         return false;
     }
     $this->smarty->assign('blockcurrencies_sign', $this->context->currency->sign);
     return true;
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:11,代码来源:blockcurrencies.php

示例13: hookTop

 /**
  * Returns module content for header
  *
  * @param array $params Parameters
  * @return string Content
  */
 public function hookTop($params)
 {
     if (Configuration::get('PS_CATALOG_MODE')) {
         return;
     }
     global $smarty;
     $currencies = Currency::getCurrencies();
     if (!sizeof($currencies)) {
         return '';
     }
     $smarty->assign('currencies', $currencies);
     return $this->display(__FILE__, 'blockcurrencies.tpl');
 }
开发者ID:hecbuma,项目名称:quali-fisioterapia,代码行数:19,代码来源:blockcurrencies.php

示例14: __construct

 public function __construct()
 {
     $this->table = 'currency';
     $this->className = 'Currency';
     $this->lang = false;
     $this->edit = true;
     $this->delete = true;
     $this->fieldsDisplay = array('id_currency' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Currency'), 'width' => 100), 'iso_code' => array('title' => $this->l('ISO code'), 'align' => 'center', 'width' => 35), 'iso_code_num' => array('title' => $this->l('ISO code num'), 'align' => 'center', 'width' => 35), 'sign' => array('title' => $this->l('Symbol'), 'width' => 20, 'align' => 'center', 'orderby' => false, 'search' => false), 'conversion_rate' => array('title' => $this->l('Conversion rate'), 'float' => true, 'align' => 'center', 'width' => 50, 'search' => false), 'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false));
     $this->optionTitle = $this->l('Currencies options');
     $this->_fieldsOptions = array('PS_CURRENCY_DEFAULT' => array('title' => $this->l('Default currency:'), 'desc' => $this->l('The default currency used in shop') . '<div class=warn"><img src="../img/admin/warn2.png" />' . $this->l('If you change default currency, you will have to manually edit every product price.') . '</div>', 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_currency', 'list' => Currency::getCurrencies()));
     $this->_where = 'AND a.`deleted` = 0';
     parent::__construct();
 }
开发者ID:nicolasjeol,项目名称:hec-ecommerce,代码行数:13,代码来源:AdminCurrencies.php

示例15: __construct

 public function __construct()
 {
     $this->table = 'currency';
     $this->className = 'Currency';
     $this->lang = false;
     $this->edit = true;
     $this->delete = true;
     $this->fieldsDisplay = array('id_currency' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Currency'), 'width' => 100), 'iso_code' => array('title' => $this->l('ISO code'), 'align' => 'center', 'width' => 35), 'sign' => array('title' => $this->l('Symbol'), 'width' => 20, 'align' => 'center', 'orderby' => false, 'search' => false), 'conversion_rate' => array('title' => $this->l('Conversion rate'), 'float' => true, 'align' => 'center', 'width' => 50, 'search' => false));
     $this->optionTitle = $this->l('Currencies options');
     $this->_fieldsOptions = array('PS_CURRENCY_DEFAULT' => array('title' => $this->l('Default currency:'), 'desc' => $this->l('The default currency used in shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_currency', 'list' => Currency::getCurrencies()));
     $this->_where = 'AND a.`deleted` = 0';
     parent::__construct();
 }
开发者ID:sealence,项目名称:local,代码行数:13,代码来源:AdminCurrencies.php


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