Browse Source

sep 13 : [ADD] Initial Commit 'website_multi_variant'

pull/277/head
Shijin V 2 years ago
parent
commit
a04621a3f5
  1. 48
      website_multi_variant/README.rst
  2. 21
      website_multi_variant/__init__.py
  3. 45
      website_multi_variant/__manifest__.py
  4. 21
      website_multi_variant/controllers/__init__.py
  5. 75
      website_multi_variant/controllers/website_multi_variant.py
  6. 6
      website_multi_variant/doc/RELEASE_NOTE.md
  7. BIN
      website_multi_variant/static/description/assets/icons/check.png
  8. BIN
      website_multi_variant/static/description/assets/icons/cogs.png
  9. BIN
      website_multi_variant/static/description/assets/icons/consultation.png
  10. BIN
      website_multi_variant/static/description/assets/icons/ecom-black.png
  11. BIN
      website_multi_variant/static/description/assets/icons/education-black.png
  12. BIN
      website_multi_variant/static/description/assets/icons/hotel-black.png
  13. BIN
      website_multi_variant/static/description/assets/icons/license.png
  14. BIN
      website_multi_variant/static/description/assets/icons/lifebuoy.png
  15. BIN
      website_multi_variant/static/description/assets/icons/manufacturing-black.png
  16. BIN
      website_multi_variant/static/description/assets/icons/pos-black.png
  17. BIN
      website_multi_variant/static/description/assets/icons/puzzle.png
  18. BIN
      website_multi_variant/static/description/assets/icons/restaurant-black.png
  19. BIN
      website_multi_variant/static/description/assets/icons/service-black.png
  20. BIN
      website_multi_variant/static/description/assets/icons/trading-black.png
  21. BIN
      website_multi_variant/static/description/assets/icons/training.png
  22. BIN
      website_multi_variant/static/description/assets/icons/update.png
  23. BIN
      website_multi_variant/static/description/assets/icons/user.png
  24. BIN
      website_multi_variant/static/description/assets/icons/wrench.png
  25. BIN
      website_multi_variant/static/description/assets/misc/corporate.png
  26. BIN
      website_multi_variant/static/description/assets/misc/customer-support.png
  27. BIN
      website_multi_variant/static/description/assets/misc/cybrosys-logo.png
  28. BIN
      website_multi_variant/static/description/assets/misc/logo.png
  29. BIN
      website_multi_variant/static/description/assets/misc/star.png
  30. BIN
      website_multi_variant/static/description/assets/misc/support.png
  31. BIN
      website_multi_variant/static/description/assets/misc/whatsapp.png
  32. BIN
      website_multi_variant/static/description/assets/modules/budget_image.png
  33. BIN
      website_multi_variant/static/description/assets/modules/credit_image.png
  34. BIN
      website_multi_variant/static/description/assets/modules/employee_image.png
  35. BIN
      website_multi_variant/static/description/assets/modules/excel_product_stock_in_excel.png
  36. BIN
      website_multi_variant/static/description/assets/modules/gantt.png
  37. BIN
      website_multi_variant/static/description/assets/modules/quotation_image.png
  38. BIN
      website_multi_variant/static/description/assets/screenshots/hero.gif
  39. BIN
      website_multi_variant/static/description/assets/screenshots/variant_add_to_cart_web.png
  40. BIN
      website_multi_variant/static/description/assets/screenshots/variant_buy_now_payment.png
  41. BIN
      website_multi_variant/static/description/assets/screenshots/variant_buy_now_setting.png
  42. BIN
      website_multi_variant/static/description/assets/screenshots/variant_buy_now_shop.png
  43. BIN
      website_multi_variant/static/description/assets/screenshots/variant_cart.png
  44. BIN
      website_multi_variant/static/description/banner.png
  45. BIN
      website_multi_variant/static/description/icon.png
  46. 682
      website_multi_variant/static/description/index.html
  47. 114
      website_multi_variant/views/website_multi_variant_templates.xml

48
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 <https://cybrosys.com/>`__
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 <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

21
website_multi_variant/__init__.py

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import controllers

45
website_multi_variant/__manifest__.py

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'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,
}

21
website_multi_variant/controllers/__init__.py

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import website_multi_variant

