Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
const | CONFIG_DEFAULT_CUSTOMER_TAX_CLASS = 'tax/classes/default_customer_tax_class' |
const | CONFIG_DEFAULT_PRODUCT_TAX_CLASS = 'tax/classes/default_product_tax_class' |
Protected Member Functions | |
_getTaxRateSubtotals ($order) | |
calculateTaxForOrder (EntityInterface $current) | |
![]() | |
_getRequest () | |
_getModuleName () | |
_getUrl ($route, $params=[]) | |
Protected Attributes | |
$_config | |
$_postCodeSubStringLength = 10 | |
$jsonHelper | |
$_storeManager | |
$_localeFormat | |
$_orderTaxCollectionFactory | |
$_localeResolver | |
$catalogHelper | |
$orderTaxManagement | |
$priceCurrency | |
![]() | |
$_moduleName | |
$_request | |
$_moduleManager | |
$_logger | |
$_urlBuilder | |
$_httpHeader | |
$_eventManager | |
$_remoteAddress | |
$urlEncoder | |
$urlDecoder | |
$scopeConfig | |
$_cacheConfig | |
Tax helper
@SuppressWarnings(PHPMD.TooManyFields) @SuppressWarnings(PHPMD.CouplingBetweenObjects) @api
__construct | ( | \Magento\Framework\App\Helper\Context | $context, |
\Magento\Framework\Json\Helper\Data | $jsonHelper, | ||
Config | $taxConfig, | ||
\Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
\Magento\Framework\Locale\FormatInterface | $localeFormat, | ||
\Magento\Tax\Model\ResourceModel\Sales\Order\Tax\CollectionFactory | $orderTaxCollectionFactory, | ||
\Magento\Framework\Locale\ResolverInterface | $localeResolver, | ||
\Magento\Catalog\Helper\Data | $catalogHelper, | ||
OrderTaxManagementInterface | $orderTaxManagement, | ||
PriceCurrencyInterface | $priceCurrency, | ||
Json | $serializer = null |
||
) |
Constructor
\Magento\Framework\App\Helper\Context | $context | |
\Magento\Framework\Json\Helper\Data | $jsonHelper | |
Config | $taxConfig | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Magento\Framework\Locale\FormatInterface | $localeFormat | |
\Magento\Tax\Model\ResourceModel\Sales\Order\Tax\CollectionFactory | $orderTaxCollectionFactory | |
\Magento\Framework\Locale\ResolverInterface | $localeResolver | |
\Magento\Catalog\Helper\Data | $catalogHelper | |
OrderTaxManagementInterface | $orderTaxManagement | |
PriceCurrencyInterface | $priceCurrency | |
Json | $serializer | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 117 of file Data.php.
|
protected |
applyTaxAfterDiscount | ( | $store = null | ) |
applyTaxOnCustomPrice | ( | $store = null | ) |
Check if tax can be applied to custom price
null | string | bool | int | Store | $store |
Definition at line 515 of file Data.php.
applyTaxOnOriginalPrice | ( | $store = null | ) |
Check if tax should be applied just to original price
null | string | bool | int | Store | $store |
Definition at line 530 of file Data.php.
|
protected |
discountTax | ( | $store = null | ) |
displayBothPrices | ( | $store = null | ) |
displayCartBothPrices | ( | $store = null | ) |
displayCartPriceExclTax | ( | $store = null | ) |
displayCartPriceInclTax | ( | $store = null | ) |
displayFullSummary | ( | $store = null | ) |
displayPriceExcludingTax | ( | ) |
Check if we have display in catalog prices excluding tax
Definition at line 370 of file Data.php.
displayPriceIncludingTax | ( | ) |
Check if we have display in catalog prices including tax
Definition at line 360 of file Data.php.
displaySalesBothPrices | ( | $store = null | ) |
displaySalesPriceExclTax | ( | $store = null | ) |
displaySalesPriceInclTax | ( | $store = null | ) |
displaySalesSubtotalBoth | ( | $store = null | ) |
displaySalesSubtotalExclTax | ( | $store = null | ) |
displaySalesSubtotalInclTax | ( | $store = null | ) |
displayShippingBothPrices | ( | ) |
Returns whether the shipping price should display both with and without taxes
Definition at line 433 of file Data.php.
displayShippingPriceExcludingTax | ( | ) |
Returns whether the shipping price should display without taxes
Definition at line 423 of file Data.php.
displayShippingPriceIncludingTax | ( | ) |
Returns whether the shipping price should display with taxes included
Definition at line 413 of file Data.php.
displayZeroTax | ( | $store = null | ) |
getCalculatedTaxes | ( | $source | ) |
Get calculated taxes for each tax class
This method returns array with format: array( $index => array( 'tax_amount' => $taxAmount, 'base_tax_amount' => $baseTaxAmount, 'title' => $title, 'percent' => $percent ) )
Definition at line 581 of file Data.php.
getCalculationAlgorithm | ( | $store = null | ) |
getCalculationSequence | ( | $store = null | ) |
getDefaultCustomerTaxClass | ( | ) |
getDefaultProductTaxClass | ( | ) |
getPostCodeSubStringLength | ( | ) |
getPriceDisplayType | ( | $store = null | ) |
getPriceFormat | ( | $store = null | ) |
getShippingPrice | ( | $price, | |
$includingTax = null , |
|||
$shippingAddress = null , |
|||
$ctc = null , |
|||
$store = null |
|||
) |
Get shipping price
float | $price | |
bool | null | $includingTax | |
Address | null | $shippingAddress | |
int | null | $ctc | |
null | string | bool | int | Store | $store |
Definition at line 459 of file Data.php.
getShippingPriceDisplayType | ( | $store = null | ) |
getShippingTaxClass | ( | $store | ) |
getTaxBasedOn | ( | $store = null | ) |
Get value of "Apply Tax On" custom/original price configuration settings
null | string | bool | int | Store | $store |
Definition at line 500 of file Data.php.
isCatalogPriceDisplayAffectedByTax | ( | $store = null | ) |
Check whether display price is affected by different tax rates
null | int | string | Store | $store |
Definition at line 786 of file Data.php.
isCrossBorderTradeEnabled | ( | $store = null | ) |
needPriceConversion | ( | $store = null | ) |
priceIncludesTax | ( | $store = null | ) |
shippingPriceIncludesTax | ( | $store = null | ) |
const CONFIG_DEFAULT_CUSTOMER_TAX_CLASS = 'tax/classes/default_customer_tax_class' |
const CONFIG_DEFAULT_PRODUCT_TAX_CLASS = 'tax/classes/default_product_tax_class' |