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


PHP Currency::getPaymentCurrenciesSpecial方法代码示例

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


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

示例1: getCurrency

 /**
  * @param int $id_currency : this parameter is optionnal but on 1.5 version of Prestashop, it will be REQUIRED
  * @return Currency
  */
 public function getCurrency($current_id_currency = null)
 {
     if (!(int) $current_id_currency) {
         $current_id_currency = Context::getContext()->currency->id;
     }
     if (!$this->currencies) {
         return false;
     }
     if ($this->currencies_mode == 'checkbox') {
         $currencies = Currency::getPaymentCurrencies($this->id);
         return $currencies;
     } elseif ($this->currencies_mode == 'radio') {
         $currencies = Currency::getPaymentCurrenciesSpecial($this->id);
         $currency = $currencies['id_currency'];
         if ($currency == -1) {
             $id_currency = (int) $current_id_currency;
         } elseif ($currency == -2) {
             $id_currency = (int) Configuration::get('PS_CURRENCY_DEFAULT');
         } else {
             $id_currency = $currency;
         }
     }
     if (!isset($id_currency) || empty($id_currency)) {
         return false;
     }
     $currency = new Currency($id_currency);
     return $currency;
 }
开发者ID:ekachandrasetiawan,项目名称:BeltcareCom,代码行数:32,代码来源:PaymentModule.php

示例2: getCurrency

 public function getCurrency()
 {
     global $cookie;
     if (!$this->currencies) {
         return false;
     }
     if ($this->currencies_mode == 'checkbox') {
         $currencies = Currency::getPaymentCurrencies($this->id);
         return $currencies;
     } elseif ($this->currencies_mode == 'radio') {
         $currencies = Currency::getPaymentCurrenciesSpecial($this->id);
         $currency = $currencies['id_currency'];
         if ($currency == -1) {
             $id_currency = intval($cookie->id_currency);
         } elseif ($currency == -2) {
             $id_currency = intval(Configuration::get('PS_CURRENCY_DEFAULT'));
         } else {
             $id_currency = $currency;
         }
     }
     if (!isset($id_currency) or empty($id_currency)) {
         return false;
     }
     return new Currency($id_currency);
 }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:25,代码来源:PaymentModule.php

示例3: checkModuleCurrency

 private function checkModuleCurrency()
 {
     $paymentCurrency = Currency::getPaymentCurrenciesSpecial($this->id);
     $czk_id = Currency::getIdByIsoCode('CZK');
     if ($paymentCurrency['id_currency'] == $czk_id) {
         return true;
     }
 }
开发者ID:greench,项目名称:prestashop,代码行数:8,代码来源:gopay.php

示例4: getCurrency

 /**
  * @param int $id_currency : this parameter is optionnal but on 1.5 version of Prestashop, it will be REQUIRED
  * @return Currency
  */
 public function getCurrency($current_id_currency = null)
 {
     if (!(int) $current_id_currency) {
         global $cookie;
     }
     if (!$this->currencies) {
         return false;
     }
     if ($this->currencies_mode == 'checkbox') {
         $currencies = Currency::getPaymentCurrencies($this->id);
         return $currencies;
     } elseif ($this->currencies_mode == 'radio') {
         $currencies = Currency::getPaymentCurrenciesSpecial($this->id);
         $currency = $currencies['id_currency'];
         if ($currency == -1) {
             // not use $cookie if $current_id_currency is set
             if ((int) $current_id_currency) {
                 $id_currency = (int) $current_id_currency;
             } else {
                 $id_currency = (int) $cookie->id_currency;
             }
         } elseif ($currency == -2) {
             $id_currency = (int) _PS_CURRENCY_DEFAULT_;
         } else {
             $id_currency = $currency;
         }
     }
     if (!isset($id_currency) or empty($id_currency)) {
         return false;
     }
     return new Currency($id_currency);
 }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:36,代码来源:PaymentModule.php

示例5: getCurrency

 /**
  * @param int $id_currency : this parameter is optionnal but on 1.5 version of Prestashop, it will be REQUIRED
  * @return Currency
  */
 public function getCurrency($current_id_currency = NULL)
 {
     if (!$this->currencies) {
         return false;
     }
     if ($this->currencies_mode == 'checkbox') {
         $currencies = Currency::getPaymentCurrencies((int) $this->id);
         return $currencies;
     } elseif ($this->currencies_mode == 'radio') {
         $currencies = Currency::getPaymentCurrenciesSpecial((int) $this->id);
         $currency = $currencies['id_currency'];
         if ($currency == -1) {
             // not use $this->context->cookie if $current_id_currency is set
             if ((int) $current_id_currency) {
                 $id_currency = (int) $current_id_currency;
             } else {
                 $id_currency = (int) $this->context->cookie->id_currency;
             }
         } elseif ($currency == -2) {
             $id_currency = (int) Configuration::get('PS_CURRENCY_DEFAULT');
         } else {
             $id_currency = (int) $currency;
         }
     }
     if (!isset($id_currency) || empty($id_currency)) {
         return false;
     }
     return new Currency($id_currency);
 }
开发者ID:tomideru,项目名称:PrestaShop-modules,代码行数:33,代码来源:seurcashondelivery.php


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