diff --git a/call_for_price_website/README.rst b/call_for_price_website/README.rst new file mode 100644 index 000000000..e03a74be4 --- /dev/null +++ b/call_for_price_website/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Website Call For Price +======================= +This module helps hide specific products prices from the shop and using 'Call for Price' button customer can sent their details, the user will follow up the details and get the product price. + +Configuration +============= +* No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer:(V14) Mruthul Raj, 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/call_for_price_website/__init__.py b/call_for_price_website/__init__.py new file mode 100644 index 000000000..1b1eab231 --- /dev/null +++ b/call_for_price_website/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import models diff --git a/call_for_price_website/__manifest__.py b/call_for_price_website/__manifest__.py new file mode 100644 index 000000000..6bee67838 --- /dev/null +++ b/call_for_price_website/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': 'Website Call For Price', + 'version': '14.0.1.0.0', + 'category': 'Website', + 'summary': """Helps to hide price of specified product from shop""", + 'description': "The module aims to help website owners conceal the prices " + "of certain products from their online store. Instead of " + "displaying the price and an Add to Cart button, the module " + "replaces it with a customizable call-for-price message or " + "button. Customers interested in these products can use the " + "form that appears upon clicking the button to request more " + "information about the price, and they will receive a call " + "back from the store to discuss the pricing details", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['website_sale_wishlist', 'website_sale_comparison'], + 'data': ['security/ir.model.access.csv', + 'views/shop_hide_call_price_templates.xml', + 'views/shop_grid_templates.xml', + 'views/wishlist_hide_price_templates.xml', + 'views/hide_price_templates.xml', + 'views/compare_templates.xml', + 'views/call_for_price_views.xml', + 'views/product_template_views.xml', + 'views/assets.xml'], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/call_for_price_website/doc/RELEASE_NOTES.md b/call_for_price_website/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..ae7741dd3 --- /dev/null +++ b/call_for_price_website/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 22.11.2023 +#### Version 14.0.1.0.0 +#### ADD +- Initial Commit for Website Call For Price diff --git a/call_for_price_website/models/__init__.py b/call_for_price_website/models/__init__.py new file mode 100644 index 000000000..b012510be --- /dev/null +++ b/call_for_price_website/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import call_price +from . import product_template diff --git a/call_for_price_website/models/call_price.py b/call_for_price_website/models/call_price.py new file mode 100644 index 000000000..4b801fb8b --- /dev/null +++ b/call_for_price_website/models/call_price.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class CallPrice(models.Model): + """Creating a model to record all the request the get from website.""" + _name = 'call.price' + _description = 'Call for Price' + _rec_name = 'product_id' + + first_name = fields.Char(string="First Name", help="First Name of user") + last_name = fields.Char(string="Last Name", help="Last Name of user") + product_id = fields.Many2one('product.product', string="Product", + help="In which product they are requesting " + "price") + email = fields.Char(string="Email", help="Users email for contact") + phone = fields.Char(string="Contact No.", help="Users contact number for " + "contacting") + quantity = fields.Integer(string="Quantity", + help="How much quantity of product price " + "they want know") + message = fields.Char(string="Message", + help="If any messages for referring") + state = fields.Selection([('draft', 'Draft'), ('done', 'Done'), + ('cancel', 'Cancel')], + default="draft", help="Call for price requests " + "stage") + + def action_done(self): + """The price of the requested product will be updated for them, + form state is done""" + self.write({'state': 'done'}) + + def action_cancel(self): + """Cancel the form or change the state to cancel""" + self.write({'state': 'cancel'}) diff --git a/call_for_price_website/models/product_template.py b/call_for_price_website/models/product_template.py new file mode 100644 index 000000000..66561dadd --- /dev/null +++ b/call_for_price_website/models/product_template.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class ProductTemplate(models.Model): + """Inheriting product variants model for adding a field that will hide + price from website""" + _inherit = 'product.template' + + price_call = fields.Boolean(string="Call for Price", + help="This will hide the price and cart button " + "from shop and customer can request by " + "calling for price") diff --git a/call_for_price_website/security/ir.model.access.csv b/call_for_price_website/security/ir.model.access.csv new file mode 100644 index 000000000..1896ea717 --- /dev/null +++ b/call_for_price_website/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_call_price_user,access.call.price.user,model_call_price,base.group_user,1,1,1,1 diff --git a/call_for_price_website/static/description/assets/icons/check.png b/call_for_price_website/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/check.png differ diff --git a/call_for_price_website/static/description/assets/icons/chevron.png b/call_for_price_website/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/chevron.png differ diff --git a/call_for_price_website/static/description/assets/icons/cogs.png b/call_for_price_website/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/cogs.png differ diff --git a/call_for_price_website/static/description/assets/icons/consultation.png b/call_for_price_website/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/consultation.png differ diff --git a/call_for_price_website/static/description/assets/icons/ecom-black.png b/call_for_price_website/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/ecom-black.png differ diff --git a/call_for_price_website/static/description/assets/icons/education-black.png b/call_for_price_website/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/education-black.png differ diff --git a/call_for_price_website/static/description/assets/icons/hotel-black.png b/call_for_price_website/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/hotel-black.png differ diff --git a/call_for_price_website/static/description/assets/icons/license.png b/call_for_price_website/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/license.png differ diff --git a/call_for_price_website/static/description/assets/icons/lifebuoy.png b/call_for_price_website/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/lifebuoy.png differ diff --git a/call_for_price_website/static/description/assets/icons/manufacturing-black.png b/call_for_price_website/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/manufacturing-black.png differ diff --git a/call_for_price_website/static/description/assets/icons/pos-black.png b/call_for_price_website/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/pos-black.png differ diff --git a/call_for_price_website/static/description/assets/icons/puzzle.png b/call_for_price_website/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/puzzle.png differ diff --git a/call_for_price_website/static/description/assets/icons/restaurant-black.png b/call_for_price_website/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/restaurant-black.png differ diff --git a/call_for_price_website/static/description/assets/icons/service-black.png b/call_for_price_website/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/service-black.png differ diff --git a/call_for_price_website/static/description/assets/icons/trading-black.png b/call_for_price_website/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/trading-black.png differ diff --git a/call_for_price_website/static/description/assets/icons/training.png b/call_for_price_website/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/training.png differ diff --git a/call_for_price_website/static/description/assets/icons/update.png b/call_for_price_website/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/update.png differ diff --git a/call_for_price_website/static/description/assets/icons/user.png b/call_for_price_website/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/user.png differ diff --git a/call_for_price_website/static/description/assets/icons/wrench.png b/call_for_price_website/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/call_for_price_website/static/description/assets/icons/wrench.png differ diff --git a/call_for_price_website/static/description/assets/misc/categories.png b/call_for_price_website/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/categories.png differ diff --git a/call_for_price_website/static/description/assets/misc/check-box.png b/call_for_price_website/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/check-box.png differ diff --git a/call_for_price_website/static/description/assets/misc/compass.png b/call_for_price_website/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/compass.png differ diff --git a/call_for_price_website/static/description/assets/misc/corporate.png b/call_for_price_website/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/corporate.png differ diff --git a/call_for_price_website/static/description/assets/misc/customer-support.png b/call_for_price_website/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/customer-support.png differ diff --git a/call_for_price_website/static/description/assets/misc/cybrosys-logo.png b/call_for_price_website/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/cybrosys-logo.png differ diff --git a/call_for_price_website/static/description/assets/misc/features.png b/call_for_price_website/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/features.png differ diff --git a/call_for_price_website/static/description/assets/misc/logo.png b/call_for_price_website/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/logo.png differ diff --git a/call_for_price_website/static/description/assets/misc/pictures.png b/call_for_price_website/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/pictures.png differ diff --git a/call_for_price_website/static/description/assets/misc/pie-chart.png b/call_for_price_website/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/pie-chart.png differ diff --git a/call_for_price_website/static/description/assets/misc/right-arrow.png b/call_for_price_website/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/right-arrow.png differ diff --git a/call_for_price_website/static/description/assets/misc/star.png b/call_for_price_website/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/star.png differ diff --git a/call_for_price_website/static/description/assets/misc/support.png b/call_for_price_website/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/support.png differ diff --git a/call_for_price_website/static/description/assets/misc/whatsapp.png b/call_for_price_website/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/call_for_price_website/static/description/assets/misc/whatsapp.png differ diff --git a/call_for_price_website/static/description/assets/modules/1.png b/call_for_price_website/static/description/assets/modules/1.png new file mode 100644 index 000000000..6f15f8214 Binary files /dev/null and b/call_for_price_website/static/description/assets/modules/1.png differ diff --git a/call_for_price_website/static/description/assets/modules/2.png b/call_for_price_website/static/description/assets/modules/2.png new file mode 100644 index 000000000..cbf8e2131 Binary files /dev/null and b/call_for_price_website/static/description/assets/modules/2.png differ diff --git a/call_for_price_website/static/description/assets/modules/3.png b/call_for_price_website/static/description/assets/modules/3.png new file mode 100644 index 000000000..1046f40f1 Binary files /dev/null and b/call_for_price_website/static/description/assets/modules/3.png differ diff --git a/call_for_price_website/static/description/assets/modules/4.png b/call_for_price_website/static/description/assets/modules/4.png new file mode 100644 index 000000000..27eaa610d Binary files /dev/null and b/call_for_price_website/static/description/assets/modules/4.png differ diff --git a/call_for_price_website/static/description/assets/modules/5.png b/call_for_price_website/static/description/assets/modules/5.png new file mode 100644 index 000000000..0017a0f23 Binary files /dev/null and b/call_for_price_website/static/description/assets/modules/5.png differ diff --git a/call_for_price_website/static/description/assets/modules/6.png b/call_for_price_website/static/description/assets/modules/6.png new file mode 100644 index 000000000..ad7a8bdc0 Binary files /dev/null and b/call_for_price_website/static/description/assets/modules/6.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/Screenshot1.png b/call_for_price_website/static/description/assets/screenshots/Screenshot1.png new file mode 100644 index 000000000..91fca70f4 Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/Screenshot1.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/Screenshot2.png b/call_for_price_website/static/description/assets/screenshots/Screenshot2.png new file mode 100644 index 000000000..704a97a74 Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/Screenshot2.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/Screenshot3.png b/call_for_price_website/static/description/assets/screenshots/Screenshot3.png new file mode 100644 index 000000000..59de09986 Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/Screenshot3.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/Screenshot4.png b/call_for_price_website/static/description/assets/screenshots/Screenshot4.png new file mode 100644 index 000000000..16e251ea2 Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/Screenshot4.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/Screenshot5.png b/call_for_price_website/static/description/assets/screenshots/Screenshot5.png new file mode 100644 index 000000000..a1522fe47 Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/Screenshot5.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/Screenshot6.png b/call_for_price_website/static/description/assets/screenshots/Screenshot6.png new file mode 100644 index 000000000..5917ce26c Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/Screenshot6.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/Screenshot7.png b/call_for_price_website/static/description/assets/screenshots/Screenshot7.png new file mode 100644 index 000000000..23b21439f Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/Screenshot7.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/Screenshot8.png b/call_for_price_website/static/description/assets/screenshots/Screenshot8.png new file mode 100644 index 000000000..b75a9978b Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/Screenshot8.png differ diff --git a/call_for_price_website/static/description/assets/screenshots/hero.gif b/call_for_price_website/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..9f462599b Binary files /dev/null and b/call_for_price_website/static/description/assets/screenshots/hero.gif differ diff --git a/call_for_price_website/static/description/banner.jpg b/call_for_price_website/static/description/banner.jpg new file mode 100644 index 000000000..0433f96cb Binary files /dev/null and b/call_for_price_website/static/description/banner.jpg differ diff --git a/call_for_price_website/static/description/icon.png b/call_for_price_website/static/description/icon.png new file mode 100644 index 000000000..5761c1ea5 Binary files /dev/null and b/call_for_price_website/static/description/icon.png differ diff --git a/call_for_price_website/static/description/index.html b/call_for_price_website/static/description/index.html new file mode 100644 index 000000000..299cd19ad --- /dev/null +++ b/call_for_price_website/static/description/index.html @@ -0,0 +1,647 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + +

