本文整理汇总了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;
}
示例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();
}