Is there any way to create tax rule based on cart total product unit price? I need to implement New York 4% state tax for purchase price over $110. Thanks.
A little clarification. Tax should be apply based on unit price, not total price.
Out of the box Magento does not provide the ability to apply a tax rate based on the cart total. You would need to handle this programmatically or use a third-party sales tax extension with support for product taxability / exemptions in New York.
class TaxCalculation implements TaxCalculationInterface
{
/**
* {@inheritdoc}
*/
public function calculateTax(
\Magento\Tax\Api\Data\QuoteDetailsInterface $quoteDetails,
$storeId = null,
$round = true
) {
// step1 : From quote details get cart total without tax.
// if less then 110 set tax amount to 0
}
In short function stated above should be modified( By override or plugin) and you will get the required result.