+ Website Call For Price

+

+ Get A Call Back For Specific Products Price

+ + +
+ +
+
+ +
+

+ Explore This + Module

+
+ + + +
+
+ +
+

+ Overview +

+
+
+
+ In some cases, we have to hide the price of a product. These items might + be free, out of stock, or available for + any other reason. This module allows you to hide the price and add to + cart button for specific products; the + call for price option will send a price request to the merchant. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+
+ + Hide specific product price. +
+
+ + Hide Add to Cart button. +
+
+ + Adds a button for price requests from merchants. +
+
+ + Track all requests from the backend. +
+
+
+ +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Enable Call for Price + from the Product Sales tab

+

+ Go to Products -> Sales -> + Enable Call for Price. After enabling this, the price and add to + cart button will hide from the website.

+ +
+ +
+

+ Hide product price from a list of products

+ +
+ +
+

+ Wishlist page

+

+ Hide the price and add to cart button from wishlist page.

+ +
+ +
+

+ Product Compare Page

+

+ If the user needs to compare the products, then they need to + request the price.

+ +
+ +
+

+ Call For Price Button

+

+ Hides the price and add to cart button from product item and + adds button for price request, on clicking a popup will + open.

+ +
+ +
+

+ Call For Price Request

+

+ Users need to enter these details in order to get the price of + the + product. The request will be sent to the merchant by clicking + Send + button.

