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


PHP Mage_Payment_Model_Method_Abstract::isAvailable方法代码示例

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


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

示例1: isAvailable

 public function isAvailable($quote = null)
 {
     $adminhtml = Mage::getModel('pulsestorm_crossareasession/manager')->getSessionData('adminhtml');
     $adminUser = $adminhtml['admin']['user'];
     $adminLoggedIn = isset($adminUser) && $adminUser->getId() && $adminUser->getIsActive();
     return parent::isAvailable($quote) && $adminLoggedIn;
 }
开发者ID:jpcodezur,项目名称:famrashop_geocom,代码行数:7,代码来源:CardPosPayment.php

示例2: isAvailable

 /**
  * Check whether method is available
  *
  * @param Mage_Sales_Model_Quote|null $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     /* custom code written to round price here as roundPrice function was changed */
     $_grand_price = Mage::app()->getStore()->roundPrice($quote->getGrandTotal());
     $_grand_price = round($_grand_price, 2);
     return parent::isAvailable($quote) && !empty($quote) && $_grand_price == 0;
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:13,代码来源:Free.php

示例3: isAvailable

 /**
  * Check whether payment method can be used
  *
  * @param Mage_Sales_Model_Quote $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     if (!(Mage_Payment_Model_Method_Abstract::isAvailable($quote) && $this->_pro->getConfig()->isMethodAvailable())) {
         return false;
     }
     return $this->_commonMethod->isAvailable($quote);
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:13,代码来源:Direct.php

示例4: isAvailable

 /**
  * Check whether payment method can be used
  * @param Mage_Sales_Model_Quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     if (parent::isAvailable($quote) === false) {
         return false;
     }
     return true;
 }
开发者ID:anziv,项目名称:Magento-modules,代码行数:12,代码来源:Payment.php

示例5: isAvailable

 public function isAvailable($quote = null)
 {
     if (!Mage::helper('magenotification')->checkLicenseKey('Giftvoucher')) {
         return false;
     }
     return parent::isAvailable($quote);
 }
开发者ID:CherylMuniz,项目名称:fashion,代码行数:7,代码来源:Giftvoucher.php

示例6: isAvailable

 public function isAvailable($quote = null)
 {
     $showBase = parent::isAvailable($quote);
     $configuredMethod = Mage::getStoreConfig('payment/payonpickup/shippingmethod_method');
     return $showBase && $quote && $configuredMethod && $quote->getShippingAddress() && $quote->getShippingAddress()->getShippingMethod() && $quote->getShippingAddress()->getShippingMethod() == $configuredMethod;
     // Check if the specified method is available
 }
开发者ID:RapidCommerceBV,项目名称:MagentoStorePickup,代码行数:7,代码来源:Payonpickup.php

示例7: isAvailable

 public function isAvailable($quote = null)
 {
     $result = $this->isBillMemberAvailable();
     if ($result === true) {
         return parent::isAvailable();
     }
     return false;
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:8,代码来源:ICC_BillMember_Model_BillMember.php

示例8: isAvailable

 /**
  * Check whether payment method can be used
  * @param Mage_Sales_Model_Quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     if (parent::isAvailable($quote) === false) {
         return false;
     }
     // Check currency
     $allowedCurrency = array('DKK', 'EUR', 'GBP', 'NOK', 'SEK', 'USD');
     return in_array($quote->getQuoteCurrencyCode(), $allowedCurrency);
 }
开发者ID:anziv,项目名称:Magento-modules,代码行数:14,代码来源:Payment.php

示例9: isAvailable

 /**
  * Check whether payment method can be used
  *
  * @param Mage_Sales_Model_Quote $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     $storeId = Mage::app()->getStore($this->getStore())->getId();
     $config = Mage::getModel('paypal/config')->setStoreId($storeId);
     if (!(Mage_Payment_Model_Method_Abstract::isAvailable($quote) && $config->isMethodAvailable($this->getCode()))) {
         return false;
     }
     return $this->_commonMethod->isAvailable($quote);
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:15,代码来源:Payflow.php

示例10: isAvailable

 /**
  * Verify that the module has been setup
  *
  * @param null $quote
  *
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     // Check Magento's internal methods allow us to run
     if (parent::isAvailable($quote)) {
         // Validate the configuration is okay
         return $this->_getWrapper()->validateCredentialsOnce();
     } else {
         // Otherwise it's a no
         return false;
     }
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:18,代码来源:Abstract.php

示例11: isAvailable

 /**
  * There is no point of having the svea methods available when
  * grand total is 0
  */
 public function isAvailable($quote = null)
 {
     if (!parent::isAvailable($quote)) {
         return false;
     }
     $grandTotal = (double) $quote->getGrandTotal();
     if ($grandTotal === 0.0) {
         return false;
     }
     return true;
 }
开发者ID:LybeAB,项目名称:magento-module,代码行数:15,代码来源:Abstract.php

示例12: isAvailable

 /**
  * Check whether method is available
  *
  * @param Mage_Sales_Model_Quote $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     if (is_null($this->_isAvailable)) {
         if (is_object($quote) && $quote->getCustomer()) {
             $availableBA = Mage::getModel('sales/billing_agreement')->getAvailableCustomerBillingAgreements($quote->getCustomer()->getId());
             $this->_canUseCheckout = count($availableBA) > 0;
         }
         $this->_isAvailable = parent::isAvailable($quote) && $this->_isAvailable($quote);
         $this->_canUseCheckout = $this->_isAvailable && $this->_canUseCheckout;
     }
     return $this->_isAvailable;
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:18,代码来源:AgreementAbstract.php

示例13: isAvailable

 /**
  * Check whether payment method can be used
  * @param Mage_Sales_Model_Quote $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     if (parent::isAvailable($quote) === false) {
         return false;
     }
     // Check currency
     $allowedCurrency = array('DKK', 'EUR', 'GBP', 'NOK', 'SEK', 'USD');
     //if ($this->getConfigData('paymentview') === 'DIRECTDEBIT') {
     //    $allowedCurrency = array('NOK', 'SEK', 'USD');
     //}
     return in_array($quote->getQuoteCurrencyCode(), $allowedCurrency);
 }
开发者ID:AndreKlang,项目名称:Payex-Modules-Test,代码行数:17,代码来源:Payment.php

示例14: isAvailable

 /**
  * @param Mage_Sales_Model_Quote $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     $isAvailable = parent::isAvailable($quote);
     if ($isAvailable) {
         // Allow if billing and shipping address are the same.
         $shippingAddress = $quote->getShippingAddress();
         if ($shippingAddress->getSameAsBilling()) {
             return true;
         }
     }
     return false;
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:16,代码来源:Payglobe.php

示例15: isAvailable

 /**
  * Check whether method is available
  *
  * @param Mage_Sales_Model_Quote $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     if (is_null($this->_isAvailable)) {
         $this->_isAvailable = Mage_Payment_Model_Method_Abstract::isAvailable($quote) && $this->_isAvailable($quote);
         if ($this->_isAvailable && is_object($quote)) {
             $isAvailable = false;
             $availableBA = Mage::helper('cls_paypal/orderstored_agreement')->getBillingAgreementIdFromSessionOrder();
             $isAvailable = !empty($availableBA);
             $this->_isAvailable = $isAvailable;
         }
         $this->_canUseInternal = $this->_isAvailable && $this->_canUseInternal;
     }
     return $this->_isAvailable;
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:20,代码来源:Agreement.php


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