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


PHP Order::getBaseDiscountAmount方法代码示例

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


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

示例1: getNonTaxableAmount

 /**
  * Get payment amount data with excluded tax
  * @param \Magento\Sales\Model\Order $order
  * @return array
  */
 private function getNonTaxableAmount(Order $order)
 {
     return ['subtotal' => $this->_formatPrice($order->getBaseSubtotal()), 'total' => $this->_formatPrice($order->getPayment()->getBaseAmountAuthorized()), 'tax' => $this->_formatPrice($order->getBaseTaxAmount()), 'shipping' => $this->_formatPrice($order->getBaseShippingAmount()), 'discount' => $this->_formatPrice(abs($order->getBaseDiscountAmount()))];
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:9,代码来源:Request.php

示例2: getNonTaxableAmount

 /**
  * Get payment amount data with excluded tax
  * @param \Magento\Sales\Model\Order $order
  * @return array
  */
 private function getNonTaxableAmount(Order $order)
 {
     // PayPal denied transaction with 0 amount
     $subtotal = $order->getBaseSubtotal() ?: $order->getPayment()->getBaseAmountAuthorized();
     return ['subtotal' => $this->formatPrice($subtotal), 'total' => $this->formatPrice($order->getPayment()->getBaseAmountAuthorized()), 'tax' => $this->formatPrice($order->getBaseTaxAmount()), 'shipping' => $this->formatPrice($order->getBaseShippingAmount()), 'discount' => $this->formatPrice(abs($order->getBaseDiscountAmount()))];
 }
开发者ID:koliaGI,项目名称:magento2,代码行数:11,代码来源:Request.php

示例3: getTotalAmount

 /**
  * Repeat sql formula from \Magento\SalesRule\Model\Resource\Report\Rule\Createdat::_aggregateByOrder
  *
  * @param \Magento\Sales\Model\Order $order
  * @return float
  */
 private function getTotalAmount(\Magento\Sales\Model\Order $order)
 {
     return ($order->getBaseSubtotal() - $order->getBaseSubtotalCanceled() - (abs($order->getBaseDiscountAmount()) - abs($order->getBaseDiscountCanceled())) + ($order->getBaseTaxAmount() - $order->getBaseTaxCanceled())) * $order->getBaseToGlobalRate();
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:10,代码来源:CreatedatTest.php

示例4: getBaseDiscountAmount

 /**
  * {@inheritdoc}
  */
 public function getBaseDiscountAmount()
 {
     return $this->_salesModel->getBaseDiscountAmount();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:7,代码来源:Order.php


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