+ +
+ +
+

+ Request Send

+

+ After sending the request, a success message will show there, + and + the merchant can access the request from backend.

+ +
+ +
+

+ The Backend View

+

+ Initially, a draft request is created; after merchant + verification, the sales team contacts the customer.

+ +
+
+
+ + +
+
+

Suggested Products

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

+ 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?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/call_for_price_website/static/src/js/website_call_for_price.js b/call_for_price_website/static/src/js/website_call_for_price.js new file mode 100644 index 000000000..39e9b44bc --- /dev/null +++ b/call_for_price_website/static/src/js/website_call_for_price.js @@ -0,0 +1,136 @@ +/** + * This file is used to give a success alert after requesting a call for price. + */ +odoo.define('call_for_price_website.website_call_for_price', function(require) { + "use strict"; + const rpc = require('web.rpc'); + var Dialog = require('web.Dialog'); + var publicWidget = require('web.public.widget'); + publicWidget.registry.CallForPrice = publicWidget.Widget.extend({ + selector: '.oe_website_sale', + events: { + 'click #send_btn': 'callforprice', + 'click #button_call_for_price': 'modalshow', + 'click #call_modal_close': 'modalhide' + }, + callforprice:async function() { + var self = this; + let product_product_id; + var first = self.$el.find('#first_name').val(); + var last = self.$el.find('#last_name').val(); + var product_id = self.$el.find('#product_id').val(); + var phone = self.$el.find('#phone').val(); + var email = self.$el.find('#email').val(); + var message = self.$el.find('#message').val(); + var qty = self.$el.find('#quantity').val(); + /** + * Validate email address format using a regular expression. + * email - The email address to validate. + * returns - True if the email is valid, false otherwise. + */ + function validateEmail(email) { + // Email validation regex pattern + var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + return emailPattern.test(email); + } + /** + * Validate phone number format using a regular expression. + * phone - The phone number to validate. + * returns - True if the phone number is valid, false otherwise. + */ + function validatePhoneNumber(phone) { + // Phone number validation regex pattern (without alphabets) + var phonePattern = /^[^A-Za-z]*$/ + return phonePattern.test(phone); + } + if (first && phone) { + if (!$.isNumeric(qty)) { + var modal = new Dialog(null, { + title: "Warning", + $content: $('
').text("Quantity should be a numeric value."), + buttons: [{ + text: "Close", + close: true + }], + }); + modal.open(); + return; + } + if (!validateEmail(email)) { + var modal = new Dialog(null, { + title: "Warning", + $content: $('
').text("Please enter a valid email address."), + buttons: [{ + text: "Close", + close: true + }], + }); + modal.open(); + return; + } + if (!validatePhoneNumber(phone)) { + var modal = new Dialog(null, { + title: "Warning", + $content: $('
').text("Please enter a valid phone number."), + buttons: [{ + text: "Close", + close: true + }], + }); + modal.open(); + return; + } + await rpc.query({ + model:'product.product', + method:'search_read', + args:[[['product_tmpl_id','=',parseInt(product_id)],['combination_indices','=',this.attrValue]]] + }).then(function(product){ + product_product_id=product[0].id + }) + let vals_list = { + 'product_id': product_product_id, + 'first_name': first, + 'last_name': last, + 'phone': phone, + 'email': email, + 'quantity': qty, + 'message': message + } + rpc.query({ + model: "call.price", + method: "create", + args: [vals_list] + }).then(function(result) { + self.$el.find('#alert_message')[0].style.display = "block" + self.$el.find('#call_for_price')[0].style.display = 'none'; + }); + } else { + var modal = new Dialog(null, { + title: "Warning", + $content: $('
').text("Please enter the required information."), + buttons: [{ + text: "Close", + close: true + }], + }); + modal.open(); + } + }, + modalshow: function() { + const url = window.location.href; + const urlParts = url.split('#'); + if (urlParts.length > 1) { + const parameterParts = urlParts[1].split('='); + if (parameterParts.length === 2 && parameterParts[0] === 'attr') { + const attrValue = parameterParts[1]; + this.attrValue = attrValue; + } + } + this.$el.find('#call_for_price')[0].style.display = 'block'; + }, + modalhide: function() { + this.$el.find('#call_for_price')[0].style.display = 'none'; + } + }); + return publicWidget.registry.CallForPrice; +}); diff --git a/call_for_price_website/views/assets.xml b/call_for_price_website/views/assets.xml new file mode 100644 index 000000000..f9c36ed24 --- /dev/null +++ b/call_for_price_website/views/assets.xml @@ -0,0 +1,9 @@ + + + +