I'm trying to find a more manageable way to restrict shipping class to specific zipcode.
My configuration as below:
Shipping method: Self Collect, Free Delivery, Delivery with a fee
Shipping Class: Class A, Class B, Class C
Shipping Country: Only 1 country
Shipping Zone: Zone A, Subset of Zone A (specific Zipcode 123*)
Shipping plugin: Table Rate Shipping
Conditions:
All shipping methods are applicable to Class A, B and C. Class C is restricted to zipcode 123* only. If orders contain Class C and shipping address is outside of zipcode 123*, the shipping method will be defaulted to self-collect only.
I figure I can set up two zones. One zone contains specifically zipcode 123*. And setup another zone manually inserting every other zipcodes excluding zipcode 123*. I find this approach onerous and difficult to maintain considering it doesn't support import and export natively.
I wonder if there is a way to restrict class to specific zipcodes only? I only managed to restrict product categories by countries but can't find a way to restrict by zipcodes.
Related
In our project, we have a specific scenario. Basically, we need to set calculation of tax based on:
Shop base address
but that address should be different for each product.
Product A = Address A
Product B = address B
So taxes and currency are then set based on selected product address.
Please does anyone have idea/experience if it is possible in WooCommerce settings somewhere, or it would need plugin/custom PHP code?
Thanks,
J.
I am trying to force shipping estimate to use postcode and country. I am building a custom shipping method (similar to tutorial here). I can get both the country and postcode values fine. However, only country seems to be required by default, and postcode is optional with the field even greyed. Here is an example image of Change Address fields. My shipping method breaks when the postcode is empty as in the example image. How do I require both country and postcode? Note - State and city are not required in my custom method.
I'd like to set a specific Tax on each product.
I see i can create tax classes, but i'm going to have many different taxes, one per product, on more than 300 products.
Is it possible to set the tax % on the product page when i create it ?
Do you know a plugin for that ?
What want to do is to calculate Tax Based On SKU and not shipping address.
So i need to have a field on product page where i can enter a TVA number, manually.
Do you think it's possible ?
OR an other way maybe :
- have one taxe class
- in the tax class add many taxes rates with all the same country code, and no zip code
- create a field in the product page to assign the right tax rate for the product (instead of assign a class rate)
What do you think about that ?
It’s been 2 months and countless hours later and I’ve still not been able to fix this.
No matter what I do, taxes are calculated based on the shop's location. I need to only charge taxes if the customer's shipping or billing address is in Illinois.
I have one set of tax rules set, for IL.
Example 1: Base state set to Illinois.
Billing address and shipping address set to California (or any other state).
Customer is charged IL taxes.
Example 2: Base state set to California.
Billing address and shipping address set to Illinois.
Customer is not charged Illinois taxes.
I've tried disabling all plugins and using default theme with no joy.
UPdating with screenshot of current settings
current tax settings
In the docs:
If you use store base address, taxes will always be based on your
store location and not your customer’s location.
So change it to Customer Shipping Address
Read: https://docs.woocommerce.com/document/setting-up-taxes-in-woocommerce/
There is no bug report: https://github.com/woocommerce/woocommerce/issues?utf8=%E2%9C%93&q=shop%20location%20calculation%20. Or any other search string I could think of.
See: https://code.tutsplus.com/articles/the-beginners-guide-to-woocommerce-taxes--cms-22060
And https://docs.woocommerce.com/document/configuring-woocommerce-settings/ for the default customer addresss
Default Customer Address
An online store owner is completely unaware about the location of any
new customer who visits the store. The calculation of taxes becomes
quite difficult at that time. This option lets a store owner to
display prices by assuming a default location before any customer
enters his actual address. You will select ‘Shop base address’
(instead of ‘No address’) in this case an automatic tax correction is
applied once a customer enters his country as his base address.
After comparing hundreds of database rows, I finally narrowed it down to 1 row, which gave details of local shipping. Using that, I did some testing and found that when my local shipping is enabled, it breaks the tax calculation.
I found a solution . The problem is that it calculates from the default store address and always the default location is sent from the function get_tax_location( $tax_class = '', $customer = null ) . So you need to change that to customer address . I can help if anybody need but I am not sure if it will affect any other area .
Thanks
Shan
I currently have 6 items in cart, which cost £456. I'm trying to implement a custom payment system, so the customer can pay some now and some later. So i want the cost to be £400.
The only function i've found is set_total in WC_Abstract_Order but to use WC_Abstract Order you need the order id and the order hasn't been placed yet for an id to be generated.
Any idea how to solve?