75
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(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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

6
website_multi_variant/doc/RELEASE_NOTE.md

@ -0,0 +1,6 @@
## Module <website_multi_variant>
#### 13.09.2023
#### Version 16.0.1.0.0
#### ADD
- Initial commit for Website Multi Variant Add to Cart

BIN
website_multi_variant/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
website_multi_variant/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
website_multi_variant/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
website_multi_variant/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
website_multi_variant/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
website_multi_variant/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
website_multi_variant/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
website_multi_variant/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
website_multi_variant/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
website_multi_variant/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
website_multi_variant/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
website_multi_variant/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
website_multi_variant/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
website_multi_variant/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
website_multi_variant/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
website_multi_variant/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
website_multi_variant/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
website_multi_variant/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
website_multi_variant/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
website_multi_variant/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
website_multi_variant/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
website_multi_variant/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
website_multi_variant/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
website_multi_variant/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
website_multi_variant/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
website_multi_variant/static/description/assets/modules/budget_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
website_multi_variant/static/description/assets/modules/credit_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
website_multi_variant/static/description/assets/modules/employee_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
website_multi_variant/static/description/assets/modules/excel_product_stock_in_excel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
website_multi_variant/static/description/assets/modules/gantt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
website_multi_variant/static/description/assets/modules/quotation_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
website_multi_variant/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

BIN
website_multi_variant/static/description/assets/screenshots/variant_add_to_cart_web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

BIN
website_multi_variant/static/description/assets/screenshots/variant_buy_now_payment.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

BIN
website_multi_variant/static/description/assets/screenshots/variant_buy_now_setting.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
website_multi_variant/static/description/assets/screenshots/variant_buy_now_shop.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

BIN
website_multi_variant/static/description/assets/screenshots/variant_cart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

BIN
website_multi_variant/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
website_multi_variant/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

682
website_multi_variant/static/description/index.html

@ -0,0 +1,682 @@
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div class="d-flex align-items-center justify-content-between"
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="assets/misc/cybrosys-logo.png" width="42" height="42"
style="width: 42px; height: 42px;"/>
<div>
<div
style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Community
</div>
<div style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div
style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Website Multi Variant Add to Cart</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
Customers can Add Multiple Variants of Products with
Different Quantities to the
Cart </p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif" class="img-responsive"
style="width: 70%; margin-left: 15%; margin-right: auto;"/>
</div>
</div>
</div>
</div>
<div class="container" style="margin-top: 70px; padding: 0rem 1.5rem 4rem !important ">
<div class="row">
<div class="col-md-12"
style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
<div class="row">
<div class="col-md-6">
<a href="#overview"
style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right"
style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features"
style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right"
style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots"
style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right"
style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<div class="row" id="overview">
<div class="col-md-12"
style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
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.</p>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12"
style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
The customer can add multiple variants of products with
different quantities to
the basket at once
without having to select them one by one.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
The amount of the variants will be visible on the same
product page.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product variants are displayed in a tabular format on the
product page with a
quantity field.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
"Buy now button for variant" to add multiple variants </h4>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12"
style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product Variant Options On Website</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
When clicking on a product having variants, customers can add
multiple variants with
different
quantities in the cart. </p>
<img src="assets/screenshots/variant_add_to_cart_web.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Cart View On Website </h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
After clicking the "Add to cart" button multiple product will
added in cart.
</p>
<img src="assets/screenshots/variant_cart.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Enable the Buy Now button for varints</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
We can directly add the multiple product variants into payment
page like the buy now
button in
website. </p>
<div style="margin-bottom:15px;">
<img src="assets/screenshots/variant_buy_now_setting.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div>
<img src="assets/screenshots/variant_buy_now_shop.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Redirected directly into payment page</h4>
<img src="assets/screenshots/variant_buy_now_payment.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/export_stockinfo_xls/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/excel_product_stock_in_excel.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/custom_gantt_view/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/gantt.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/sales_credit_limit/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/credit_image.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/base_account_budget/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/budget_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/product_to_quotation/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/quotation_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/employee_documents_expiry/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/employee_image.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1"
data-slide="prev"
style="left:-25px;width: 35px;color: #000;">
<span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left"
style="font-size:24px"></i></span>
</a>
<a class="carousel-control-next" href="#demo1"
data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i
class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png"
class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</div>
<!-- END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/support.png" height="48"
width="48"
style="width: 42px; height: 42px;"/>
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need
help?
Get in touch.</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com</p>
</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/whatsapp.png" height="52"
width="52"
style="width: 52px; height: 52px;"/>
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on
WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
+91 86068
27707</p>
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="assets/misc/logo.png" width="144" height="31"
style="width:144px; height: 31px; margin-top: 40px;"/>
</div>
</div>
</div>
</div>
<!-- END OF SUPPORT -->

114
website_multi_variant/views/website_multi_variant_templates.xml

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Product Template is inherited to add
the table that let users choose its variants-->
<template id="multi_variant_product" inherit_id="website_sale.product">
<xpath expr="//div[@id='product_details']/div[@id='o_product_terms_and_share']"
position="before">
<div class="multi_variant_list"
t-if="len(product.product_variant_ids) > 1"
style="margin-left:-28px;">
<form method="post" action="/shop/cart/multi">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<t t-set="products" t-value="product"/>
<table class="table table-striped table-condensed"
id="product_variants">
<thead>
<tr>
<th width="130">Attributes</th>
<th width="130">Price</th>
<th width="130">Quantity</th>
</tr>
</thead>
<tbody>
<tr t-foreach="product.product_variant_ids"
t-as="variant_ids">
<td>
<div style="display: flex; justify-content: space-between;">
<div>
<img class="variant_image"
style="width: 66%; border-radius: 10%;"
t-att-src="'/web/image/product.product/%s/image_128' % variant_ids.id"/>
</div>
<div style="display:block; width:111%;">
<div t-foreach="variant_ids.product_template_attribute_value_ids"
t-as="attribute">
<div>
<span t-field="attribute.attribute_id"/>
:
<span t-esc="attribute.name"/>
</div>
</div>
</div>
</div>
</td>
<td id="td-price" name="product_price">
<span t-field="variant_ids.lst_price"
style="white-space: nowrap;"
t-options="{ 'widget': 'monetary', 'display_currency': website.currency_id }"/>
</td>
<td>
<div class="css_quantity input-group"
contenteditable="false">
<a t-attf-href="#"
class="btn btn-secondary js_add_cart_json"
aria-label="Remove one"
title="Remove one">
<i class="fa fa-minus"/>
</a>
<input type="text"
class="form-control quantity"
data-min="0"
t-att-name="'quantity-%s' % (variant_ids.id)"
value="0"
style="width:31px;text-align:center;"/>
<a t-attf-href="#"
class="btn btn-secondary float_left js_add_cart_json"
aria-label="Add one"
title="Add one">
<i class="fa fa-plus"/>
</a>
</div>
</td>
</tr>
</tbody>
</table>
<input name="product_tmpl_id" t-att-value="products.id"
type="hidden"/>
<div style="display: flex;align-items: center; margin-bottom: 2%">
<a role='button'
type="submit" id="m_add_to_cart"
class="btn btn-primary btn-lg mt8 js_check_product a-submit"
style="padding-bottom: 0.10000000000000142rem;width: 20%; font-size: 91%;height: 38px;"
>
<i class="fa fa-shopping-cart"/>
<span style="font-weight:bold">Add to Cart</span>
</a>
<div style="position: relative; display: inline-block; margin-left: 2%;">
<input t-if="buy_now" role="button"
type="submit" name="buy_now" value="Buy Now"
class="btn btn-outline-primary btn-lg mt16 d-block d-sm-inline-block buy_now_variant"
style="margin-top: 1.3%; transform: translateY(-3px); padding: 6px 32px; padding-right: 30px; font-size: 16px"
/>
<i t-if="buy_now" class="fa fa-bolt me-2"
style="position: absolute;top: 50%;right: 90px; transform: translateY(-30%);"/>
</div>
</div>
</form>
</div>
</xpath>
</template>
<!--Hides the add to cart and color selection
option from the screen if it has variants-->
<template id="quantity_hide" inherit_id="website_sale.product_quantity">
<xpath expr="//div[@id='add_to_cart_wrap']" position="attributes">
<attribute name="t-if">len(product.product_variant_ids) &lt;= 1
</attribute>
</xpath>
<xpath expr="//div[hasclass('js_main_product')]" position="attributes">
<attribute name="t-if">len(product.product_variant_ids) &lt;= 1
</attribute>
</xpath>
</template>
</odoo>
Loading…
Cancel
Save