diff --git a/geoip_website_redirect/README.rst b/geoip_website_redirect/README.rst new file mode 100644 index 000000000..00821f9af --- /dev/null +++ b/geoip_website_redirect/README.rst @@ -0,0 +1,54 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://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. + +Installation +============= +* Install external python package countryinfo. + +Configuration +============= +* No additional configurations needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL-3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developer: (V17) Ashwin A, + (V16) Ayisha Sumayya K, + (V15) Mohammed Dilshad Tk, + (V14) Mohammed Dilshad Tk +* Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +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 +=================== +HTML Description: ``__ diff --git a/geoip_website_redirect/__init__.py b/geoip_website_redirect/__init__.py new file mode 100644 index 000000000..50349d36a --- /dev/null +++ b/geoip_website_redirect/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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..923f663c9 --- /dev/null +++ b/geoip_website_redirect/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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': '17.0.1.0.0', + 'category': 'eCommerce, Productivity', + 'summary': """Website GeoIP Based Language and Currency Application + for Odoo 17""", + 'description': """The module helps you to map currency and language + based on User's IP address""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://cybrosys.com', + 'depends': ['website_sale'], + 'data': ['views/login_template.xml'], + 'assets': { + 'web.assets_frontend': [ + 'geoip_website_redirect/static/src/js/userIpAddress.js', + ], + }, + 'external_dependencies': { + 'python': ['countryinfo'], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/geoip_website_redirect/controllers/__init__.py b/geoip_website_redirect/controllers/__init__.py new file mode 100644 index 000000000..33fc24a3f --- /dev/null +++ b/geoip_website_redirect/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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..d1524465c --- /dev/null +++ b/geoip_website_redirect/controllers/geoip_website_redirect.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 countryinfo import CountryInfo +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}', timeout=20).json() + return {"country": response.get("country")} + + @http.route() + def web_login(self, redirect=None, **kw): + """ On login access customer country information """ + result = super().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..a6862cc18 --- /dev/null +++ b/geoip_website_redirect/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 20.07.2024 +#### Version 17.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..9b99af6da --- /dev/null +++ b/geoip_website_redirect/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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..03221e85d --- /dev/null +++ b/geoip_website_redirect/models/res_users.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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..ddc00ce60 --- /dev/null +++ b/geoip_website_redirect/models/website.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 countryinfo import CountryInfo +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}', timeout=20).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([]) + if res in default: + 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/h2.png b/geoip_website_redirect/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/geoip_website_redirect/static/description/assets/h2.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/faq.png b/geoip_website_redirect/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/faq.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/feature.png b/geoip_website_redirect/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/feature.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/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/notes.png b/geoip_website_redirect/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/notes.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/screenshot.png b/geoip_website_redirect/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/screenshot.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/skype.png b/geoip_website_redirect/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/skype.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/star-1.svg b/geoip_website_redirect/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/geoip_website_redirect/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/geoip_website_redirect/static/description/assets/icons/star-2.svg b/geoip_website_redirect/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/geoip_website_redirect/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + 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/test-1 - Copy.png b/geoip_website_redirect/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/test-1 - Copy.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/test-1.png b/geoip_website_redirect/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/test-1.png differ diff --git a/geoip_website_redirect/static/description/assets/icons/test-2.png b/geoip_website_redirect/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/test-2.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/video.png b/geoip_website_redirect/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/icons/video.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/modules/1.png b/geoip_website_redirect/static/description/assets/modules/1.png new file mode 100644 index 000000000..ab375ff3a Binary files /dev/null and b/geoip_website_redirect/static/description/assets/modules/1.png differ diff --git a/geoip_website_redirect/static/description/assets/modules/2.png b/geoip_website_redirect/static/description/assets/modules/2.png new file mode 100644 index 000000000..d57102c09 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/modules/2.png differ diff --git a/geoip_website_redirect/static/description/assets/modules/3.png b/geoip_website_redirect/static/description/assets/modules/3.png new file mode 100644 index 000000000..d1c43c6b4 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/modules/3.png differ diff --git a/geoip_website_redirect/static/description/assets/modules/4.png b/geoip_website_redirect/static/description/assets/modules/4.png new file mode 100644 index 000000000..f3a24c620 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/modules/4.png differ diff --git a/geoip_website_redirect/static/description/assets/modules/5.png b/geoip_website_redirect/static/description/assets/modules/5.png new file mode 100644 index 000000000..9f7bf6c1c Binary files /dev/null and b/geoip_website_redirect/static/description/assets/modules/5.png differ diff --git a/geoip_website_redirect/static/description/assets/modules/6.png b/geoip_website_redirect/static/description/assets/modules/6.png new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/modules/6.png differ diff --git a/geoip_website_redirect/static/description/assets/screenshots/1.png b/geoip_website_redirect/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..c77c84011 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/screenshots/1.png differ diff --git a/geoip_website_redirect/static/description/assets/screenshots/2.png b/geoip_website_redirect/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..69e82a2b1 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/screenshots/2.png differ diff --git a/geoip_website_redirect/static/description/assets/screenshots/3.png b/geoip_website_redirect/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..4d38f69a2 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/screenshots/3.png differ diff --git a/geoip_website_redirect/static/description/assets/y18.jpg b/geoip_website_redirect/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/geoip_website_redirect/static/description/assets/y18.jpg differ diff --git a/geoip_website_redirect/static/description/banner.jpg b/geoip_website_redirect/static/description/banner.jpg new file mode 100644 index 000000000..5aa31e161 Binary files /dev/null and b/geoip_website_redirect/static/description/banner.jpg 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..ef1c4ed4d 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..7583b00f1 --- /dev/null +++ b/geoip_website_redirect/static/description/index.html @@ -0,0 +1,1056 @@ + + + + + + + + + Document + + + + + + + + +
+ +
+
+

