diff --git a/website_multi_variant/README.rst b/website_multi_variant/README.rst new file mode 100644 index 000000000..436087cfe --- /dev/null +++ b/website_multi_variant/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-green.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Website Multi Variant Add to Cart +================================= +This module allows you to select variants of the selected +product from the same window of the selected product itself. + +Installation +------------- +- www.odoo.com/documentation/16.0/setup/install.html +- Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU Lesser General Public License , Version 3 (LGPL v3). +(http://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +Developer : (V16) Abhin K @ Cybrosys, 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: ``__ \ No newline at end of file diff --git a/website_multi_variant/__init__.py b/website_multi_variant/__init__.py new file mode 100644 index 000000000..40f09365d --- /dev/null +++ b/website_multi_variant/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Abhin 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 diff --git a/website_multi_variant/__manifest__.py b/website_multi_variant/__manifest__.py new file mode 100644 index 000000000..d1151bde1 --- /dev/null +++ b/website_multi_variant/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Abhin 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 Multi Variant Add to Cart', + 'version': '16.0.1.0.0', + 'category': 'Website', + 'summary': "Enhance product details page with prominent attribute options," + " quantity box, and quick add to cart feature.", + 'description': "Multi Variant Add to Cart " + "Present the comprehensive range of product attribute " + "options prominently on the product's details page, " + "accompanied by a convenient quantity box and a " + "streamlined 'quick add to cart' functionality.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['website_sale'], + 'data': [ + 'views/website_multi_variant_templates.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/website_multi_variant/controllers/__init__.py b/website_multi_variant/controllers/__init__.py new file mode 100644 index 000000000..f5739dc15 --- /dev/null +++ b/website_multi_variant/controllers/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Abhin 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 website_multi_variant diff --git a/website_multi_variant/controllers/website_multi_variant.py b/website_multi_variant/controllers/website_multi_variant.py new file mode 100644 index 000000000..55d5f5d34 --- /dev/null +++ b/website_multi_variant/controllers/website_multi_variant.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Abhin 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 http +from odoo.http import request +from odoo.addons.website_sale.controllers.main import WebsiteSale + + +class WebsiteVariantSale(WebsiteSale): + """WebsiteSale class is inherited to add the + functionality to add the variants if selected""" + + def _prepare_product_values(self, product, category, search, **kwargs): + """Since the buy button is optional this function is supered + to give buy_now value from the settings to the template""" + values = super()._prepare_product_values(product, category, search, + **kwargs) + res = request.env['res.config.settings'].sudo().search([], limit=1, + order='id desc') + values['buy_now'] = res.enabled_buy_now_button + return values + + @http.route('/shop/cart/multi', type='http', auth="user", website=True) + def cart_update_multi(self, **post): + """This controller is triggered when + the form is submitted and will update + the cart and redirect to payment if + selected to will redirect to cart""" + if post.get('product_tmpl_id'): + request.website.get_current_pricelist() + sale_order = request.website.sale_get_order(force_create=1) + product_template = request.env['product.template'].sudo().browse( + int(post.get('product_tmpl_id'))) + if product_template: + for variant in product_template.product_variant_ids: + if post.get(f'quantity-{variant.id}'): + quantity = float(post.get(f'quantity-{variant.id}')) + if quantity >= 1: + if sale_order.order_line: + for rec in sale_order.order_line: + variant_ids_in_sale = \ + [record.product_id.id for record in + sale_order.order_line] + if variant.id not in variant_ids_in_sale: + sale_order._cart_update( + product_id=int(variant.id), + add_qty=float(quantity)) + elif rec.product_id.id == variant.id: + rec.product_uom_qty += float(quantity) + else: + sale_order._cart_update( + product_id=int(variant.id), + add_qty=float(quantity)) + + res = request.redirect('/shop/payment') if post.get( + 'buy_now') else request.redirect( + '/shop/cart') + return res diff --git a/website_multi_variant/doc/RELEASE_NOTE.md b/website_multi_variant/doc/RELEASE_NOTE.md new file mode 100644 index 000000000..89acd3d46 --- /dev/null +++ b/website_multi_variant/doc/RELEASE_NOTE.md @@ -0,0 +1,6 @@ +## Module + +#### 13.09.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Website Multi Variant Add to Cart \ No newline at end of file diff --git a/website_multi_variant/static/description/assets/icons/check.png b/website_multi_variant/static/description/assets/icons/check.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/check.png differ diff --git a/website_multi_variant/static/description/assets/icons/cogs.png b/website_multi_variant/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/cogs.png differ diff --git a/website_multi_variant/static/description/assets/icons/consultation.png b/website_multi_variant/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/consultation.png differ diff --git a/website_multi_variant/static/description/assets/icons/ecom-black.png b/website_multi_variant/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/ecom-black.png differ diff --git a/website_multi_variant/static/description/assets/icons/education-black.png b/website_multi_variant/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/education-black.png differ diff --git a/website_multi_variant/static/description/assets/icons/hotel-black.png b/website_multi_variant/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/hotel-black.png differ diff --git a/website_multi_variant/static/description/assets/icons/license.png b/website_multi_variant/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/license.png differ diff --git a/website_multi_variant/static/description/assets/icons/lifebuoy.png b/website_multi_variant/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/lifebuoy.png differ diff --git a/website_multi_variant/static/description/assets/icons/manufacturing-black.png b/website_multi_variant/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_multi_variant/static/description/assets/icons/pos-black.png b/website_multi_variant/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/pos-black.png differ diff --git a/website_multi_variant/static/description/assets/icons/puzzle.png b/website_multi_variant/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/puzzle.png differ diff --git a/website_multi_variant/static/description/assets/icons/restaurant-black.png b/website_multi_variant/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/restaurant-black.png differ diff --git a/website_multi_variant/static/description/assets/icons/service-black.png b/website_multi_variant/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/service-black.png differ diff --git a/website_multi_variant/static/description/assets/icons/trading-black.png b/website_multi_variant/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/trading-black.png differ diff --git a/website_multi_variant/static/description/assets/icons/training.png b/website_multi_variant/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/training.png differ diff --git a/website_multi_variant/static/description/assets/icons/update.png b/website_multi_variant/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/update.png differ diff --git a/website_multi_variant/static/description/assets/icons/user.png b/website_multi_variant/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/user.png differ diff --git a/website_multi_variant/static/description/assets/icons/wrench.png b/website_multi_variant/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/website_multi_variant/static/description/assets/icons/wrench.png differ diff --git a/website_multi_variant/static/description/assets/misc/corporate.png b/website_multi_variant/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/website_multi_variant/static/description/assets/misc/corporate.png differ diff --git a/website_multi_variant/static/description/assets/misc/customer-support.png b/website_multi_variant/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/website_multi_variant/static/description/assets/misc/customer-support.png differ diff --git a/website_multi_variant/static/description/assets/misc/cybrosys-logo.png b/website_multi_variant/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/website_multi_variant/static/description/assets/misc/cybrosys-logo.png differ diff --git a/website_multi_variant/static/description/assets/misc/logo.png b/website_multi_variant/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/website_multi_variant/static/description/assets/misc/logo.png differ diff --git a/website_multi_variant/static/description/assets/misc/star.png b/website_multi_variant/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/website_multi_variant/static/description/assets/misc/star.png differ diff --git a/website_multi_variant/static/description/assets/misc/support.png b/website_multi_variant/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/website_multi_variant/static/description/assets/misc/support.png differ diff --git a/website_multi_variant/static/description/assets/misc/whatsapp.png b/website_multi_variant/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/website_multi_variant/static/description/assets/misc/whatsapp.png differ diff --git a/website_multi_variant/static/description/assets/modules/budget_image.png b/website_multi_variant/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..32acd3b2d Binary files /dev/null and b/website_multi_variant/static/description/assets/modules/budget_image.png differ diff --git a/website_multi_variant/static/description/assets/modules/credit_image.png b/website_multi_variant/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..5a7fe028c Binary files /dev/null and b/website_multi_variant/static/description/assets/modules/credit_image.png differ diff --git a/website_multi_variant/static/description/assets/modules/employee_image.png b/website_multi_variant/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..a51621d26 Binary files /dev/null and b/website_multi_variant/static/description/assets/modules/employee_image.png differ diff --git a/website_multi_variant/static/description/assets/modules/excel_product_stock_in_excel.png b/website_multi_variant/static/description/assets/modules/excel_product_stock_in_excel.png new file mode 100644 index 000000000..8fb783110 Binary files /dev/null and b/website_multi_variant/static/description/assets/modules/excel_product_stock_in_excel.png differ diff --git a/website_multi_variant/static/description/assets/modules/gantt.png b/website_multi_variant/static/description/assets/modules/gantt.png new file mode 100644 index 000000000..2f3a3b309 Binary files /dev/null and b/website_multi_variant/static/description/assets/modules/gantt.png differ diff --git a/website_multi_variant/static/description/assets/modules/quotation_image.png b/website_multi_variant/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..36e92d71f Binary files /dev/null and b/website_multi_variant/static/description/assets/modules/quotation_image.png differ diff --git a/website_multi_variant/static/description/assets/screenshots/hero.gif b/website_multi_variant/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..d7bbda822 Binary files /dev/null and b/website_multi_variant/static/description/assets/screenshots/hero.gif differ diff --git a/website_multi_variant/static/description/assets/screenshots/variant_add_to_cart_web.png b/website_multi_variant/static/description/assets/screenshots/variant_add_to_cart_web.png new file mode 100644 index 000000000..3a2d71649 Binary files /dev/null and b/website_multi_variant/static/description/assets/screenshots/variant_add_to_cart_web.png differ diff --git a/website_multi_variant/static/description/assets/screenshots/variant_buy_now_payment.png b/website_multi_variant/static/description/assets/screenshots/variant_buy_now_payment.png new file mode 100644 index 000000000..d5d5baa1b Binary files /dev/null and b/website_multi_variant/static/description/assets/screenshots/variant_buy_now_payment.png differ diff --git a/website_multi_variant/static/description/assets/screenshots/variant_buy_now_setting.png b/website_multi_variant/static/description/assets/screenshots/variant_buy_now_setting.png new file mode 100644 index 000000000..fc4e69bf9 Binary files /dev/null and b/website_multi_variant/static/description/assets/screenshots/variant_buy_now_setting.png differ diff --git a/website_multi_variant/static/description/assets/screenshots/variant_buy_now_shop.png b/website_multi_variant/static/description/assets/screenshots/variant_buy_now_shop.png new file mode 100644 index 000000000..e51f9e4e2 Binary files /dev/null and b/website_multi_variant/static/description/assets/screenshots/variant_buy_now_shop.png differ diff --git a/website_multi_variant/static/description/assets/screenshots/variant_cart.png b/website_multi_variant/static/description/assets/screenshots/variant_cart.png new file mode 100644 index 000000000..e0db5d9cd Binary files /dev/null and b/website_multi_variant/static/description/assets/screenshots/variant_cart.png differ diff --git a/website_multi_variant/static/description/banner.png b/website_multi_variant/static/description/banner.png new file mode 100644 index 000000000..f3068f161 Binary files /dev/null and b/website_multi_variant/static/description/banner.png differ diff --git a/website_multi_variant/static/description/icon.png b/website_multi_variant/static/description/icon.png new file mode 100644 index 000000000..b1d0f6f24 Binary files /dev/null and b/website_multi_variant/static/description/icon.png differ diff --git a/website_multi_variant/static/description/index.html b/website_multi_variant/static/description/index.html new file mode 100644 index 000000000..21454a372 --- /dev/null +++ b/website_multi_variant/static/description/index.html @@ -0,0 +1,682 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Website Multi Variant Add to Cart

+

+ Customers can Add Multiple Variants of Products with + Different Quantities to the + Cart

+ + +
+
+
+
+
+ +
+
+

+ Overview +

+
+ +
+

+ The Website Multi Variant simplifies the shopping experience on the + website by allowing customers to conveniently select their + desired product variants directly from the product detail page. + It dynamically presents available options based on attributes + like size, color, or material, streamlining the selection + process.

+
+
+
+
+

+ Features +

+
+ +
+
+ +
+
+

+ The customer can add multiple variants of products with + different quantities to + the basket at once + without having to select them one by one.

+
+
+ +
+
+ +
+
+

+ The amount of the variants will be visible on the same + product page.

+
+
+ +
+
+ +
+
+

+ Product variants are displayed in a tabular format on the + product page with a + quantity field.

+
+
+ +
+
+ +
+
+

+ "Buy now button for variant" to add multiple variants

+
+
+ + +
+ +
+
+

+ Screenshots +

+
+
+

+ Product Variant Options On Website

+

+ When clicking on a product having variants, customers can add + multiple variants with + different + quantities in the cart.

+ +
+ +
+

+ Cart View On Website

+

+ After clicking the "Add to cart" button multiple product will + added in cart. +

+ +
+ +
+

+ Enable the Buy Now button for varints

+

+ We can directly add the multiple product variants into payment + page like the buy now + button in + website.

+
+ +
+
+ +
+
+ +
+

+ Redirected directly into payment page

+ +
+ +
+ +
+
+

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

+
+
+
+
+
+
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/website_multi_variant/views/website_multi_variant_templates.xml b/website_multi_variant/views/website_multi_variant_templates.xml new file mode 100644 index 000000000..22280dc0c --- /dev/null +++ b/website_multi_variant/views/website_multi_variant_templates.xml @@ -0,0 +1,114 @@ + + + + + + +