Jump to content

Adding manual price on Total price - VAT incorrect


shieldcy

Recommended Posts

Hello,

I have created a custom functionality in which a specific attribute group includes an additional price.
EG. Attribute A = +300$

So when the total product price is 500$ (including taxes), then I add 300$ into it both in js files and Product class to be calculated correctly in cart page.

We end up with 800$ total price (including the manual value of the attribute).

 

When I click on "Add to cart" button I get the product with 800$ price in my cart.

The total price incl vat is being displayed as 800$ but total price excl vat or vat itself is wrong.

 

I think the reason is that the "attribute A (300$)" is being added into the calculated product price which is with VAT.
But this 300$ value is not defined with or without tax. It is just a number added to the total price.
And I assume by manually adding 300 to total price (500), it shows the total price incl vat correctly (800) but excluding vat is not correct as I am not adding the 300 to the total price excl. vat.

 

How can I manipulate the total price excluding vat or the vat itself? Where does this calculation takes place in cart/basket page or product page?
Or an easier solution, how can I use a manual constant price (like 300$)  and add it to total price without causing issues on taxes?
This "300$" is supposed to be a value including TAX.

 

Any help would be much appreciated,

Thank you

Link to comment
Share on other sites

  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...