diff --git a/geoip_website_redirect/README.rst b/geoip_website_redirect/README.rst new file mode 100644 index 000000000..fa6311ef4 --- /dev/null +++ b/geoip_website_redirect/README.rst @@ -0,0 +1,44 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Website GeoIP Based Language and Currency +======================= +This module allow to view the website content according to login user's country details + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: Ayisha Sumayya K @cybrosys, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html) + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +External Package: countryinfo + +HTML Description: ``__ diff --git a/geoip_website_redirect/__init__.py b/geoip_website_redirect/__init__.py new file mode 100644 index 000000000..a9eb1bfc4 --- /dev/null +++ b/geoip_website_redirect/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import controllers +from . import models diff --git a/geoip_website_redirect/__manifest__.py b/geoip_website_redirect/__manifest__.py new file mode 100644 index 000000000..0338176d5 --- /dev/null +++ b/geoip_website_redirect/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Website GeoIP Based Language and Currency', + 'version': '16.0.1.0.0', + 'summary': 'Website GeoIP Based Language and Currency Application ' + 'for Odoo 16', + 'description': """The module helps you to map currency and language + based on Customer's IP address""", + 'category': 'eCommerce, Productivity', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://cybrosys.com', + 'images': ['static/description/banner.png'], + 'depends': ['base', 'website_sale'], + 'data': ['views/login_template.xml'], + 'assets': { + 'web.assets_frontend': [ + 'geoip_website_redirect/static/src/js/action.js', ], + }, + 'license': 'LGPL-3', + 'auto_install': False, + 'installable': True, + 'application': False, + 'external_dependencies': { + 'python': ['countryinfo'], + } +} diff --git a/geoip_website_redirect/controllers/__init__.py b/geoip_website_redirect/controllers/__init__.py new file mode 100644 index 000000000..5ae124e89 --- /dev/null +++ b/geoip_website_redirect/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import geoip_website_redirect diff --git a/geoip_website_redirect/controllers/geoip_website_redirect.py b/geoip_website_redirect/controllers/geoip_website_redirect.py new file mode 100644 index 000000000..160cd766e --- /dev/null +++ b/geoip_website_redirect/controllers/geoip_website_redirect.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import requests +from odoo import http +from odoo.http import request +from odoo.addons.web.controllers.home import Home + + +class GeoIP(Home): + """ controller for selecting login user's datas """ + + def get_location(self, ip_address): + """ get location details of user using ip address""" + response = requests.get(f'http://ip-api.com/json/{ip_address}').json() + return {"country": response.get("country")} + + @http.route() + def web_login(self, redirect=None, **kw): + """ on login access customer country information """ + from countryinfo import CountryInfo + result = super(GeoIP, self).web_login(redirect=redirect, **kw) + request.env.user.write({'ip_address': kw.get('user_ip')}) + datas = self.get_location(kw.get('user_ip')) + if datas: + country = CountryInfo(datas['country']) + lang = country.languages() + language = request.env['res.lang'].sudo().search([ + ('iso_code', '=', lang[0]), ('active', 'in', [True, False])]) + if language: + language.active = True + request.env['website'].sudo().browse(request.website.id + ).language_ids = [ + (4, language.id)] + url = f'/{language.url_code}' + return request.redirect(url) + return result diff --git a/geoip_website_redirect/doc/RELEASE_NOTES.md b/geoip_website_redirect/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..fba4f6f1a --- /dev/null +++ b/geoip_website_redirect/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 18.02.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Website GeoIP Based Language and Currency diff --git a/geoip_website_redirect/models/__init__.py b/geoip_website_redirect/models/__init__.py new file mode 100644 index 000000000..51bd2b38d --- /dev/null +++ b/geoip_website_redirect/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import res_users +from . import website diff --git a/geoip_website_redirect/models/res_users.py b/geoip_website_redirect/models/res_users.py new file mode 100644 index 000000000..8a9ce5214 --- /dev/null +++ b/geoip_website_redirect/models/res_users.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ResUsers(models.Model): + """class for adding ip address field in res.users """ + _inherit = "res.users" + + ip_address = fields.Char(string="IP Address", help="IP address of user") diff --git a/geoip_website_redirect/models/website.py b/geoip_website_redirect/models/website.py new file mode 100644 index 000000000..c4b8c871b --- /dev/null +++ b/geoip_website_redirect/models/website.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import requests +from odoo import models + + +class Website(models.Model): + """ class for selecting shop's public pricelist """ + _inherit = 'website' + + def get_user_location(self): + """ get location details of user """ + + response = requests.get( + f'http://ip-api.com/json/{self.env.user.ip_address}').json() + return {"country": response.get("country")} + + def get_current_pricelist(self): + """ get current pricelist if it is public pricelist then + change its currency into customers currency """ + res = super().get_current_pricelist() + default = self.env['product.pricelist'].search([ + '&', ('selectable', '=', True), + '&', ('country_group_ids', '=', False), + '|', ('company_id', '=', False), + ('company_id', '=', self.env.company.id)], limit=1) + + if res in default: + from countryinfo import CountryInfo + + datas = self.get_user_location() + if datas: + country = CountryInfo(datas['country']) + currency = country.currencies() + currency_dict = self.env['res.currency'].sudo().search([ + ('name', '=', currency[0]), + ('active', 'in', [True, False])]) + if currency_dict: + currency_dict.active = True + res.currency_id = currency_dict + return res diff --git a/geoip_website_redirect/static/description/assets/cybro-icon.png b/geoip_website_redirect/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/geoip_website_redirect/static/description/assets/cybro-icon.png differ diff --git a/geoip_website_redirect/static/description/assets/cybro-odoo.png b/geoip_website_redirect/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/cybro-odoo.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/1-icon.png b/geoip_website_redirect/static/description/assets/icons/1-icon.png new file mode 100644 index 000000000..7680be4b1 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/1-icon.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/2-icon.png b/geoip_website_redirect/static/description/assets/icons/2-icon.png new file mode 100644 index 000000000..9e8039d27 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/2-icon.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/3-icon.png b/geoip_website_redirect/static/description/assets/icons/3-icon.png new file mode 100644 index 000000000..fdc057e40 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/3-icon.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/4-icon.png b/geoip_website_redirect/static/description/assets/icons/4-icon.png new file mode 100644 index 000000000..d67e670bb Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/4-icon.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/5-icon.png b/geoip_website_redirect/static/description/assets/icons/5-icon.png new file mode 100644 index 000000000..e123da1e3 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/5-icon.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/6-icon.png b/geoip_website_redirect/static/description/assets/icons/6-icon.png new file mode 100644 index 000000000..de5323215 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/6-icon.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/Hospital Management-icon.png b/geoip_website_redirect/static/description/assets/icons/Hospital Management-icon.png new file mode 100644 index 000000000..1e63215f3 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/Hospital Management-icon.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/check.png b/geoip_website_redirect/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/check.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/chevron.png b/geoip_website_redirect/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/chevron.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/cogs.png b/geoip_website_redirect/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/cogs.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/consultation.png b/geoip_website_redirect/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/consultation.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/down.svg b/geoip_website_redirect/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/geoip_website_redirect/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/geoip_website_redirect/static/description/assets/icons/ecom-black.png b/geoip_website_redirect/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/ecom-black.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/education-black.png b/geoip_website_redirect/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/education-black.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/hotel-black.png b/geoip_website_redirect/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/hotel-black.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/license.png b/geoip_website_redirect/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/license.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/lifebuoy.png b/geoip_website_redirect/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/lifebuoy.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/main.png b/geoip_website_redirect/static/description/assets/icons/main.png new file mode 100644 index 000000000..fd713ad28 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/main.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/manufacturing-black.png b/geoip_website_redirect/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/manufacturing-black.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/pos-black.png b/geoip_website_redirect/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/pos-black.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/puzzle.png b/geoip_website_redirect/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/puzzle.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/restaurant-black.png b/geoip_website_redirect/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/restaurant-black.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/service-black.png b/geoip_website_redirect/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/service-black.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/support.png b/geoip_website_redirect/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/support.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/trading-black.png b/geoip_website_redirect/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/trading-black.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/training.png b/geoip_website_redirect/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/training.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/update.png b/geoip_website_redirect/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/update.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/user.png b/geoip_website_redirect/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/user.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/whatsapp.png b/geoip_website_redirect/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/whatsapp.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/wrench.png b/geoip_website_redirect/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/wrench.png differ diff --git a/geoip_website_redirect/static/description/assets/main.png b/geoip_website_redirect/static/description/assets/main.png new file mode 100644 index 000000000..fd713ad28 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/main.png differ diff --git a/geoip_website_redirect/static/description/assets/screenshots/Screenshot 4.png b/geoip_website_redirect/static/description/assets/screenshots/Screenshot 4.png new file mode 100644 index 000000000..5f6de3dfc Binary files /dev/null and b/geoip_website_redirect/static/description/assets/screenshots/Screenshot 4.png differ diff --git a/geoip_website_redirect/static/description/assets/screenshots/Screenshot1.png b/geoip_website_redirect/static/description/assets/screenshots/Screenshot1.png new file mode 100644 index 000000000..3ac9854d6 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/screenshots/Screenshot1.png differ diff --git a/geoip_website_redirect/static/description/assets/screenshots/Screenshot2.png b/geoip_website_redirect/static/description/assets/screenshots/Screenshot2.png new file mode 100644 index 000000000..31c60a14d Binary files /dev/null and b/geoip_website_redirect/static/description/assets/screenshots/Screenshot2.png differ diff --git a/geoip_website_redirect/static/description/assets/screenshots/Screenshot3.png b/geoip_website_redirect/static/description/assets/screenshots/Screenshot3.png new file mode 100644 index 000000000..82d8510fc Binary files /dev/null and b/geoip_website_redirect/static/description/assets/screenshots/Screenshot3.png differ diff --git a/geoip_website_redirect/static/description/banner.png b/geoip_website_redirect/static/description/banner.png new file mode 100644 index 000000000..e703ae21b Binary files /dev/null and b/geoip_website_redirect/static/description/banner.png differ diff --git a/geoip_website_redirect/static/description/icon.png b/geoip_website_redirect/static/description/icon.png new file mode 100644 index 000000000..450eecbf5 Binary files /dev/null and b/geoip_website_redirect/static/description/icon.png differ diff --git a/geoip_website_redirect/static/description/index.html b/geoip_website_redirect/static/description/index.html new file mode 100644 index 000000000..5a938c862 --- /dev/null +++ b/geoip_website_redirect/static/description/index.html @@ -0,0 +1,1442 @@ + +
+
+
+

