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


PHP Mage_Sales_Model_Order::getTotalDue方法代码示例

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


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

示例1: crateFromOrder

 public static function crateFromOrder(Mage_Sales_Model_Order $order)
 {
     $aOrder = new self();
     $aOrder->id = $order->getIncrementId();
     $aOrder->currency = $order->getOrderCurrencyCode();
     $aOrder->total_amount = Aplazame_Sdk_Serializer_Decimal::fromFloat($order->getTotalDue());
     $aOrder->articles = array_map(array('Aplazame_Aplazame_BusinessModel_Article', 'crateFromOrderItem'), $order->getAllVisibleItems());
     if (($discounts = $order->getDiscountAmount()) !== null) {
         $aOrder->discount = Aplazame_Sdk_Serializer_Decimal::fromFloat(-$discounts);
     }
     return $aOrder;
 }
开发者ID:aplazame,项目名称:magento,代码行数:12,代码来源:Order.php

示例2: isOrderTotalCorrect

 /**
  * check if order total is correct
  *
  * @param ShopgateOrder          $order
  * @param Mage_Sales_Model_Order $oMageOrder
  * @param string                 $message
  *
  * @return bool
  */
 public function isOrderTotalCorrect(ShopgateOrder $order, Mage_Sales_Model_Order $oMageOrder, &$message = "")
 {
     $totalShopgate = $order->getAmountComplete();
     $totalMagento = $oMageOrder->getTotalDue() + $oMageOrder->getTotalPaid();
     ShopgateLogger::getInstance()->log("Total Shopgate: {$totalShopgate} {$order->getCurrency()} \n            Total Magento: {$totalMagento} {$order->getCurrency()}", ShopgateLogger::LOGTYPE_DEBUG);
     if (abs($totalShopgate - $totalMagento) > 0.02) {
         $msg = "differing total order amounts:\n";
         $msg .= "\tShopgate:\t{$totalShopgate} {$order->getCurrency()} \n";
         $msg .= "\tMagento:\t{$totalMagento} {$oMageOrder->getOrderCurrencyCode()}\n";
         $message = $msg;
         return false;
     }
     return true;
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:23,代码来源:Data.php

示例3: createFromOrder

 /**
  * @param Mage_Sales_Model_Order $order
  *
  * @return array
  */
 public static function createFromOrder(Mage_Sales_Model_Order $order)
 {
     $serialized = array('id' => $order->getIncrementId(), 'amount' => Aplazame_Sdk_Serializer_Decimal::fromFloat($order->getGrandTotal()), 'due' => Aplazame_Sdk_Serializer_Decimal::fromFloat($order->getTotalDue()), 'status' => $order->getStatus(), 'type' => $order->getPayment()->getMethodInstance()->getCode(), 'order_date' => date(DATE_ISO8601, strtotime($order->getCreatedAt())), 'currency' => $order->getOrderCurrencyCode(), 'billing' => Aplazame_Aplazame_BusinessModel_Address::createFromAddress($order->getBillingAddress()), 'shipping' => Aplazame_Aplazame_BusinessModel_ShippingInfo::createFromOrder($order));
     return $serialized;
 }
开发者ID:aplazame,项目名称:magento,代码行数:10,代码来源:HistoricalOrder.php

示例4: updatePaymentByOrder

 /**
  * @param Mage_Sales_Model_Order $order
  */
 protected function updatePaymentByOrder(Mage_Sales_Model_Order $order)
 {
     // Set Amount Authorized
     $this->getPayment()->setAmountAuthorized($order->getTotalDue());
     $this->getPayment()->setBaseAmountAuthorized($order->getBaseTotalDue());
 }
开发者ID:romfr,项目名称:payone-magento,代码行数:9,代码来源:Abstract.php

示例5: _updateOrderPayment

 /**
  * @param Mage_Sales_Model_Order $magentoOrder
  * @param ShopgateOrder          $shopgateOrder
  *
  * @return Mage_Sales_Model_Order
  */
 protected function _updateOrderPayment($magentoOrder, $shopgateOrder)
 {
     if ($shopgateOrder->getUpdatePayment() && $magentoOrder->getTotalDue() > 0) {
         $this->log("# Update payment", ShopgateLogger::LOGTYPE_DEBUG);
         $magentoOrder = $this->_setOrderPayment($magentoOrder, $shopgateOrder);
         $this->log("# Update payment successful", ShopgateLogger::LOGTYPE_DEBUG);
     }
     return $magentoOrder;
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:15,代码来源:Plugin.php


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