Linked Questions

32 votes
4 answers
20k views

Modify tax rate on cart quote items and recalculate

I have a category of products which (legally) need to have their tax rate changed when you are ordering more than a certain quantity. I have extended the various tax models to get this working when ...
McNab's user avatar
  • 1,078
10 votes
3 answers
16k views

Magento 2 : Add Custom Tax Amount In Cart Programatically

I want to add custom tax amount to checkout cart programmatically. Here is the example. Cart Old Tax = 4.21 Custom Tax = 2 New Tax = 4.21 + 2 = 6 Check the screenshot below. I need this done ...
Dhiren Vasoya's user avatar
6 votes
4 answers
2k views

Magento2 : How to get equivalent class of "Mage::getModel('tax/calculation')"?

I am trying to convert below code in magento2. I'm unable to find equivalent class of Mage::getModel('tax/calculation') in Magento2. $taxCalculation = Mage::getModel('tax/calculation'); $request = $...
Vishwas Soni's user avatar
  • 1,567
3 votes
1 answer
2k views

Magento 2 - Facebook pixel tracking on AddToCart event

Note: Before marking it as duplicate please read description carefully I am creating a module for Facebook pixel tracking and I am stuck at AddToCart event. I have seen some 3rd party extensions, ...
Shoaib Munir's user avatar
  • 9,482
3 votes
1 answer
665 views

Magento 2 create ajax request from out of magento

I wanna create Ajax request from empty HTML with jQuery. I do like this $.ajax({ url: "http://****.com/rest/V1/integration/admin/token?username=***&password=****", type: "POST", ...
gh darvishani's user avatar
3 votes
1 answer
1k views

Argument passing error in after plugin

I am trying to create after plugin for delete function of Magento\Tax\Model\TaxRuleRepository function looks like follows public function delete(TaxRuleInterface $rule) { $ruleId = $rule-...
Anshu Mishra's user avatar
  • 8,990
1 vote
2 answers
8k views

How to change the price in quote while adding product to cart?

I want to apply a custom price for the current order. I read that I should use sales_quote_add_item, But its looks like I am doing something wrong. I found some tutorials for magento1 but not for ...
Rahul Chaurasia's user avatar
1 vote
1 answer
7k views

How to change the tax amount in quote

I wish to change the tax amount in checkout programmatically I am using following code let me know If I am making any mistake. $session= Mage::getSingleton("checkout/session"); $quote_id = $session-&...
Pratik bhatt's user avatar
  • 1,490
1 vote
1 answer
3k views

Magento 2 : Add discount and tax in order programmatically

I used below link to place an order, but in that, I cannot get any solution. how to add the tax or discount in order so anyone has done this thing? please help to solve this issue. http://www....
Kushal Dani's user avatar
  • 2,114
1 vote
2 answers
4k views

how to update tax amount with custom price in magento 2

HOW TO UPDATE TAX WITH CUSTOM VALUE IN CART OR CHECKOUT.My requirement was when customer click add to cart and he move to cart that time i want to update tax with some API so do the needful.
sangan's user avatar
  • 437
1 vote
2 answers
90 views

What are the best blogs for Magento 2 tutorial?

I'm learning Magento 2 and would like to improve my skill in Magento. I can see that there are a lot of blogs available for Magento tutorial but, could you please suggest me the best blog for Magento ...
Siva's user avatar
  • 1,120
1 vote
1 answer
671 views

update price Observer is not working on cart page

Here is the modules config file: app\etc\modules\Cart_Updates.xml <?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Cart_Updates> <codePool&...
Zoo's user avatar
  • 33
1 vote
1 answer
3k views

Get Tax class name from id in magento2

I have used below code to get tax class name from id. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $taxClassObj = $objectManager->create('Magento\Tax\Model\TaxClass\Source ...
Jafar Pinjar's user avatar
  • 1,949
1 vote
1 answer
103 views

Add to cart not working in custom template magento2

I am getting add to cart url by product object like below. Block file. use Magento\Catalog\Api\ProductRepositoryInterface; use \Magento\Checkout\Helper\Cart as CartHelper; class CustomAdd ...
Jafar Pinjar's user avatar
  • 1,949
1 vote
0 answers
2k views

Magento 2 Tax Calculation based on Row Total

I have my tax set to calculate tax on total however am getting slight miss matches in edge cases with Sage Accounts 50. From what i can tell this calculates on row total. So have changed this and ...
harri's user avatar
  • 5,485

15 30 50 per page