本文整理汇总了PHP中Magento\Weee\Helper\Data::getWeeeTaxAppliedRowAmount方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::getWeeeTaxAppliedRowAmount方法的具体用法?PHP Data::getWeeeTaxAppliedRowAmount怎么用?PHP Data::getWeeeTaxAppliedRowAmount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Weee\Helper\Data
的用法示例。
在下文中一共展示了Data::getWeeeTaxAppliedRowAmount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFinalRowDisplayPriceExclTax
/**
* Get final row display price excluding tax, this will add Weee amount to rowTotal
*
* @return float
*/
public function getFinalRowDisplayPriceExclTax()
{
$rowTotalExclTax = $this->getItem()->getRowTotal();
if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
return $rowTotalExclTax;
}
return $rowTotalExclTax + $this->weeeHelper->getWeeeTaxAppliedRowAmount($this->getItem());
}
示例2: testGetRecursiveAmountBundle
public function testGetRecursiveAmountBundle()
{
$testAmountUnit1 = 1;
$testAmountUnit2 = 2;
$testTotalUnit = $testAmountUnit1 + $testAmountUnit2;
$testAmountRow1 = 33;
$testAmountRow2 = 444;
$testTotalRow = $testAmountRow1 + $testAmountRow2;
$itemProductSimple1 = $this->getMock('\\Magento\\Quote\\Model\\Quote\\Item', ['getWeeeTaxAppliedAmount', 'getWeeeTaxAppliedRowAmount'], [], '', false);
$itemProductSimple2 = $this->getMock('\\Magento\\Quote\\Model\\Quote\\Item', ['getWeeeTaxAppliedAmount', 'getWeeeTaxAppliedRowAmount'], [], '', false);
$itemProductSimple1->expects($this->any())->method('getWeeeTaxAppliedAmount')->will($this->returnValue($testAmountUnit1));
$itemProductSimple1->expects($this->any())->method('getWeeeTaxAppliedRowAmount')->will($this->returnValue($testAmountRow1));
$itemProductSimple2->expects($this->any())->method('getWeeeTaxAppliedAmount')->will($this->returnValue($testAmountUnit2));
$itemProductSimple2->expects($this->any())->method('getWeeeTaxAppliedRowAmount')->will($this->returnValue($testAmountRow2));
$itemProductBundle = $this->getMock('\\Magento\\Quote\\Model\\Quote\\Item', ['getHasChildren', 'isChildrenCalculated', 'getChildren'], [], '', false);
$itemProductBundle->expects($this->any())->method('getHasChildren')->will($this->returnValue(true));
$itemProductBundle->expects($this->any())->method('isChildrenCalculated')->will($this->returnValue(true));
$itemProductBundle->expects($this->any())->method('getChildren')->will($this->returnValue([$itemProductSimple1, $itemProductSimple2]));
$this->assertEquals($testTotalUnit, $this->helperData->getWeeeTaxAppliedAmount($itemProductBundle));
$this->assertEquals($testTotalRow, $this->helperData->getWeeeTaxAppliedRowAmount($itemProductBundle));
}