Magento Tax Calculation Method Based On - Customergroup - php

Is it possible to change the "Tax Calculation Method Based On" for different Customer Groups?
For Example, General should be Unit Price, and Retailer should be Total.
I know, its possible with different Websites, but i want it inside my current one.

Sales > Tax > Customer Tax Classes - Add a new Customer Tax Class for these customers.
Sales > Tax > Product Tax Classes - Add a new Product Tax Class for the selected products.
Sales > Tax > Manage Tax Zones and Rates - Add a new Tax Rate, applying it the the United Kingdom and a Rate Percent of "0."
Sales > Tax > Manage Tax Rules - Add a new tax rule, applying it to the Customer Tax Class, Product Tax Class and Tax Rate you just created in Steps 1, 2 and 3. This tax rule is what ties together the eligible customers and eligible products and applies the tax rate of "0" to those products.
Sales > Tax > Manage Tax Rules - Make sure your existing rules apply the proper Tax Rates for other Customer Tax Classes to the new Product Tax Class you created in Step 2. You want to ensure your non-eligible customers still have the proper tax applied.
Customers > Customer Groups - Add a new Customer Group for the eligible customers and assign it the Customer Tax Class that you created in Step 1.
Catalog > Manager Products - Bulk edit the products that should be tax exempt for eligible customers and update their Tax Class to the new Product Tax Class you just created in Step 2

Related

WooCommerce override "Tax Included In Price" setting for user role?

We've got a custom user role called "Trade Customer."
For normal customers, the price is set in the system as INCLUDING tax - so £59.99 is the price including tax. For Trade Customers, the price is imported from an external system and for example would be £15.00 and that's NOT INCLUDING tax.
Under WooCommerce > Settings > Tax we've got the Prices entered with tax option set to Yes, I will enter prices inclusive of tax.
The tax band is 20%.
So when a customer buys the £59.99 item at the cart it shows £47.99 + £12 TAX.
With a trade customer, we want this to work the other way round, so the price in the store is £15.00, then when they get to the checkout it shows £15.00 + £3 TAX for a total of £18.
We've tried the following code to change the tax to show at the cart for Trade Users:
// Change tax setting for trade
function s9_override_tax_settings_trade( $value ) {
if ( s9_has_user_role('trade_customer') ) {
return 'excl';
}
return $value;
}
add_filter( 'pre_option_woocommerce_tax_display_shop', 's9_override_tax_settings_trade' );
add_filter( 'pre_option_woocommerce_tax_display_cart', 's9_override_tax_settings_trade' );
The problem is, this only inverts the price so instead of showing £15.00 + £3 VAT, it shows £12.00 + £3 VAT when we want it to show £15.00 + £3 VAT.
We effectively need to override the Prices entered with tax option of Yes, I will enter prices inclusive of tax to No, I will enter prices exclusive of tax but only for trade customers but I can't seem to find a filter for this.
Any ideas on how this can be achieved?

Woocommerce tax calculation for coexistence of products incl VAT and excl VAT

Working with Woocommerce I have the following issue:
The shop consists of products with prices the incl VAT and exclude VAT.
All of the products have the same VAT of 19%.
Unfortuantely in Woocommerce you can only choose between include VAT in your prices and exclude VAT in your prices.
As I use a PDF Invoice Plugin I need woocommerce to distinguish between two calculations that should look like that in the end.
order calculation for a prod with price set excl VAT:
Product#1 2,00€
subtotal 2,00€
+ 19% VAT 0,38€
TOTAL. 2,38€
order calculation for a prod with price set incl VAT:
Product#2 3,50€
subtotal 2,94€
+ 19% VAT 0,56€
TOTAL. 3,50€
I really have no idea how to solve this as I depend on this to finish the shop for my client. Any help is welcome.
Please not that this is not about how the product is displayed in the shop, but how the information might look when in shop_order.

Programmatically add product to Virtuemart?

For a customer I am building a Virtuemart 2.0.26d website.
Because of a local law, for each unit of a product that is ordered a fee must be added.
So, when ordering 4 products, the fee must be charged 4 times. By law it is required that the total sum of this fee is visible on the invoice/order confirmation.
I looked at the price rules in Virtuemart, but they don't seem to have an option for this. There is a price modifier after tax, but then the fee is visibile as an negative discount. Something I don't want.
The only solution I came up with is to make a new product for the fee and programmatically add this product for each unit. Can this be done by making a Virtuemart Plugin, or must I change the core for this?
Or are there better solutions for this problem?
You can add extra charge by Taxes & Calculation Rules.
create new rules and select tax per product for Type of Arithmetic Operation and select Math Operation + Or +% as per you want to add extra fee per product.
You could add a custom field to each product with the fee amount and alter the code of the payment plugin to add this fee to your order.

Magento Tax - Custom calculation

I have products added to my Magento store with 20% tax included.
I have a store view that is shown to USA customers.
I require the price to remain the same, but hide the Tax in the cart/orders. Also I need to double the tax and show it, if they are in the USA but their shipping address is not.
Examples:
Normal price £10 (inc £2 tax)
USA price: $10 (no reference of tax/$0 tax)
USA price but shipping to another country: $12 (inc $2 tax)
I have the prices working as required, I just need some help as to where I can hide the tax and also double it depending on shipping country.
In Magento admin, in the Promotion menu, there are the so called "Shopping Cart Tax Rules" and "Catalog Price Rules". Here you can set taxes to Countries, Customers, Categories, etc.
Also in System->Configuration->Taxes (if I remember well) there are some settings regarding the display of taxes.
Have you tried any of these?

How to set two tax class on single product in magento?

i need to set tax rate for two tax class for "Virginia".
4.0% State Sales Tax + 1.0% State Sales Tax = 5%
1.0% County Sales Tax = 1%
I set tax rule like my below image:
It displays in Front end like:
How can I display both tax and calculate both tax in cart page?
It is possible to assign only one Product Tax Class to one product. However you can create three Product Tax Classes for example
1) Only State Sales Tax
2) Only County Sales Tax
3) State Sales Tax and County Sales Tax
and then create two Tax Rules
Rule1
Product Tax Class: Only State Sales Tax, State Sales Tax and County Sales Tax
Tax Rate: State Sales Tax
Rule2
Product Tax Class: Only County Sales Tax, State Sales Tax and County Sales Tax
Tax Rate: County Sales Tax
Then you can be able to manage the tax rates for the products for all combinations by assigning the correct Product Tax Class. The products with class State Sales Tax and County Sales Tax will be displayed with both tax rates in cart, checkout etc.

Categories