當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。