FEBRUARY 8, 2018 7 MINS READ
Personalized messages tend to perform well and also manages to make more conversions than the generic ones. Geo targeted WooCommerce customizations not only helps you to show targeted messages with these customizations you also can make the taxes and rates calculated for that region. So managing your payments and shipments become simpler.
Detecting User’s Geolocation & Personalized Message
This is the key phrase and the first step in identifying your user. Once you did this clearly then you can do any other related customizations easily. This code snippet acts based on the user IP address.
Note that before using this code, make sure you have enabled Geolocation in WooCommerce. Using the WC_Geolocation::geolocate_ip() code you can easily fetch the user’s geolocation, from here you can add switch condition to personalize your message.
You can paste this PHP code in your child theme’s function.php file right below the before the finishing line “?>”. After detecting your user’s location this code welcomes them with the word you mentioned for that particular country. The output of the above code will be looking like the below image.
Sales By State
Being an e-commerce shop owners we have customers all over the country. At the fiscal year ending, we have to make our data country specific to make the taxation work properly and less cluttered. By default, WooCommerce won’t give you a sales report for the specific region, but by making minor code adjustments, you can get the desired result you want.
// 1. Creating Sales by State Tab
How it works:
From the list of purchases made, this code snippet will filter the purchases fall within the category of states you mentioned. This can be visualized within your dashboard. All you have to do is to go to the dashboard and select WooCommerce >> Reports>> Orders tab, there you will find an option sales by state, from there you can see the sales for a particular state.
Showing Tax To Users Based on Geolocation
For this, there are two options. One is a default option in the WooCommerce, which you have to configure and activate it manually. If you need more precise result with more advanced features for you to manage easily then you have to go for a WooCommerce add-on.
Tweaking Default Settings
As said before in the Detecting user Geolocation, you have to switch on the customer location tracking. For that go to the WooCommerce general settings, under the Default customer location select the Geolocate option.
After enabling the geolocation you can see a tick box showing “Enable tax and tax calculation”. Make sure you check that box. After that, your general settings option will have a separate tab for tax as shown in the image below.
Plugins For Geolocation Based Tax Calculation
Adding tax to the WooCommerce code is not an easy job as the tip we gave you in the WooCommerce discount sale customizations. This includes lots of backend functionality and takes a lot of time. So if you are a general user expecting advanced tax option, it is better to go for a WooCommerce extension.
Avatax is the best solution for the tax calculation. Even WooCommerce itself provides a free extension to integrate Avatax. But the Avatax is a premium service, you have to buy it separately and can add it easily to your WordPress website easily via the WooCommerce add-on.
WooCommerce AvaTax allows you to charge appropriate tax automatically and track tax records for your WooCommerce transactions, and can also enable AvaTax address validation for your customers.
Aelia is also a premium plugin. This plugin allows the user to select the country and the currency they prefer. You have the option to show the price with and without tax. If you prefer to show product price and the tax separately, you have options for that also. Since it is a premium plugin you have multiple options and more useful features.
- Fully compatible with our WooCommerce Currency Switcher plugin
- Allows displaying prices with or without tax, depending on visitors’ country.
- Automatically detects visitors’ country, with price accordingly displayed with/without taxes.
- Allows keeping product prices fixed, including taxes, independently from what tax rate applies to customers (available in v22.214.171.124109 and later).
- Pre-selects the checkout country automatically.
- Includes a widget to allow your visitors to choose their billing country before they reach the checkout.
- Allows specifying a price suffix for each tax display rule.
- Allows visitors to declare themselves exempt from tax and always see tax-exclusive prices.
EU Vat Compliance is a free plugin that you can use only for calculating tax in the European countries. If you are selling products only in the European region, then this plugin will help you.
- Identify your customers’ locations
- Full information that was used to calculate VAT and customer location is displayed in the WooCommerce order screen in the back-end.
- Currency conversion supported
- Can maintain VAT rates for each country separately
- Forbid EU sales if any goods have VAT chargeable
- Can Distinguish VAT from other taxes
These are some of the Geo targeted WooCommerce customizations you can do to make a more personalized online store. Since all the customizations aren’t that simple that an end user can do, we have mentioned plugins to make it easier for you. To get more WooCommerce related tips and tricks please subscribe to our newsletter. Happy Website!!