Magento Tax - Custom calculation - php

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?

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.

Customize shipping price calculation in Magento

I've got the following scenario:
Regular category
Sales category
I will sort countries by zone to make the explanation easy:
Lebanon, zone A
(some countries), zone B
(all remaining countries), zone C
Shipping is based on the total purchased amount, and not on weight, so the conditions to calculate the shipping cost are the following:
If shipping in Lebanon, the category is not "sales" and the price is below 50$, then 3$, otherwise free shipping.
If shipping in zone B, the category is not "sales" and the price is below 100$, then 15$, otherwise free shipping.
If shipping in zone C, the category is not "sales" and the price is between 0$ and 149$, then 50$, otherwise if the price is between 150$ and 199$, then 30$, else free shipping.
What is the best practice to implement this kind of shipping prices in Magento?
Here is the step-by-step guide:-
– Go to System –> Configuration –> SALES –> Shipping Methods –> Table Rates
– Select ‘Enabled‘ to ‘Yes’
– Click the ‘Save Config‘ present in top right corner of the page
– From the ‘Current Configuration Scope‘ (which is at the top left corner), choose ‘Main Website‘
Now, you will see as in the following figure:-
Tablerates Configuration
As you can see from the figure, there are three main parts:- Condition, Export and Import.
– As we are making different shipping rate for different country, so select Condition = ‘Price vs. Destination’
– Click ‘Export CSV‘ and a csv file is downloaded with the required headers like country, region, shipping price, etc.
– Fill the csv with the shipping rate and country name. For example, see the following figure:-
Tablerates CSV
– The asterik (*) in region and postal code column means that the shipping price is applicable for all regions and postal code respectively.
– The zero (0) in order subtotal means that the shipping price is applicable for all orders whose subtotal is greater than zero.
– In the last row (7th row), you can see ‘AK’ as region. Hence, comparing the 2nd row and 7th row where the country is USA, we see that the shipping price for all other US region is 10. But, the shipping price for AK (Alaska) is 15.
– Now, Import the csv you just filled.
– Click ‘Save Config‘ button present in top right corner of the page.
– You are done. The new country specific shipping rate has been saved. You can test it by checking out products from frontend.
Hope this helps. Thanks.

set different rates for different products like silver gold woocomerce

In woo commerce there is no such thing available to set different prices for a product that adds up together to show total price of the product.
For example in Silver rates for silver / Kg are different and manufacturing rates for each product are different.
So for each product on product page i want to mention the total prices of single product mentioning the rates put up for each thing:
example (to be shown on product page) -
silver coin 8gm - 400 Rs (these rates are on the basis of cost/Gm . Here 50.0/Gm )
manufacturing cost- 110 Rs
Total prices : 510 Rs
Also after all shopping , i also have to apply shipping charges in the cart , depending upon the area etc. Which is not a problem for me. However i need to solve this problem for multiple rates for single product ? any solutions?

My cart shows wrong subtotal and tax

My cart shows wrong subtotal and I think this is also affecting calculation of tax (20%). In the shopping cart and in the checkout, price displayed are correct but subtotal and total have no 20% VAT TAX effect on it.
Any idea what could be the problem?
In the admin panel you can set whether totals and prices are shown with/without tax, go to:
System->Configuration->Sales->Tax
Amongst other things, you can set
Display Prices
Display Subtotal
Display Shipping Amount
To be including tax, excluding tax or including and excluding tax, and
Include Tax In Grand Total
Display Full Tax Summary
Display Zero Tax Subtotal
to be yes or no for places like the cart, the invoice, etc.

Categories