當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。