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


PHP Mage_Sales_Model_Order_Creditmemo::getQuoteCurrencyCode方法代码示例

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


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

示例1: getCurrency

 /**
  * Returns the currency compliant to ISO 4217 (3 char code)
  * @return string 3 Character long currency code
  *
  * @param Mage_Sales_Model_Quote|Mage_Sales_Model_Order|Mage_Sales_Model_Order_Invoice|Mage_Sales_Model_Order_Creditmemo $object
  * @return string
  */
 public function getCurrency($object)
 {
     $currency = $object->getBaseCurrencyCode();
     if (!Mage::helper('paymill/optionHelper')->isBaseCurrency()) {
         if ($object instanceof Mage_Sales_Model_Quote) {
             $currency = $object->getQuoteCurrencyCode();
         } else {
             $currency = $object->getOrderCurrencyCode();
         }
     }
     return $currency;
 }
开发者ID:SiWe0401,项目名称:paymill-magento,代码行数:19,代码来源:PaymentHelper.php

示例2: getRequestBasket

 /**
  * Gets all needed Informations for shopping-basket Block of the Request
  *
  * @param Mage_Sales_Model_Quote|Mage_Sales_Model_Order|Mage_Sales_Model_Order_Invoice|Mage_Sales_Model_Order_Creditmemo $object
  * @param float $amount
  * @param array $articleList
  * @return array
  */
 public function getRequestBasket($object, $amount = '', $articleList = '')
 {
     $basket = array();
     if ($object instanceof Mage_Sales_Model_Order) {
         $basket['currency'] = $object->getOrderCurrencyCode();
     } else {
         if ($object instanceof Mage_Sales_Model_Quote) {
             $basket['currency'] = $object->getQuoteCurrencyCode();
         } else {
             $basket['currency'] = $object->getOrder()->getOrderCurrencyCode();
         }
     }
     if ($articleList != '') {
         $basket['items'] = $articleList;
     } else {
         $basket['items'] = $this->getArticles($object);
     }
     // If no positiv item is remained in basket clear basket
     if (!$this->_anyPositiveItems($basket['items'])) {
         $basket['items'] = array();
     }
     if (is_numeric($amount)) {
         $basket['amount'] = $amount;
     } else {
         if ($object->getGrandTotal() > 0) {
             $basket['amount'] = $object->getGrandTotal();
         } elseif (count($basket['items']) == 0) {
             $basket['amount'] = 0;
         } else {
             $basket['amount'] = $this->getAmountByItems($basket['items']);
         }
     }
     // Ensure that the basket amount is never less than zero
     // In certain cases (i.e. in case of maloperation) the amount can become < 0
     if ($basket['amount'] < 0) {
         $basket['amount'] = 0;
     }
     return $basket;
 }
开发者ID:ratepay,项目名称:magento-module,代码行数:47,代码来源:Mapping.php


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