Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Tax\Model\Config $taxConfig, \Magento\Tax\Api\TaxCalculationInterface $taxCalculationService, \Magento\Tax\Api\Data\QuoteDetailsInterfaceFactory $quoteDetailsDataObjectFactory, \Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory $quoteDetailsItemDataObjectFactory, \Magento\Tax\Api\Data\TaxClassKeyInterfaceFactory $taxClassKeyDataObjectFactory, CustomerAddressFactory $customerAddressFactory, CustomerAddressRegionFactory $customerAddressRegionFactory, \Magento\Tax\Helper\Data $taxData, Json $serializer=null) | |
collect (\Magento\Quote\Model\Quote $quote, \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment, \Magento\Quote\Model\Quote\Address\Total $total) | |
mapQuoteExtraTaxables (\Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory $itemDataObjectFactory, Address $address, $useBaseCurrency) | |
fetch (\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Quote\Address\Total $total) | |
processConfigArray ($config, $store) | |
getLabel () | |
![]() | |
__construct (\Magento\Tax\Model\Config $taxConfig, \Magento\Tax\Api\TaxCalculationInterface $taxCalculationService, \Magento\Tax\Api\Data\QuoteDetailsInterfaceFactory $quoteDetailsDataObjectFactory, \Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory $quoteDetailsItemDataObjectFactory, \Magento\Tax\Api\Data\TaxClassKeyInterfaceFactory $taxClassKeyDataObjectFactory, CustomerAddressFactory $customerAddressFactory, CustomerAddressRegionFactory $customerAddressRegionFactory) | |
mapAddress (QuoteAddress $address) | |
mapItems (ShippingAssignmentInterface $shippingAssignment, $priceIncludesTax, $useBaseCurrency) | |
populateAddressData (QuoteDetailsInterface $quoteDetails, QuoteAddress $address) | |
updateItemTaxInfo ($quoteItem, $itemTaxDetails, $baseItemTaxDetails, $store) | |
convertAppliedTaxes ($appliedTaxes, $baseAppliedTaxes, $extraInfo=[]) | |
![]() | |
setCode ($code) | |
getCode () | |
getLabel () | |
collect (\Magento\Quote\Model\Quote $quote, \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment, \Magento\Quote\Model\Quote\Address\Total $total) | |
fetch (\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Quote\Address\Total $total) | |
_setTotal (\Magento\Quote\Model\Quote\Address\Total $total) | |
getItemRowTotal (\Magento\Quote\Model\Quote\Item\AbstractItem $item) | |
getItemBaseRowTotal (\Magento\Quote\Model\Quote\Item\AbstractItem $item) | |
getIsItemRowTotalCompoundable (\Magento\Quote\Model\Quote\Item\AbstractItem $item) | |
processConfigArray ($config, $store) | |
Protected Member Functions | |
clearValues (Address\Total $total) | |
getQuoteTaxDetails ($shippingAssignment, $total, $useBaseCurrency) | |
![]() | |
prepareQuoteDetails (ShippingAssignmentInterface $shippingAssignment, $itemDataObjects) | |
processShippingTaxInfo (ShippingAssignmentInterface $shippingAssignment, QuoteAddress\Total $total, $shippingTaxDetails, $baseShippingTaxDetails) | |
_saveAppliedTaxes (QuoteAddress\Total $total, $applied, $amount, $baseAmount, $rate) | |
includeShipping () | |
includeItems () | |
includeExtraTax () | |
saveAppliedTaxes () | |
getNextIncrement () | |
![]() | |
_setAddress (\Magento\Quote\Model\Quote\Address $address) | |
_getAddress () | |
_getTotal () | |
_setAmount ($amount) | |
_setBaseAmount ($baseAmount) | |
_addAmount ($amount) | |
_addBaseAmount ($baseAmount) | |
_getAddressItems (\Magento\Quote\Model\Quote\Address $address) | |
Protected Attributes | |
$counter = 0 | |
$_taxData | |
$_config | |
$_discountTaxCompensationes = [] | |
![]() | |
$_config | |
$counter = 0 | |
$taxCalculationService | |
$quoteDetailsDataObjectFactory | |
$customerAddressFactory | |
$customerAddressRegionFactory | |
$taxClassKeyDataObjectFactory | |
$quoteDetailsItemDataObjectFactory | |
![]() | |
$_code | |
$_address = null | |
$_canAddAmountToAddress = true | |
$_canSetAddressAmount = true | |
$_itemRowTotalKey = null | |
$total | |
Tax totals calculation model @SuppressWarnings(PHPMD.CouplingBetweenObjects)
__construct | ( | \Magento\Tax\Model\Config | $taxConfig, |
\Magento\Tax\Api\TaxCalculationInterface | $taxCalculationService, | ||
\Magento\Tax\Api\Data\QuoteDetailsInterfaceFactory | $quoteDetailsDataObjectFactory, | ||
\Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory | $quoteDetailsItemDataObjectFactory, | ||
\Magento\Tax\Api\Data\TaxClassKeyInterfaceFactory | $taxClassKeyDataObjectFactory, | ||
CustomerAddressFactory | $customerAddressFactory, | ||
CustomerAddressRegionFactory | $customerAddressRegionFactory, | ||
\Magento\Tax\Helper\Data | $taxData, | ||
Json | $serializer = null |
||
) |
Class constructor
\Magento\Tax\Model\Config | $taxConfig | |
\Magento\Tax\Api\TaxCalculationInterface | $taxCalculationService | |
\Magento\Tax\Api\Data\QuoteDetailsInterfaceFactory | $quoteDetailsDataObjectFactory | |
\Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory | $quoteDetailsItemDataObjectFactory | |
\Magento\Tax\Api\Data\TaxClassKeyInterfaceFactory | $taxClassKeyDataObjectFactory | |
CustomerAddressFactory | $customerAddressFactory | |
CustomerAddressRegionFactory | $customerAddressRegionFactory | |
\Magento\Tax\Helper\Data | $taxData | |
Json | $serializer |
Definition at line 69 of file Tax.php.
|
protected |
collect | ( | \Magento\Quote\Model\Quote | $quote, |
\Magento\Quote\Api\Data\ShippingAssignmentInterface | $shippingAssignment, | ||
\Magento\Quote\Model\Quote\Address\Total | $total | ||
) |
Collect tax totals for quote address
\Magento\Quote\Model\Quote | $quote | |
ShippingAssignmentInterface | $shippingAssignment | |
Address\Total | $total |
Definition at line 103 of file Tax.php.
fetch | ( | \Magento\Quote\Model\Quote | $quote, |
\Magento\Quote\Model\Quote\Address\Total | $total | ||
) |
Add tax totals information to address object
\Magento\Quote\Model\Quote | $quote | |
Address\Total | $total |
Modify subtotal
Definition at line 318 of file Tax.php.
getLabel | ( | ) |
|
protected |
Call tax calculation service to get tax details on the quote and items
ShippingAssignmentInterface | $shippingAssignment | |
Address\Total | $total | |
bool | $useBaseCurrency |
Definition at line 182 of file Tax.php.
mapQuoteExtraTaxables | ( | \Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory | $itemDataObjectFactory, |
Address | $address, | ||
$useBaseCurrency | |||
) |
Map extra taxables associated with quote
\Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory | $itemDataObjectFactory | |
Address | $address | |
bool | $useBaseCurrency |
Definition at line 222 of file Tax.php.
processConfigArray | ( | $config, | |
$store | |||
) |
Process model configuration array. This method can be used for changing totals collect sort order
array | $config | |
store | $store |
Definition at line 417 of file Tax.php.