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


PHP Mage_Core_Block_Abstract::getOrder方法代码示例

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


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

示例1: initTotals

 /**
  * Generate and add the CoD totals to the parent block.
  *
  * @return Balticode_CashOnDelivery_Block_Totals_Abstract
  */
 public function initTotals()
 {
     $this->_prepareTotals();
     if (Mage::helper('Balticode_Cashondelivery/data')->isMe($this->_parentBlock->getOrder())) {
         if ($this->_totalObject->getCodFee()) {
             $label = $this->__('Cash on Delivery fee');
             $value = $this->_totalObject->getCodFee();
             $baseValue = $this->_totalObject->getBaseCodFee();
             $code = 'balticode_cashondelivery_fee';
             if (Mage::helper('Balticode_Cashondelivery/data')->displayCodBothPrices()) {
                 $label = $this->__('Cash on Delivery fee (Excl.Tax)');
                 $totalInclLabel = $this->__('Cash on Delivery fee (Incl.Tax)');
                 $totalInclValue = $this->_totalObject->getCodFee() + $this->_totalObject->getCodTaxAmount();
                 $totalInclBaseValue = $this->_totalObject->getBaseCodFee() + $this->_totalObject->getBaseCodTaxAmount();
                 $totalInclCode = 'Balticode_cashondelivery_fee_incl';
             } elseif (Mage::helper('Balticode_Cashondelivery/data')->displayCodFeeIncludingTax()) {
                 $value = $this->_totalObject->getCodFee() + $this->_totalObject->getCodTaxAmount();
                 $baseValue = $this->_totalObject->getBaseCodFee() + $this->_totalObject->getBaseCodTaxAmount();
             }
             $totalObject = $this->_getTotalObject($label, $value, $baseValue, $code);
             $this->_addTotalToParent($totalObject);
             if (isset($totalInclLabel)) {
                 $totalInclObject = $this->_getTotalObject($totalInclLabel, $totalInclValue, $totalInclBaseValue, $totalInclCode);
                 $this->_addTotalToParent($totalInclObject, 'balticode_cashondelivery_fee');
             }
         }
     }
     return $this;
 }
开发者ID:uab-balticode,项目名称:dpd-cod-payment-module-magento,代码行数:34,代码来源:Abstract.php

示例2: _shouldAddPopup

 /**
  * Returns true if edit link should be added to given block
  * 
  * @param Mage_Core_Block_Abstract $block
  * @return boolean
  */
 protected function _shouldAddPopup(Mage_Core_Block_Abstract $block)
 {
     return $block instanceof Mage_Sales_Block_Order_Item_Renderer_Default && Mage::helper('editcustomoptions/data')->isOrderEditable($block->getOrder()) && $block->getItem()->getProduct()->getHasOptions();
 }
开发者ID:helirexi,项目名称:EditCustomOptions,代码行数:10,代码来源:Observer.php


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