How does \Magento\Weee\Model\Total\Quote\Weee::resetItemData() work?

fixed-product-tax
totals
quote
quote-totals
total-fpt
(Dmitry Fedyuk) #1

Context: How does \Magento\Weee\Model\Total\Quote\Weee::collect() work?

app/code/Magento/Weee/Model/Total/Quote/Weee.php#L311-L334

/**
 * Reset information about Tax and Wee on FPT for shopping cart item
 *
 * @param   \Magento\Quote\Model\Quote\Item\AbstractItem $item
 * @return  void
 */
protected function resetItemData($item)
{
	$this->weeeData->setApplied($item, []);

	$item->setAssociatedTaxables([]);

	$item->setBaseWeeeTaxDisposition(0);
	$item->setWeeeTaxDisposition(0);

	$item->setBaseWeeeTaxRowDisposition(0);
	$item->setWeeeTaxRowDisposition(0);

	$item->setBaseWeeeTaxAppliedAmount(0);
	$item->setBaseWeeeTaxAppliedRowAmnt(0);

	$item->setWeeeTaxAppliedAmount(0);
	$item->setWeeeTaxAppliedRowAmount(0);
}
0 Likes