+ Website GeoIP Based Language and Currency + +

+

+ This systems shows website in customer's native language and currency.

+
+ + +
+

+ Website GeoIP Based Language and Currency is an application which is fetch + the IP address of customer's device and allow them to + see website in their native language and see the currency as + per the geolocation. + +

+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+ +
+ + + + + +
+
+ +

+ KEY Highlights +

+ + +
+
+
+
+ +
+
+

+ Customer's IP Address

+

+ This feature allow to detect login customer's ip address and access country information.

+
+
+
+
+
+
+ +
+
+

+ Website in Native Language

+

+ This feature allow to change website contents into customer's native language.

+
+
+
+
+
+
+ +
+
+

+ Change Language Manually

+

+ This feature allow to change language of website as the customer want.

+
+
+
+
+
+
+ +
+
+

+ Product Price

+

+ It allows customer to view product price in their local currency. +

+
+
+
+
+
+
+ +
+
+

+ Select Automatically

+

It + This module fetch customer's local currency and their native language + and change website contents according to those details.

+
+
+
+
+
+
+ +
+
+

+ Store Management

+

+ This feature allow customer to change store manually as the want.

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +

+ Features

+ + +

+ Website GeoIP Based Language and Currency

+
+ + +
+
+ + + +
+
+ + +
+
+ + + + + + + +
+
+
+ +

