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


PHP Data::getWeeeTaxAppliedAmount方法代码示例

本文整理汇总了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;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:16,代码来源:Renderer.php

示例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));
 }
开发者ID:tingyeeh,项目名称:magento2,代码行数:21,代码来源:DataTest.php


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