+ Website GeoIP Based Language and Currency +

+

+ This system 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

+

+ 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 they want. +

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

+ Overview + + +

+

+ Website GeoIP Based Language and Currency.

+
+ +
+
+ The Website GeoIP Based Language and Currency application + detects the IP address of a customer's device to display + the website in their native language and show prices in the + appropriate currency based on their geolocation. +
+
+
+
+ + +
+ + + +
+
+ +
+ +
+ +
+
+
+
+

+ Screenshots + + +

+

+ Website GeoIP Based Language and Currency +

+
+ +
+

+ Customer Login +

+

+ login website will be shown in default language.

+
+ +
+
+ +
+

+ After Login +

+

+ After login, the application fetches the customer's + IP address to identify their geolocation. It then selects + the appropriate language and updates the portal view accordingly. +

+
+ +
+
+ +
+

+ Change Currency +

+

+ It also converts the product prices into the customer's local currency. +

+
+ +
+
+
+
+ +
+
+
+

+

+
+

+ FEATURES + + +

+

+ Comprehensive Features of Website GeoIP Based Language and Currency

+
+
+
+
+
+
+ + + +
+ Auto-Detect Customer's IP Address. +
+
+
+
+
+
+
+
+
+ + + +
+ Switch Website's Content in Customer's Native Language. +
+
+
+
+
+
+
+
+
+ + + +
+ Customer can Change Store Manually. +
+
+
+
+
+
+
+
+
+ + + +
+ Product Price in Customer's Local Currency. +
+
+
+
+
+ +
+
+
+
+ + + +
+ Customer can also Change Language Manually. +
+
+
+
+
+ +
+
+
+
+ + + +
+ Select Customers Currency and Language on Login. +
+
+
+
+
+ +
+
+
+
+ +
+ +
+
+

+ FAQ + +

+
+
+
+
+ + + +
+
+

+ This app helps to customize website automatically. +

+
+
+ + + +
+
+

+ When logging into the website, it + fetches the customer's IP address to + access their geolocation, selects the + appropriate language, and changes the + website's default language to the customer's + native language. +

+
+
+ + +
+
+

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

+
+
+
+
+
+
+
+
+
+
+

+ RELEASE NOTES + + +

+
+
+
+
+
+

Version 17.0.1 I Released + on : 20th July 2024 +

+

Initial commit for geoip_website_redirect

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

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

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

Skype

+

Say hi to us on Skype!

+ +

cybroopenerp +

+
+
+
+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ + + + + + + \ No newline at end of file diff --git a/geoip_website_redirect/static/src/js/userIpAddress.js b/geoip_website_redirect/static/src/js/userIpAddress.js new file mode 100644 index 000000000..cb2172b5f --- /dev/null +++ b/geoip_website_redirect/static/src/js/userIpAddress.js @@ -0,0 +1,20 @@ +/** @odoo-module **/ +import publicWidget from '@web/legacy/js/public/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; + }); + }, + }); diff --git a/geoip_website_redirect/views/login_template.xml b/geoip_website_redirect/views/login_template.xml new file mode 100644 index 000000000..0422692e5 --- /dev/null +++ b/geoip_website_redirect/views/login_template.xml @@ -0,0 +1,9 @@ + + + + +