From 2b42b1b30038d974857fbd0be390848291e27912 Mon Sep 17 00:00:00 2001 From: Siddharth Bhalgami Date: Thu, 8 Feb 2018 16:32:24 +0530 Subject: [PATCH] [IMP] /shop page variants (Total 3 Variants !!) - (Default) Default one with products listing - (Option1) Categorized Shop Page with all listing of products category - (Option2) Blank Shop Page with no content! User can design their own /shop page User can easily choose any one option for /shop page from `Customize` menu at a time. --- addons/website_sale/controllers/main.py | 2 +- .../static/src/less/website_sale.less | 26 +++++++ addons/website_sale/views/templates.xml | 70 +++++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 9d8c828f..dde4b9a2 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -316,7 +316,7 @@ class WebsiteSale(http.Controller): } if category: values['main_object'] = category - return request.render("website_sale.products", values) + return request.render("website_sale.main_shop_page", values) @http.route(['/shop/product/'], type='http', auth="public", website=True) def product(self, product, category='', search='', **kwargs): diff --git a/addons/website_sale/static/src/less/website_sale.less b/addons/website_sale/static/src/less/website_sale.less index 92e9966c..b006c7aa 100644 --- a/addons/website_sale/static/src/less/website_sale.less +++ b/addons/website_sale/static/src/less/website_sale.less @@ -45,3 +45,29 @@ color: #666666 !important; } /* share Option end */ + +/* Categorized Shop Page START */ +.main-categ{ + display: block; + background: #e7e7e7; + padding: 5px; + margin-bottom: 5px; + font-weight: bold; + font-size: 16px; + color: @brand-primary; + &:hover { + text-decoration: none; + } +} +.child-categ { + padding: 7px 15px; + a { + text-decoration: underline; + color: #444; + + &:hover { + color: @brand-primary; + } + } +} +/* Categorized Shop Page END */ diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index e7f947eb..06dc5dde 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -184,6 +184,11 @@ + + + + + + + + + + + + + + +