I have certain items that are non-Taxable. UK law states that if items purchased are non taxable then the shipping is non taxable. If items are taxable, then shipping should be taxable.
The problem I've got is that even if a customer purchases a non-taxable item, it still adds tax to the shipping in OpenCart.
Does anyone know of a way around this or whether there is an extension for it?
Thanks for your help.
The problem I've got is that even if a customer purchases a non-taxable item, it still adds tax to the shipping in OpenCart.
Does anyone know of a way around this or whether there is an extension for it?
Thanks for your help.
Thanks, Jonathan, but I believe I've done that. But if I have only non-taxable products in the cart, it still applies tax to the shipping amount. I think it would take special logic to only apply tax to the shipping if the taxable total is not zero. I've spent several hours looking through the code and I think I'm getting close to finding it. OOP and MVC code is difficult to figure out from scratch without having to understand ALL of it.
I do have lots of add-ons, though (including for shipping), so there may be something non-standard about the one I'm using. If you're sure OpenCart operates as I expect, then I'll concentrate on my shipping add-on.
I do have lots of add-ons, though (including for shipping), so there may be something non-standard about the one I'm using. If you're sure OpenCart operates as I expect, then I'll concentrate on my shipping add-on.
Yes, taxes should only be applied when the shipping method has a tax class applied. You can test this out by installing a fresh installation of OpenCart and using the default modules.
If that's not working, it sounds like your shipping method is not applying the tax class properly. If it's an extension, you should contact the author for support.
If that's not working, it sounds like your shipping method is not applying the tax class properly. If it's an extension, you should contact the author for support.
I have a Texas state tax class applied to some products as well as the shipping method. Tax should not be calculated for shipping, though, when only non-taxable products are in the store. I think this is special logic that needs to be in the code (and I haven't found it yet). Without a special check, I would expect the code to apply tax to applicable products and also to shipping (whether or not there are taxable products).
I tried it on a clean install and the problem seems to happen there also.
I'm using Zone Plus Shipping by Qphoria.
I tried it on a clean install and the problem seems to happen there also.
I'm using Zone Plus Shipping by Qphoria.
I think I have the same problem with your Optional Fee/Discount extension. I'm using it to add an additional Rush shipping charge (we're corresponded about it lately). I see where taxes are applied in your code but I don't see yet how to check for a non-zero total of taxable products. Once I have that, it should be simple to add a check there, and in the base store code.
I think I have it fixed. I figured out how to see if there are taxable product amounts in the cart.
In catalog/model/total/shipping.php, I changed:
to:
I made a similar change to catalog/model/total/optional_fee.php.
I'm thinking I could write a totals add-on that would go through all total and add entries to back out taxes if there are no taxable products. I'm not sure that would look good on the invoice, though. I've got a start on it anyway and we'll see. That would keep from having to modify multiple files (including unknown add-ons).
I'm not happy about the solution, but at least I think it works.
I'm attaching my vqmod package.
| Oops, fixed typo in the code
In catalog/model/total/shipping.php, I changed:
Code: Select all
if ($this->session->data['shipping_method']['tax_class_id']) {
Code: Select all
$total_taxes = array_sum($this->cart->getTaxes());
$have_taxable_products = ($total_taxes > 0);
if ($this->session->data['shipping_method']['tax_class_id'] && $have_taxable_products) {
I'm thinking I could write a totals add-on that would go through all total and add entries to back out taxes if there are no taxable products. I'm not sure that would look good on the invoice, though. I've got a start on it anyway and we'll see. That would keep from having to modify multiple files (including unknown add-ons).
I'm not happy about the solution, but at least I think it works.
I'm attaching my vqmod package.
| Oops, fixed typo in the code
Last edited by ghartwig on Sun Mar 17, 2013 8:52 pm, edited 1 time in total.
Ah, I see the issue. Yes, the default OpenCart does not check whether any products are taxed to then apply tax to shipping, it just uses the tax class location and rate. I think the edit you've suggested should work fine. I'll see about adding this as an option to future releases of my shipping and fee/discount extensions.
I think it would be up to the individual state/country laws. With Texas in mind, looking at their laws here:scanreg wrote:is there ever a case where the item is non-taxable but the shipping is taxable?
thanks
http://www.window.state.tx.us/taxinfo/s ... l#collect8
Looking at number 8
you only charge tax on shipping if the product is taxed
This *almost* does it but it doesn't apportion the VAT, it just charges the whole lot. Remember HMRC only want the correct proportion of the postage fee to be VATted, not the whole lot.
Also it only charges the net postage for all 0% VAT orders when what would be much more desirable is if it charged the standard gross postage rate, only with 0% VAT.
Also it only charges the net postage for all 0% VAT orders when what would be much more desirable is if it charged the standard gross postage rate, only with 0% VAT.
It depends on the country.scanreg wrote:is there ever a case where the item is non-taxable but the shipping is taxable?
thanks
In Australia, our GST (equivalent of VAT) is always charged on shipping because shipping is a service. It doesn't matter whether the items in the cart are GST free.
In the UK by contrast, the shipping should always reflect the VAT status of the items being purchased.
So if you have both taxed and non-taxed items in the cart, the tax on shipping should reflect the proportional amount of tax paid on the products in the cart.
I've yet to find a shipping solution in OC that will deal with mixed tax products and shipping in the UK, although Johnathan from Clear Thinking has the closest solution I can find.
which extension?thinksync wrote:I've yet to find a shipping solution in OC that will deal with mixed tax products and shipping in the UK, although Johnathan from Clear Thinking has the closest solution I can find.
maybe he can tweak it
thanks
I'm planning on adding this feature to all my shipping and fee/discount extensions, but I'm not sure when since I'll have to update all my 55+ extensions for the upcoming OpenCart 2.0 release. I may be able to give a code edit to get it working, though, so feel free to contact me at www.getclearthinking.com/contact if you want to try it out.
will this be able to be used internationally? meaning, if you have a facility in the U.S. but ship all around the world, will this account for VAT and tax and whatever just in case foreign govs want to collect whatever their tax structure is but then hide VAT or whatever for U.S. sales as well ?Johnathan wrote:I'm planning on adding this feature to all my shipping and fee/discount extensions, but I'm not sure when since I'll have to update all my 55+ extensions for the upcoming OpenCart 2.0 release. I may be able to give a code edit to get it working, though, so feel free to contact me at www.getclearthinking.com/contact if you want to try it out.
thanks
Thinking on it, I'm not sure I need to change how the extensions work: if you're charging tax on shipping for only certain products, that means you need to have separate shipping costs for them already. Since you'd need to divide the shipping cost up, you'd need two different rates (one taxed and one not taxed) and then need to combine them.
You can already create that situation using Category-Based Shipping, Manufacturer-Based Shipping, or Product-Based Shipping. For example, I recently gave this example to someone using Category-Based Shipping:
OK, I just realized that even though separate tax classes can be set, a shipping rate needs to have a single tax class returned when it returns the shipping quote. This is OpenCart dependent, and may not be able to be fixed within my extension, although I'll give it a try. I'll release an update for my extensions once I get it figured out.
You can already create that situation using Category-Based Shipping, Manufacturer-Based Shipping, or Product-Based Shipping. For example, I recently gave this example to someone using Category-Based Shipping:
Code: Select all
RATE #1
Title: Shipping
Sort Order: 1
Multi Rate Calculation: Sum
Tax Class: VAT
Categories: NOT, Category A
Rate Type: Weight-Based
Cost Brackets:
- (as needed)
RATE #2
Title: Shipping
Sort Order: 1
Multi Rate Calculation: Sum
Tax Class: (none)
Categories: ANY, Category A
Rate Type: Weight-Based
Cost Brackets:
- (as needed)
Just wanted to add in here that Johnathan's extension does fully support the way VAT is supposed to be handled.
It's the only extension that does so.
I now have around 50 rates that cover the UK, EU and world with multiple tax rates, EU VAT ID validation and DHL surcharge zones.
Johnathan has been an absolute superstar in helping get this very complex shipping setup sorted out.
It's the only extension that does so.
I now have around 50 rates that cover the UK, EU and world with multiple tax rates, EU VAT ID validation and DHL surcharge zones.
Johnathan has been an absolute superstar in helping get this very complex shipping setup sorted out.
Who is online
Users browsing this forum: No registered users and 2 guests