Linked Questions
20 questions linked to/from How to set custom tax price during add to cart in Magento 2
32
votes
4answers
18k 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 ...
11
votes
2answers
8k 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 ...
1
vote
1answer
6k 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-&...
6
votes
4answers
1k 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 = $...
0
votes
1answer
3k 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 ...
1
vote
2answers
2k 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.
0
votes
1answer
1k 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....
1
vote
1answer
1k 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 ...
1
vote
1answer
637 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&...
3
votes
1answer
598 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, ...
1
vote
0answers
947 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 ...
2
votes
1answer
535 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-...
0
votes
1answer
366 views
Create/Update Attribute Option Custom api issue
I have created custom rest api to create/update attribute options by attribute_id.
Here is my webapi.xml file code.
<route url="/V1/attribute/AttributeOption" method="POST">
<service ...
0
votes
3answers
298 views
Custom price in cart not working in Magento 2.3.1 observer
I am developing a magento site for furniture sale. I have some grouped products.
If a customer add 1 piece of any product of the group to cart, the special price will be added to cart.
If the ...
3
votes
1answer
260 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",
...