本文整理汇总了PHP中Magento\Weee\Helper\Data::getWeeeTaxAppliedAmount方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::getWeeeTaxAppliedAmount方法的具体用法?PHP Data::getWeeeTaxAppliedAmount怎么用?PHP Data::getWeeeTaxAppliedAmount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Weee\Helper\Data
的用法示例。
在下文中一共展示了Data::getWeeeTaxAppliedAmount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayFinalPrice
/**
* Whether to display final price that include Weee amounts
*
* @return bool
*/
public function displayFinalPrice()
{
$flag = $this->weeeHelper->typeOfDisplay(WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, $this->getZone(), $this->getStoreId());
if (!$flag) {
return false;
}
if ($this->weeeHelper->getWeeeTaxAppliedAmount($this->getItem()) <= 0) {
return false;
}
return true;
}
示例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));
}