diff --git a/featured_brand_snippet/README.rst b/featured_brand_snippet/README.rst new file mode 100644 index 000000000..bfe753ac7 --- /dev/null +++ b/featured_brand_snippet/README.rst @@ -0,0 +1,37 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Featured Brand Snippet +======================= +Dynamic snippet for selecting brands + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: Ammu Raj @cybrosys, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/featured_brand_snippet/__init__.py b/featured_brand_snippet/__init__.py new file mode 100644 index 000000000..03f00a400 --- /dev/null +++ b/featured_brand_snippet/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import controller +from . import models diff --git a/featured_brand_snippet/__manifest__.py b/featured_brand_snippet/__manifest__.py new file mode 100644 index 000000000..23144cc17 --- /dev/null +++ b/featured_brand_snippet/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Featured Brand Snippet', + 'version': '16.0.1.0.0', + 'category': 'Website,eCommerce', + 'summary': 'Dynamic snippet for selecting brands', + 'description': 'Featured brands are arranged in a carousel and allows to view the products of selected brand', + 'author': 'Cybrosys Techno solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'license': 'AGPL-3', + 'depends': ['product_brand_sale', 'website_sale'], + 'data': [ + 'views/product_brand_views.xml', + 'views/brand_snippet_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'featured_brand_snippet/static/src/xml/dynamic_brand_courosel.xml', + 'featured_brand_snippet/static/src/js/brand_selection.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/featured_brand_snippet/controller/__init__.py b/featured_brand_snippet/controller/__init__.py new file mode 100644 index 000000000..382c0aa93 --- /dev/null +++ b/featured_brand_snippet/controller/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import main diff --git a/featured_brand_snippet/controller/main.py b/featured_brand_snippet/controller/main.py new file mode 100644 index 000000000..4db5d5b81 --- /dev/null +++ b/featured_brand_snippet/controller/main.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import http +from odoo.http import request +from odoo.addons.http_routing.models.ir_http import slug +from odoo.addons.website_sale.controllers.main import WebsiteSale +from odoo.addons.website_sale.controllers.main import TableCompute + + +class WebsiteSales(WebsiteSale): + """View of Product Brands in Website""" + + @http.route([ + '''/shop''', + '''/shop/page/''', + '''/shop/category/''', + '''/shop/category//page/''', + '''/shop/brand/''', + ], type='http', auth="public", website=True) + def shop(self, page=0, category=None, search='', min_price=0.0, max_price=0.0, ppg=False, brand=None, + **post): + """ + Defined a url for product brands inside the existing function and controller of WebsiteSale + """ + res = super(WebsiteSales, self).shop(page=page, category=category, search=search, min_price=min_price, max_price=max_price, ppg=ppg, brand=brand, + **post) + website = request.env['website'].get_current_website() + if ppg: + try: + ppg = int(ppg) + post['ppg'] = ppg + except ValueError: + ppg = False + if not ppg: + ppg = website.shop_ppg or 20 + + ppr = website.shop_ppr or 4 + Brand = request.env['product.brand'] + url = "/shop" + if not brand: + brand = Brand + if category: + url = "/shop/category/%s" % slug(category) + + Brand = request.env['product.brand'].search([]) + if brand: + products_brand = request.env['product.template'].search( + ['&', ('brand_id', '=', brand.id), ('sale_ok', '=', True), ('is_published', '=', True)]) + product_brand_count = len(products_brand) + pager_brand = request.website.pager(url=url, total=product_brand_count, page=page, step=ppg, scope=7, + url_args=post) + res.qcontext.update({ + 'brand': brand, + 'pager': pager_brand, + 'products': products_brand, + 'search_count': product_brand_count, # common for all searchbox + 'bins': TableCompute().process(products_brand, ppg, ppr), + 'brands': Brand}) + else: + res.qcontext.update({ + 'brand': brand, + 'brands': Brand}) + return res + + +class ProductBrandWebsite(http.Controller): + """Returns the featured brands""" + + @http.route(['/product_brand'], type="json", auth="public", + methods=['POST']) + def featured_brands(self): + """Returns the brand name, image &id of the featured brands""" + brands = http.request.env['product.brand'].search_read( + [('is_featured_brand', '=', True)], ['name', 'brand_image', 'id']) + return brands diff --git a/featured_brand_snippet/doc/RELEASE_NOTES.md b/featured_brand_snippet/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..6d619df2d --- /dev/null +++ b/featured_brand_snippet/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 16.03.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Featured Brand Snippet + \ No newline at end of file diff --git a/featured_brand_snippet/models/__init__.py b/featured_brand_snippet/models/__init__.py new file mode 100644 index 000000000..2307eeeec --- /dev/null +++ b/featured_brand_snippet/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import product_brand diff --git a/featured_brand_snippet/models/product_brand.py b/featured_brand_snippet/models/product_brand.py new file mode 100644 index 000000000..576253d24 --- /dev/null +++ b/featured_brand_snippet/models/product_brand.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import models, fields + + +class ProductBrand(models.Model): + """Inherits Product Brand""" + _inherit = 'product.brand' + + is_featured_brand = fields.Boolean(string='Featured brand', + help='enable to view the brand in website snippet') diff --git a/featured_brand_snippet/static/description/assets/icons/check.png b/featured_brand_snippet/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/check.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/chevron.png b/featured_brand_snippet/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/chevron.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/cogs.png b/featured_brand_snippet/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/cogs.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/consultation.png b/featured_brand_snippet/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/consultation.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/ecom-black.png b/featured_brand_snippet/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/ecom-black.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/education-black.png b/featured_brand_snippet/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/education-black.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/hotel-black.png b/featured_brand_snippet/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/hotel-black.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/license.png b/featured_brand_snippet/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/license.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/lifebuoy.png b/featured_brand_snippet/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/lifebuoy.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/manufacturing-black.png b/featured_brand_snippet/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/manufacturing-black.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/pos-black.png b/featured_brand_snippet/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/pos-black.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/puzzle.png b/featured_brand_snippet/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/puzzle.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/restaurant-black.png b/featured_brand_snippet/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/restaurant-black.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/service-black.png b/featured_brand_snippet/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/service-black.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/trading-black.png b/featured_brand_snippet/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/trading-black.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/training.png b/featured_brand_snippet/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/training.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/update.png b/featured_brand_snippet/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/update.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/user.png b/featured_brand_snippet/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/user.png differ diff --git a/featured_brand_snippet/static/description/assets/icons/wrench.png b/featured_brand_snippet/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/featured_brand_snippet/static/description/assets/icons/wrench.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/categories.png b/featured_brand_snippet/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/categories.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/check-box.png b/featured_brand_snippet/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/check-box.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/compass.png b/featured_brand_snippet/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/compass.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/corporate.png b/featured_brand_snippet/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/corporate.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/customer-support.png b/featured_brand_snippet/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/customer-support.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/cybrosys-logo.png b/featured_brand_snippet/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/cybrosys-logo.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/features.png b/featured_brand_snippet/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/features.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/logo.png b/featured_brand_snippet/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/logo.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/pictures.png b/featured_brand_snippet/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/pictures.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/pie-chart.png b/featured_brand_snippet/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/pie-chart.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/right-arrow.png b/featured_brand_snippet/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/right-arrow.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/star.png b/featured_brand_snippet/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/star.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/support.png b/featured_brand_snippet/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/support.png differ diff --git a/featured_brand_snippet/static/description/assets/misc/whatsapp.png b/featured_brand_snippet/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/misc/whatsapp.png differ diff --git a/featured_brand_snippet/static/description/assets/modules/1.png b/featured_brand_snippet/static/description/assets/modules/1.png new file mode 100644 index 000000000..15b141248 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/modules/1.png differ diff --git a/featured_brand_snippet/static/description/assets/modules/2.png b/featured_brand_snippet/static/description/assets/modules/2.png new file mode 100644 index 000000000..57eebc5b2 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/modules/2.png differ diff --git a/featured_brand_snippet/static/description/assets/modules/3.png b/featured_brand_snippet/static/description/assets/modules/3.png new file mode 100644 index 000000000..31ed46762 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/modules/3.png differ diff --git a/featured_brand_snippet/static/description/assets/modules/4.png b/featured_brand_snippet/static/description/assets/modules/4.png new file mode 100644 index 000000000..f14dc60c5 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/modules/4.png differ diff --git a/featured_brand_snippet/static/description/assets/modules/5.png b/featured_brand_snippet/static/description/assets/modules/5.png new file mode 100644 index 000000000..216c130e0 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/modules/5.png differ diff --git a/featured_brand_snippet/static/description/assets/modules/6.png b/featured_brand_snippet/static/description/assets/modules/6.png new file mode 100644 index 000000000..dd2b151c6 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/modules/6.png differ diff --git a/featured_brand_snippet/static/description/assets/screenshots/brand1.png b/featured_brand_snippet/static/description/assets/screenshots/brand1.png new file mode 100644 index 000000000..e8ffc164b Binary files /dev/null and b/featured_brand_snippet/static/description/assets/screenshots/brand1.png differ diff --git a/featured_brand_snippet/static/description/assets/screenshots/brand2.png b/featured_brand_snippet/static/description/assets/screenshots/brand2.png new file mode 100644 index 000000000..ff5f4ae6f Binary files /dev/null and b/featured_brand_snippet/static/description/assets/screenshots/brand2.png differ diff --git a/featured_brand_snippet/static/description/assets/screenshots/brand3.png b/featured_brand_snippet/static/description/assets/screenshots/brand3.png new file mode 100644 index 000000000..6c6f9c119 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/screenshots/brand3.png differ diff --git a/featured_brand_snippet/static/description/assets/screenshots/brand4.png b/featured_brand_snippet/static/description/assets/screenshots/brand4.png new file mode 100644 index 000000000..0abefd400 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/screenshots/brand4.png differ diff --git a/featured_brand_snippet/static/description/assets/screenshots/hero.gif b/featured_brand_snippet/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..45ebdb8f0 Binary files /dev/null and b/featured_brand_snippet/static/description/assets/screenshots/hero.gif differ diff --git a/featured_brand_snippet/static/description/banner.jpg b/featured_brand_snippet/static/description/banner.jpg new file mode 100644 index 000000000..acf97a878 Binary files /dev/null and b/featured_brand_snippet/static/description/banner.jpg differ diff --git a/featured_brand_snippet/static/description/icon.png b/featured_brand_snippet/static/description/icon.png new file mode 100644 index 000000000..6ddad644f Binary files /dev/null and b/featured_brand_snippet/static/description/icon.png differ diff --git a/featured_brand_snippet/static/description/index.html b/featured_brand_snippet/static/description/index.html new file mode 100644 index 000000000..3c9a53ae3 --- /dev/null +++ b/featured_brand_snippet/static/description/index.html @@ -0,0 +1,537 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+ +

+ Featured Brand Snippet +

+

Featured brands are arranged in a carousel and allows to view the products of selected brand

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ A feature that allows users to view a carousel of selected featured brands. This feature provides a way to promote specific brands and products while also providing users with an easy way to browse and purchase products from their favorite brands. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Drag and drop the dynamic snippet from the website +
+
+ + You can view all featured brands in a carousel. Click on a brand for viewing its products. +
+
+ + Supports both Community and Enterprise +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Featured brand +

+

Enable the featured brand from brands if you wish to view the brand in website.

+ +
+ +
+

Dynamic snippet +

+

You can view a dynamic snippet 'Product Brand' in website.

+ +
+ +
+

Carousel of Product Brands +

+

Drag and drop the snippet then click save.You can view the brands arranged in a carousel.

+ +
+
+

Products of the Brand +

+

Click on the Products button for viewing its products.

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

Related + Products +

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

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/featured_brand_snippet/static/src/img/snippets/brands.jpg b/featured_brand_snippet/static/src/img/snippets/brands.jpg new file mode 100644 index 000000000..45bf0654c Binary files /dev/null and b/featured_brand_snippet/static/src/img/snippets/brands.jpg differ diff --git a/featured_brand_snippet/static/src/js/brand_selection.js b/featured_brand_snippet/static/src/js/brand_selection.js new file mode 100644 index 000000000..527983ae3 --- /dev/null +++ b/featured_brand_snippet/static/src/js/brand_selection.js @@ -0,0 +1,44 @@ +odoo.define('featured_brand_snippet.s_dynamic_brand', function(require) { + 'use strict'; + + const core = require('web.core'); + const publicWidget = require('web.public.widget'); + const rpc = require('web.rpc'); + const qweb = core.qweb; + + const ProductBrandDynamic = publicWidget.Widget.extend({ + selector: '.dynamic_snippet_brand', + + /** + Calling the route for returning the brands name, image &ID + */ + willStart: async function() { + var self = this; + await rpc.query({ + route: '/product_brand', + }).then((data) => { + this.data = data; + }); + }, + + /** + For calling the brand snippet template + */ + start: function() { + var chunks = _.chunk(this.data, 4) + if (!chunks.length == 0) { + chunks[0].is_active = true; + this.$el.find('#brands').html( + qweb.render('featured_brand_snippet.brand_snippet_carousel', { + chunks + }) + ) + } + + }, + }); + + publicWidget.registry.featured_brand_snippet = ProductBrandDynamic; + + return ProductBrandDynamic; +}); \ No newline at end of file diff --git a/featured_brand_snippet/static/src/xml/dynamic_brand_courosel.xml b/featured_brand_snippet/static/src/xml/dynamic_brand_courosel.xml new file mode 100644 index 000000000..e1cd0c2c3 --- /dev/null +++ b/featured_brand_snippet/static/src/xml/dynamic_brand_courosel.xml @@ -0,0 +1,42 @@ + + + + + + + + Previous + + + + Next + + + diff --git a/featured_brand_snippet/views/brand_snippet_views.xml b/featured_brand_snippet/views/brand_snippet_views.xml new file mode 100644 index 000000000..706ea3d28 --- /dev/null +++ b/featured_brand_snippet/views/brand_snippet_views.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/featured_brand_snippet/views/product_brand_views.xml b/featured_brand_snippet/views/product_brand_views.xml new file mode 100644 index 000000000..2dec07ec2 --- /dev/null +++ b/featured_brand_snippet/views/product_brand_views.xml @@ -0,0 +1,14 @@ + + + + + product.brand.view.form + product.brand + + + + + + + +