+ Screenshots

+ + +

+ Website GeoIP Based Language and Currency

+
+ +
+

+ Customer Login

+

Before login website will be shown in default language
+

+ + +
+ +
+
+

+ After Login

+

After login it fetch customers IP address and identify customer's + geolocation and select the language, change portal view based on that language

+
+ + +
+ +
+
+

+ Change Website Default Language to Customer's Language +

+

+ +
+ + +
+ +
+ +
+

+ Change Currency +

+

+ It also change the product price into customer's local currency.

+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+ + +
+
+ +

+ FAQ +

+ + +

+ Website GeoIP Based Language and Currency

+
+ + +
+
+
+ + +
+

+ This app helps to customize website automatically +

+
+ + +
+

+ When login to the website it fetch customer's IP address and access the geolocation, + select the language and change the website default language to customer's native language +

+
+ + +
+
+

+ Yes, It is possible to change language manually from the footer of website. +

+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + + + +
+ +
+
+

Related Modules

+

Explore our related modules

+
+
+
+ +
+
+ +
+ +
+ +
+
+ +
+

+ Our Services +

+
+ + +
+
+
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+
+
+ +
+
+ Hire + Odoo + Developer
+
+
+
+ +
+
+ Odoo + Integration
+
+
+
+ +
+
+ Odoo + Migration
+
+
+
+ +
+
+ Odoo + Consultancy
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + +
+ + +
+
+
+

Our Industries

+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+
+

Support

+

Need help? Get in touch. +

+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get + in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 + 86068 + 27707

+
+
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ + \ No newline at end of file diff --git a/geoip_website_redirect/static/src/js/action.js b/geoip_website_redirect/static/src/js/action.js new file mode 100644 index 000000000..d435f9e5d --- /dev/null +++ b/geoip_website_redirect/static/src/js/action.js @@ -0,0 +1,25 @@ +odoo.define('geoip_website_redirect.get_ip', function (require) { + "use strict"; + + var publicWidget = require('web.public.widget'); +//public widget for getting the IP address of the user + publicWidget.registry.userIpAddress = publicWidget.Widget.extend({ + selector: '.oe_website_login_container', + events: { + 'click .oe_login_buttons': '_getIpAddress', + }, + setup(){ + super.setup(); + this._getIpAddress() + }, +//function which give ip address of user + _getIpAddress: async function(events){ + var self = this; + await $.getJSON("https://api.ipify.org?format=json", function(data) { + self.el.querySelector('#user_ip').value = data.ip; + }); + }, + }); + + return publicWidget.registry.userIpAddress; + }); diff --git a/geoip_website_redirect/views/login_template.xml b/geoip_website_redirect/views/login_template.xml new file mode 100644 index 000000000..4575716f0 --- /dev/null +++ b/geoip_website_redirect/views/login_template.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file