Browse Source

Jun 21 : [ADD]Initial Commit 'special_product_snippet'

pull/257/head
AjmalCybro 2 years ago
parent
commit
487220577e
  1. 44
      special_product_snippet/README.rst
  2. 22
      special_product_snippet/__init__.py
  3. 54
      special_product_snippet/__manifest__.py
  4. 22
      special_product_snippet/controllers/__init__.py
  5. 48
      special_product_snippet/controllers/special_product_snippet.py
  6. 6
      special_product_snippet/doc/RELEASE_NOTES.md
  7. BIN
      special_product_snippet/static/description/assets/icons/check.png
  8. BIN
      special_product_snippet/static/description/assets/icons/chevron.png
  9. BIN
      special_product_snippet/static/description/assets/icons/cogs.png
  10. BIN
      special_product_snippet/static/description/assets/icons/consultation.png
  11. BIN
      special_product_snippet/static/description/assets/icons/ecom-black.png
  12. BIN
      special_product_snippet/static/description/assets/icons/education-black.png
  13. BIN
      special_product_snippet/static/description/assets/icons/hotel-black.png
  14. BIN
      special_product_snippet/static/description/assets/icons/license.png
  15. BIN
      special_product_snippet/static/description/assets/icons/lifebuoy.png
  16. BIN
      special_product_snippet/static/description/assets/icons/manufacturing-black.png
  17. BIN
      special_product_snippet/static/description/assets/icons/pos-black.png
  18. BIN
      special_product_snippet/static/description/assets/icons/puzzle.png
  19. BIN
      special_product_snippet/static/description/assets/icons/restaurant-black.png
  20. BIN
      special_product_snippet/static/description/assets/icons/service-black.png
  21. BIN
      special_product_snippet/static/description/assets/icons/trading-black.png
  22. BIN
      special_product_snippet/static/description/assets/icons/training.png
  23. BIN
      special_product_snippet/static/description/assets/icons/update.png
  24. BIN
      special_product_snippet/static/description/assets/icons/user.png
  25. BIN
      special_product_snippet/static/description/assets/icons/wrench.png
  26. BIN
      special_product_snippet/static/description/assets/misc/categories.png
  27. BIN
      special_product_snippet/static/description/assets/misc/check-box.png
  28. BIN
      special_product_snippet/static/description/assets/misc/compass.png
  29. BIN
      special_product_snippet/static/description/assets/misc/corporate.png
  30. BIN
      special_product_snippet/static/description/assets/misc/customer-support.png
  31. BIN
      special_product_snippet/static/description/assets/misc/cybrosys-logo.png
  32. BIN
      special_product_snippet/static/description/assets/misc/features.png
  33. BIN
      special_product_snippet/static/description/assets/misc/logo.png
  34. BIN
      special_product_snippet/static/description/assets/misc/pictures.png
  35. BIN
      special_product_snippet/static/description/assets/misc/pie-chart.png
  36. BIN
      special_product_snippet/static/description/assets/misc/right-arrow.png
  37. BIN
      special_product_snippet/static/description/assets/misc/star.png
  38. BIN
      special_product_snippet/static/description/assets/misc/support.png
  39. BIN
      special_product_snippet/static/description/assets/misc/whatsapp.png
  40. BIN
      special_product_snippet/static/description/assets/modules/module01.png
  41. BIN
      special_product_snippet/static/description/assets/modules/module02.png
  42. BIN
      special_product_snippet/static/description/assets/modules/module03.png
  43. BIN
      special_product_snippet/static/description/assets/modules/module04.png
  44. BIN
      special_product_snippet/static/description/assets/modules/module05.png
  45. BIN
      special_product_snippet/static/description/assets/modules/module06.png
  46. BIN
      special_product_snippet/static/description/assets/screenshots/hero.gif
  47. BIN
      special_product_snippet/static/description/assets/screenshots/snippet0.png
  48. BIN
      special_product_snippet/static/description/assets/screenshots/snippet111.png
  49. BIN
      special_product_snippet/static/description/assets/screenshots/snippet2222.png
  50. BIN
      special_product_snippet/static/description/assets/screenshots/snippet333.png
  51. BIN
      special_product_snippet/static/description/assets/screenshots/snippet444.png
  52. BIN
      special_product_snippet/static/description/assets/screenshots/snippet555.png
  53. BIN
      special_product_snippet/static/description/banner.jpg
  54. BIN
      special_product_snippet/static/description/icon.png
  55. 547
      special_product_snippet/static/description/index.html
  56. 186
      special_product_snippet/static/src/css/product_snippet.css
  57. 45
      special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg
  58. 84
      special_product_snippet/static/src/js/options.js
  59. 79
      special_product_snippet/static/src/xml/special_product_snippet.xml
  60. 134
      special_product_snippet/views/product_snippet_templates.xml
  61. 12
      special_product_snippet/views/special_product_snippet_templates.xml

