当前位置: 首页>>代码示例>>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;未经允许,请勿转载。