當前位置: 首頁>>代碼示例>>PHP>>正文


PHP unknown_type::getBaseGrandTotal方法代碼示例

本文整理匯總了PHP中unknown_type::getBaseGrandTotal方法的典型用法代碼示例。如果您正苦於以下問題:PHP unknown_type::getBaseGrandTotal方法的具體用法?PHP unknown_type::getBaseGrandTotal怎麽用?PHP unknown_type::getBaseGrandTotal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在unknown_type的用法示例。


在下文中一共展示了unknown_type::getBaseGrandTotal方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _canUseMethod

 /**
  * Check if method can be used
  *
  * @param unknown_type $method
  * @param unknown_type $quote
  * @return boolean
  */
 protected function _canUseMethod($method, $quote)
 {
     if (!$method->canUseForCountry($quote->getBillingAddress()->getCountry())) {
         return false;
     }
     if (method_exists($method, 'canUseForCurrency') && !$method->canUseForCurrency(Mage::app()->getStore()->getBaseCurrencyCode())) {
         return false;
     }
     /**
      * Checking for min/max order total for assigned payment method
      */
     $total = $quote->getBaseGrandTotal();
     $minTotal = $method->getConfigData('min_order_total');
     $maxTotal = $method->getConfigData('max_order_total');
     if (!empty($minTotal) && $total < $minTotal || !empty($maxTotal) && $total > $maxTotal) {
         return false;
     }
     return true;
 }
開發者ID:rajarshc,項目名稱:Rooja,代碼行數:26,代碼來源:PresetDefaults.php

示例2: cancelInvoice

 /**
  * Cancel invoice
  *
  * @param   unknown_type $invoice
  * @return  unknown
  */
 public function cancelInvoice($invoice)
 {
     $this->setAmountPaid($this->getAmountPaid() - $invoice->getGrandTotal());
     $this->setBaseAmountPaid($this->getBaseAmountPaid() - $invoice->getBaseGrandTotal());
     $this->setShippingCaptured($this->getShippingCaptured() - $invoice->getShippingAmount());
     $this->setBaseShippingCaptured($this->getBaseShippingCaptured() - $invoice->getBaseShippingAmount());
     Mage::dispatchEvent('sales_order_payment_cancel_invoice', array('payment' => $this, 'invoice' => $invoice));
     return $this;
 }
開發者ID:Rinso,項目名稱:magento-mirror,代碼行數:15,代碼來源:Payment.php

示例3: cancelInvoice

 /**
  * Cancel invoice
  *
  * @param   unknown_type $invoice
  * @return  unknown
  */
 public function cancelInvoice($invoice)
 {
     $this->setAmountPaid($this->getAmountPaid() - $invoice->getGrandTotal());
     $this->setBaseAmountPaid($this->getBaseAmountPaid() - $invoice->getBaseGrandTotal());
     $this->setShippingCaptured($this->getShippingCaptured() - $invoice->getShippingAmount());
     $this->setBaseShippingCaptured($this->getBaseShippingCaptured() - $invoice->getBaseShippingAmount());
     return $this;
 }
開發者ID:arslbbt,項目名稱:mangentovies,代碼行數:14,代碼來源:Payment.php


注:本文中的unknown_type::getBaseGrandTotal方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。