44
special_product_snippet/README.rst

@ -0,0 +1,44 @@
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Special Product Website Snippet
===============================
Special Product Website Snippet
Installation
============
- www.odoo.com/documentation/16.0/setup/install.html
- Install our custom addon
License
-------
General Public License, Version 3 (LGPL-3).
(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html)
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developers: Cybrosys Techno Solutions odoo@cybrosys.com
Author : Sruthi Pavithran
Contacts
--------
* Mail Contact : odoo@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/>`__

22
special_product_snippet/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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

54
special_product_snippet/__manifest__.py

@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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': 'Special Product Website Snippet',
'version': '16.0.1.0.0',
'summary': """Select Product and Multiple Template for Product in Website Snippet""",
'category': 'Website',
'description': """This module gives an option to user to select product
and multiple template for product in website snippet.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://cybrosys.com/",
'depends': ['sale_management', 'website', 'base', 'stock', 'website_sale'],
'data': [
'views/special_product_snippet_templates.xml',
'views/product_snippet_templates.xml',
],
'assets': {
'web.assets_frontend': [
'special_product_snippet/static/src/css/product_snippet.css',
],
'website.assets_wysiwyg': [
'/special_product_snippet/static/src/js/options.js'
],
'web.assets_backend': [
'special_product_snippet/static/src/xml/special_product_snippet.xml',
],
},
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

22
special_product_snippet/controllers/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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 special_product_snippet

48
special_product_snippet/controllers/special_product_snippet.py

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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/>.
#
#############################################################################
import json
from odoo import http
from odoo.http import request
class SpecialProduct(http.Controller):
""" Getting product details and passing returning
the values and rendering the templates from js"""
@http.route('/website/snippet/special/render', type='json', auth='public',
website=True)
def render_template(self, params):
res = json.loads(params)
product = request.env['product.template'].sudo().search_read(
[('id', '=', res['id'])])
qcontext = {}
for rec in product:
qcontext['display_name'] = rec['display_name']
qcontext['list_price'] = rec['list_price']
qcontext['website_url'] = rec['website_url']
qcontext[
'image_url'] = '/web/image/product.template/%s/image_1920' % \
rec['id']
return {
'qcontext': qcontext
}

6
special_product_snippet/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <special_product_snippet>
#### 24.05.2023
#### Version 16.0.1.0.0
#### ADD
Initial Commit for Special Product Website Snippet

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
special_product_snippet/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
special_product_snippet/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
special_product_snippet/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
special_product_snippet/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
special_product_snippet/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
special_product_snippet/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
special_product_snippet/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
special_product_snippet/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
special_product_snippet/static/description/assets/modules/module01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
special_product_snippet/static/description/assets/modules/module02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
special_product_snippet/static/description/assets/modules/module03.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
special_product_snippet/static/description/assets/modules/module04.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
special_product_snippet/static/description/assets/modules/module05.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
special_product_snippet/static/description/assets/modules/module06.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
special_product_snippet/static/description/assets/screenshots/snippet0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

BIN
special_product_snippet/static/description/assets/screenshots/snippet111.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
special_product_snippet/static/description/assets/screenshots/snippet2222.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
special_product_snippet/static/description/assets/screenshots/snippet333.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

BIN
special_product_snippet/static/description/assets/screenshots/snippet444.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

BIN
special_product_snippet/static/description/assets/screenshots/snippet555.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
special_product_snippet/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
special_product_snippet/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

547
special_product_snippet/static/description/index.html

@ -0,0 +1,547 @@
<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: #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>Enterprise
</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>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">
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">Special Product Website Snippet</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">Special Product Website Snippet</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif" class="img-responsive"
style="width: 100%; margin-left: auto; margin-right: auto;" />
</div>
</div>
</div>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<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/compass.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn
more about this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#features">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
features of this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#screenshots">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
screenshots for this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview">
<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/pie-chart.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Overview
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
This module gives an option to user to select product
and multiple template for product from website snippet
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features">
<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/features.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Features
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2" />
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Available in Odoo 16.0 Community & Enterprise</span>
</div>
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2" />
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Add Special Snippet in Website</span>
</div>
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2" />
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Users can select product and multiple template for product from snippet</span>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="screenshots">
<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/pictures.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Special Product Snippet in Website
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Add new snippet in website</p>
<img src="assets/screenshots/snippet0.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Drag and Drop that snippet, user can add product and choose product template from that snippet</p>
<img src="assets/screenshots/snippet111.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">We can have different templates</p>
<img src="assets/screenshots/snippet2222.png" class="img-thumbnail">
<img src="assets/screenshots/snippet333.png" class="img-thumbnail">
<img src="assets/screenshots/snippet444.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">When we click on the view button, redirects to the shop to view the products.</p>
<img src="assets/screenshots/snippet555.png" class="img-thumbnail">
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED 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" style="padding: 30px;">
<div class="carousel-item active" style="min-height: 198.656px;">
<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/login_user_detail/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/module01.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/web_login_styles/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/module02.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/multi_branch_base/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/module03.png">
</div>
</a>
</div>
</div>
<div class="carousel-item active" style="min-height: 198.656px;">
<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-radius: 0px;"
src="./assets/modules/module04.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/sale_report_advanced/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/module05.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/subscription_package/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/module06.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev" style="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="width:35px; color:#000">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
</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: #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>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>+91 86068 27707</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto"/>
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

186
special_product_snippet/static/src/css/product_snippet.css

@ -0,0 +1,186 @@
.product-page {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background-color: #f4f4f4;
}
.product-image {
width: 300px;
height: 300px;
object-fit: cover;
margin-right: 10px;
border-radius: 50px;
margin-top: 40px;
}
.product-image2 {
width: 300px;
height: 300px;
object-fit: cover;
margin-right: 10px;
border-radius: 0px;
margin-top: 40px;
margin-left: 600px;
margin-top: 5px;
}
.product-details {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.product-details2 {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.product-name {
font-size: 30px;
font-weight: bold;
color: #333;
margin-top: 100px;
}
.product-name2 {
font-size: 30px;
font-weight: bold;
color: #333;
margin-top: 40px;
margin-left: 90px;
}
.product-description {
font-size: 22px;
color: #888;
margin-top: 40px;
max-width: 700px;
}
.product-price {
font-size: 24px;
color: #ff5252;
margin-top: 10px;
}
.product-price2 {
font-size: 30px;
color: #ff5252;
margin-top: 5px;
font-style: italic;
margin-left: 75px;
}
.product-price3 {
color: grey;
font-size: 22px;
}
.cta-button {
margin-top: 40px;
padding: 20px 40px;
background-color: #ff5252;
color: #fff;
border: none;
border-radius: 100px;
font-size: 22px;
font-weight: bold;
cursor: pointer;
}
.cta-button:hover {
background-color: #e63939;
}
.cta-button2 {
padding: 20px 40px;
background-color: #ff5252;
color: #fff;
border: none;
border-radius: 100px;
font-size: 22px;
font-weight: bold;
cursor: pointer;
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
margin-left: 60px;
}
.cta-button:hover2 {
background-color: #e63939;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
.product-page3 {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
max-width: 300px;
margin: auto;
text-align: center;
font-family: arial;
}
.product-name3 {
font-size: 24px;
}
.product-image3 {
width: 300px;
}
.cta-button3 {
padding: 20px 40px;
background-color: #ff5252;
color: #fff;
border: none;
border-radius: 100px;
font-size: 22px;
font-weight: bold;
cursor: pointer;
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
}
.cta-button4 {
border: none;
outline: 0;
padding: 12px;
color: white;
background-color: #ff5252;
text-align: center;
cursor: pointer;
width: 100%;
font-size: 18px;
}
.cta-button:hover3 {
background-color: #e63939;
}
.s_special_products_options {
border: 1px solid #EAEAEA;
padding: 20px;
}
.product-image4 {
width: 400px;
margin-left: 500px;
border: 1px solid black;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
animation: slide-in 1s ease-in-out;
}
@keyframes slide-in {
0% {
transform: translateX(-100%);
opacity: 0;
}
100% {
transform: translateX(0);
opacity: 1;
}
}
.product-details4 {
display: flex;
flex-direction: column;
align-items: center;
}
.product-price4 {
font-size: 20px;
font-weight: bold;
color: black;
margin-bottom: 10px;
}
.view-button4 {
padding: 10px 30px;
background-color: #ff5252;
color: #fff;
border: none;
border-radius: 100px;
font-size: 22px;
font-weight: bold;
cursor: pointer;
box-shadow: 0px 0px 20px 0px rgb(0 0 0 / 20%);
}
}

45
special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg

@ -0,0 +1,45 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="240" height="70" viewBox="0 0 240 70">
<defs>
<linearGradient id="s_masonry_gradient_1" gradientUnits="userSpaceOnUse" x1="82" y1="52" x2="75" y2="45">
<stop offset="0%" stop-color="#008374"/>
<stop offset="100%" stop-color="#006a59"/>
</linearGradient>
<linearGradient id="s_masonry_gradient_2" gradientUnits="userSpaceOnUse" x1="42" y1="42" x2="22" y2="55">
<stop offset="0%" stop-color="#00aa89"/>
<stop offset="100%" stop-color="#009989"/>
</linearGradient>
</defs>
<!-- Background -->
<rect x="0" y="5" width="240" height="60" fill="#9ccde4"/>
<!-- Image -->
<circle cx="45" cy="20" r="6" fill="#f3ed63"/>
<g transform="translate(-50, 0)">
<path fill="url(#s_masonry_gradient_1)" d="M75.2,50.2c-4.9,0-9.5,1-13.5,2.8c5.1,3.4,9.1,7.5,11.5,12.1h27.6C97.9,56.5,87.5,50.2,75.2,50.2z"/>
<path fill="url(#s_masonry_gradient_2)" d="M0,65.1h73.2c-6.7-12.9-25.8-22.2-48.5-22.2c-9,0-17.4,1.5-24.7,4C0,46.9,0,65.1,0,65.1z"/>
</g>
<!-- Text -->
<rect x="60" y="5" width="60" height="60" fill="#ffffff"/>
<rect x="75" y="30" width="30" height="2" fill="#333333"/>
<rect x="75" y="35" width="30" height="1" fill="#777777"/>
<rect x="75" y="38" width="30" height="1" fill="#777777"/>
<rect x="75" y="41" width="20" height="1" fill="#777777"/>
<!-- Image -->
<circle cx="165" cy="20" r="6" fill="#f3ed63"/>
<mask id="o_masonry_mask_3">
<rect x="50" y="5" width="60" height="60" fill="#ffffff"/>
</mask>
<g transform="translate(70, 0)">
<path fill="url(#s_masonry_gradient_1)" d="M75.2,50.2c-4.9,0-9.5,1-13.5,2.8c5.1,3.4,9.1,7.5,11.5,12.1h27.6C97.9,56.5,87.5,50.2,75.2,50.2z"/>
<path mask="url(#o_masonry_mask_3)" fill="url(#s_masonry_gradient_2)" d="M0,65.1h73.2c-6.7-12.9-25.8-22.2-48.5-22.2c-9,0-17.4,1.5-24.7,4C0,46.9,0,65.1,0,65.1z"/>
</g>
<!-- Text -->
<rect x="180" y="5" width="60" height="60" fill="#ffffff"/>
<rect x="195" y="30" width="30" height="2" fill="#333333"/>
<rect x="195" y="35" width="30" height="1" fill="#777777"/>
<rect x="195" y="38" width="30" height="1" fill="#777777"/>
<rect x="195" y="41" width="20" height="1" fill="#777777"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

84
special_product_snippet/static/src/js/options.js

@ -0,0 +1,84 @@
odoo.define('special_product_snippet.special_product_snippet_options', function (require) {
'use strict';
var core = require('web.core');
var _t = core._t;
var globalVariable;
const options = require('web_editor.snippets.options');
const ajax = require('web.ajax');
const Many2oneSpecialWidget = options.userValueWidgetsRegistry['we-many2one'];
const { Component, useExternalListener, onMounted } = owl;
const QWeb = core.qweb;
options.registry.SpecialProduct = options.registry.SelectTemplate.extend({
/**
* @constructor
*/
init() {
this._super(...arguments);
this.selectTemplateWidgetName = 'special_product_snippet';
},
async selectTemplate(previewMode, widgetValue, params) {
await this._templatesLoading;
// Call the controller method with parameters
const response = await ajax.jsonRpc("/website/snippet/special/render", 'call', {
'template': widgetValue,
'params': globalVariable
});
if (previewMode === 'reset') {
if (!this.beforePreviewNodes) {
return;
}
while (this.containerEl.lastChild) {
this.containerEl.removeChild(this.containerEl.lastChild);
}
for (const node of this.beforePreviewNodes) {
this.containerEl.appendChild(node);
}
this.beforePreviewNodes = null;
return;
}
if (!this.beforePreviewNodes) {
this.beforePreviewNodes = [...this.containerEl.childNodes];
}
while (this.containerEl.lastChild) {
this.containerEl.removeChild(this.containerEl.lastChild);
}
const temp = QWeb.render(widgetValue,response.qcontext);
this.containerEl.insertAdjacentHTML('beforeend',temp);
if (!previewMode) {
this.beforePreviewNodes = null;
}
},
});
// getting product from Many2one widget and setting the value in a global
// variable and passing to python and fetching data
const SpecialProductSnippetProduct = Many2oneSpecialWidget.include({
init(parent, title, options, $target) {
return this._super(...arguments);
},
_onUserValueNotification(ev) {
const { widget } = ev.data;
globalVariable=widget._methodsParams.recordData
if (widget && widget === this.createInput) {
ev.stopPropagation();
return;
}
if (widget && widget === this.createButton) {
if (!this.createInput._value) {
ev.stopPropagation();
}
return;
}
if (widget !== this.createButton && this.createInput) {
this.createInput._value = '';
}
return this._super(ev);
},
});
options.userValueWidgetsRegistry['we-many2one-special'] = Many2oneSpecialWidget;
return {
SpecialProductSnippetProduct: SpecialProductSnippetProduct,
SpecialProduct: options.registry.SpecialProduct,
Many2oneSpecialWidget: Many2oneSpecialWidget,
};
});

79
special_product_snippet/static/src/xml/special_product_snippet.xml

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Create list of product snippet templates-->
<templates id="template" xml:space="preserve">
<t t-name="special_product_snippet.dynamic_1">
<div class="product-page">
<img t-att-src="image_url"
alt="Product Image"
class="product-image"/>
<div class="product-details">
<h1 class="product-name dis_nme">
<t t-esc="display_name"/>
</h1>
<p class="product-description">
</p>
<p class="product-price">Starting at
<t t-esc="list_price" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</p>
<a t-att-href="website_url" class="cta-button3">
View
</a>
</div>
</div>
</t>
<t t-name="special_product_snippet.dynamic_2">
<div class="product-page2">
<img t-att-src="image_url"
alt="Product Image"
class="product-image2"/>
<div class="product-details2">
<h1 class="product-name2 dis_nme">
<t t-esc="display_name"/>
</h1>
<p class="product-description2">
</p>
<p class="product-price2">Starting at
<t t-esc="list_price" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</p>
<a t-att-href="website_url" class="cta-button2">
View
</a>
</div>
</div>
</t>
<t t-name="special_product_snippet.dynamic_3">
<div class="product-page3 oe_structure">
<div class="product-header3">
<h1 class="product-name3 dis_nme">
<t t-esc="display_name"/>
</h1>
</div>
<div class="product-details3">
<img class="product-image3" t-att-src="image_url"
alt="Product Image"/>
<div class="product-description3">
</div>
<div class="product-price3">
<p>Starting at
<t t-esc="list_price" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</p>
<a t-att-href="website_url"
class="cta-button4">View
</a>
</div>
</div>
</div>
</t>
<t t-name="special_product_snippet.dynamic_4">
<div class="product-card4">
<img t-att-src="image_url" class="product-image4" alt="Product Image"/>
<div class="product-details4">
<span class="product-price4"><t t-esc="display_name"/><t t-esc="list_price" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></span>
<a t-att-href="website_url" class="view-button4">View</a>
</div>
</div>
</t>
</templates>

134
special_product_snippet/views/product_snippet_templates.xml

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Listing Product Snippet templates-->
<template id="s_special_snippets" name="Special Snippet">
<section class="s_special_products_options">
<div class="container">
<t t-call="special_product_snippet.dynamic_1"/>
</div>
</section>
</template>
<template id="dynamic_1"
name="special snippet" groups="base.group_user">
<div class="product-page">
<img t-att-src="image_url"
alt="Product Image"
class="product-image"/>
<div class="product-details">
<h1 class="product-name dis_nme">
<t t-esc="display_name"/>
</h1>
<p class="product-description">Description of the
product
</p>
<p class="product-price">Starting at
<t t-esc="list_price"/>
</p>
<a t-att-href="website_url" class="cta-button3">
View
</a>
</div>
</div>
</template>
<template id="dynamic_2"
name="special snippet" groups="base.group_user">
<div class="product-page2"
t-attf-style="background-image: url(#{image_url});">
<div class="product-details2">
<h1 class="product-name2 dis_nme">
<t t-esc="display_name"/>
</h1>
<p class="product-description2">Description of the
product
</p>
<p class="product-price2">Starting at
<t t-esc="list_price"/>
</p>
<a t-att-href="website_url" class="cta-button3">
View
</a>
</div>
</div>
</template>
<template id="dynamic_3"
name="special snippet" groups="base.group_user">
<div class="product-page3 oe_structure">
<div class="product-header3">
<h1 class="product-name3 dis_nme">
<t t-esc="display_name"/>
</h1>
</div>
<div class="product-details3">
<img class="product-image3" t-att-src="image_url"
alt="Product Image"/>
<div class="product-description3">
<p>Description of the product.</p>
</div>
<div class="product-price3">
<p>Starting at
<t t-esc="list_price"/>
</p>
<a t-att-href="website_url"
class="cta-button3">View
</a>
</div>
</div>
</div>
</template>
<template id="dynamic_4"
name="special snippet" groups="base.group_user">
<div class="product-card4">
<h2 class="product-name4"><t t-esc="display_name"/></h2>
<img t-att-src="image_url" alt="Product Image"/>
<div class="product-details4">
<span class="product-price4"> <t t-esc="list_price"/></span>
<a t-att-href="website_url" class="view-button4">View</a>
</div>
</div>
</template>
<template id="s_special_products_options"
inherit_id="website.snippet_options">
<xpath expr="." position="inside">
<div data-js="SpecialProduct"
data-selector=".s_special_products_options">
<we-row>
<we-many2one string="Product"
data-model="product.template"
data-no-preview="true"
data-name=""
data-select-data-attribute=""
data-set-product-attribute=""
data-attribute-name="scrollBackgroundRatio"
/>
</we-row>
<we-select string="Template"
data-name="special_product_snippet"
data-attribute-name="SpecialProductTemplate"
data-attribute-default-value="default">
<we-button title="Default"
data-select-template="special_product_snippet.dynamic_1"
data-select-data-attribute="default"
data-img="/special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg"
/>
<we-button title="temp2"
data-select-template="special_product_snippet.dynamic_2"
data-select-data-attribute="Temp2"
data-img="/special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg"
/>
<we-button title="temp3"
data-select-template="special_product_snippet.dynamic_3"
data-select-data-attribute="Temp3"
data-img="/special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg"
/>
<we-button title="temp4"
data-select-template="special_product_snippet.dynamic_4"
data-select-data-attribute="Temp4"
data-img="/special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg"
/>
</we-select>
</div>
</xpath>
</template>
</odoo>

12
special_product_snippet/views/special_product_snippet_templates.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Create product snippet-->
<template id="product_snippets" inherit_id="website.snippets"
priority="8">
<xpath expr="//div[@id='snippet_effect']//t[@t-snippet][last()]"
position="after">
<t t-snippet="special_product_snippet.s_special_snippets"
t-thumbnail="/special_product_snippet/static/src/img/snippets_options/img_special_product_snippet.svg"/>
</xpath>
</template>
</odoo>
Loading…
Cancel
Save