From 048789595c747455f58a978016e8ba733f206f4c Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Wed, 11 Mar 2026 22:36:44 +0530 Subject: [PATCH] Add contact form submission handling and introduce `theme_clicks2cart` module with enhanced shop page and product item layouts. --- .../__pycache__/main.cpython-310.pyc | Bin 3995 -> 2758 bytes .../controllers/main.py | 64 +-- addons/theme_clicks2cart/__init__.py | 2 +- addons/theme_clicks2cart/__manifest__.py | 4 +- .../__pycache__/__init__.cpython-310.pyc | Bin 140 -> 176 bytes .../theme_clicks2cart/controllers/__init__.py | 1 + .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 181 bytes .../__pycache__/main.cpython-310.pyc | Bin 0 -> 807 bytes addons/theme_clicks2cart/controllers/main.py | 15 + .../theme_clicks2cart/data/website_data.xml | 16 +- .../static/src/scss/shop.scss | 428 ++++++++++++++++++ .../static/src/scss/theme.scss | 50 ++ addons/theme_clicks2cart/views/pages.xml | 72 ++- addons/theme_clicks2cart/views/shop_page.xml | 129 ++++++ 14 files changed, 744 insertions(+), 37 deletions(-) create mode 100644 addons/theme_clicks2cart/controllers/__init__.py create mode 100644 addons/theme_clicks2cart/controllers/__pycache__/__init__.cpython-310.pyc create mode 100644 addons/theme_clicks2cart/controllers/__pycache__/main.cpython-310.pyc create mode 100644 addons/theme_clicks2cart/controllers/main.py create mode 100644 addons/theme_clicks2cart/static/src/scss/shop.scss create mode 100644 addons/theme_clicks2cart/views/shop_page.xml diff --git a/addons/dine360_theme_chennora/controllers/__pycache__/main.cpython-310.pyc b/addons/dine360_theme_chennora/controllers/__pycache__/main.cpython-310.pyc index fa686d8dee3bb29fb971cd3054fdf4a0f4dd6578..2419e1cbcf7b15071c052dc5b455107beeb60b31 100644 GIT binary patch delta 60 zcmbO&e@v7&pO=@50SJ;~H)g(`$ScdJH&I)cErm6hL6dD`0S_0mpC;R6Yku9yx%^68 NY(RxP3_OftOaQM!3-SN} delta 1266 zcmZ8hOK;Oa5Z+zeYsYblD9{$fqaX^HQp!U@2(?hPNC=R603<{th=SKOj-0rxT_hq` zsZ_2#RF$~EAvq#W{0R>Hg#8Eo32=d#b)RfBpJ($Gm^HRsS;MYwv6iz)>2)X;pAMhj^tmuZrOvTIGhg$c<$AI-1ZbCy9AJv78Ud)>9Yap8-hi2Kv!8#`X=UAu$T@QM79?H z3lpI-a+>Ae48@y49)Ae`P;>T0cYJHj8SUY6W4RfH$}LscnfaE)*z!2S z7=Yqg*p$ILc^V8z`V20dMYw@*aStXyQx)wgiL-nb%na`}!ZLHAREc@6HQOuV?9231Z0 zY$GFls;ne#$GKv$=(6*(+qyrv)b;oKD8jrMCyk`}FO=Ao+T$pF+Sl^>N?nn2&MlPgb#0elsTHGQxi#9Wj0paMgp2T3kTZ2l*jE**+CiGcS^q9#&bxz zoun}pd0*SjUXqll$p<(=m;dKvRo|v85I%AJo-QzxI`kqNG4RXj7-ef5=1h7V#H0*< z&hPH2`9qv7DOrL cAEJ65{BE_~DLT3J*}dc;@jc?vVK#F2AA`Ctga7~l diff --git a/addons/dine360_theme_chennora/controllers/main.py b/addons/dine360_theme_chennora/controllers/main.py index 2867f94..b517802 100644 --- a/addons/dine360_theme_chennora/controllers/main.py +++ b/addons/dine360_theme_chennora/controllers/main.py @@ -57,36 +57,36 @@ class ContactController(http.Controller): return request.render('dine360_theme_chennora.contact_thank_you') -class BlogController(http.Controller): - @http.route(['/blog'], type='http', auth='public', website=True) - def blog_list(self, **post): - blog_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True)]) - return request.render('dine360_theme_chennora.blog_page', { - 'blog_posts': blog_posts, - }) - - @http.route(['/blog/'], type='http', auth='public', website=True) - def blog_detail(self, slug, **post): - blog_post = request.env['chennora.blog.post'].sudo().search([('slug', '=', slug), ('active', '=', True)], limit=1) - if not blog_post: - return request.not_found() - - recent_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True), ('id', '!=', blog_post.id)], limit=3) - - # Get dynamic categories and counts - all_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True)]) - categories = {} - for p in all_posts: - if p.category: - categories[p.category] = categories.get(p.category, 0) + 1 - - return request.render('dine360_theme_chennora.blog_detail_layout', { - 'blog_title': blog_post.title, - 'blog_img': blog_post.image, - 'blog_date': blog_post.date.strftime('%B %d, %Y') if blog_post.date else '', - 'blog_category': blog_post.category, - 'blog_content': blog_post.content, - 'recent_posts': recent_posts, - 'categories': categories, - }) +# class BlogController(http.Controller): +# @http.route(['/blog'], type='http', auth='public', website=True) +# def blog_list(self, **post): +# blog_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True)]) +# return request.render('dine360_theme_chennora.blog_page', { +# 'blog_posts': blog_posts, +# }) +# +# @http.route(['/blog/'], type='http', auth='public', website=True) +# def blog_detail(self, slug, **post): +# blog_post = request.env['chennora.blog.post'].sudo().search([('slug', '=', slug), ('active', '=', True)], limit=1) +# if not blog_post: +# return request.not_found() +# +# recent_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True), ('id', '!=', blog_post.id)], limit=3) +# +# # Get dynamic categories and counts +# all_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True)]) +# categories = {} +# for p in all_posts: +# if p.category: +# categories[p.category] = categories.get(p.category, 0) + 1 +# +# return request.render('dine360_theme_chennora.blog_detail_layout', { +# 'blog_title': blog_post.title, +# 'blog_img': blog_post.image, +# 'blog_date': blog_post.date.strftime('%B %d, %Y') if blog_post.date else '', +# 'blog_category': blog_post.category, +# 'blog_content': blog_post.content, +# 'recent_posts': recent_posts, +# 'categories': categories, +# }) diff --git a/addons/theme_clicks2cart/__init__.py b/addons/theme_clicks2cart/__init__.py index 67dee8c..153a9e3 100644 --- a/addons/theme_clicks2cart/__init__.py +++ b/addons/theme_clicks2cart/__init__.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. +from . import controllers diff --git a/addons/theme_clicks2cart/__manifest__.py b/addons/theme_clicks2cart/__manifest__.py index 3e98f58..3c2d2d7 100644 --- a/addons/theme_clicks2cart/__manifest__.py +++ b/addons/theme_clicks2cart/__manifest__.py @@ -5,10 +5,11 @@ 'category': 'Theme/Website', 'version': '1.0', 'author': 'Dine360', - 'depends': ['website', 'website_sale', 'website_crm'], + 'depends': ['website', 'website_sale', 'website_crm', 'website_blog'], 'data': [ 'views/layout.xml', 'views/pages.xml', + 'views/shop_page.xml', 'views/snippets.xml', 'data/website_data.xml', ], @@ -16,6 +17,7 @@ 'web.assets_frontend': [ 'theme_clicks2cart/static/src/scss/primary_variables.scss', 'theme_clicks2cart/static/src/scss/theme.scss', + 'theme_clicks2cart/static/src/scss/shop.scss', 'theme_clicks2cart/static/src/js/quickview.js', ], }, diff --git a/addons/theme_clicks2cart/__pycache__/__init__.cpython-310.pyc b/addons/theme_clicks2cart/__pycache__/__init__.cpython-310.pyc index 4c909eafbd44ab7b91801f7f5f9442ae8f8c4b02..63efeef5974a15ffc9f421b2bf6b6572d54eedd5 100644 GIT binary patch delta 138 zcmeBS+`w3$&&$ij00gh2H)fgu>Bk@rGGGF79Dul307#@Tq%h_%Bk@rGGGL99Dul(1xTbY1T$zd`mJOr0trKjiRtc4 GEDQj>3krJx diff --git a/addons/theme_clicks2cart/controllers/__init__.py b/addons/theme_clicks2cart/controllers/__init__.py new file mode 100644 index 0000000..12a7e52 --- /dev/null +++ b/addons/theme_clicks2cart/controllers/__init__.py @@ -0,0 +1 @@ +from . import main diff --git a/addons/theme_clicks2cart/controllers/__pycache__/__init__.cpython-310.pyc b/addons/theme_clicks2cart/controllers/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..26749933ad9dec02bf01c56c9e755c5036309fa9 GIT binary patch literal 181 zcmd1j<>g`kf=kgGGev;(V-N=!FabFZKwK;UBvKes7;_kM8KW2(8B&;n88n$+G6ID) z8E>)VCT8aOX)@hnC<5tN$xy@sq`<^4YyI5368+SQlA=W2#FUi$ykh;5jMUuJ_~e|- zaoYbOX{rLFIyv&mLc)fzkTO2mI`6;D2sdgZXia}-zFaQ8) C2P)J6 literal 0 HcmV?d00001 diff --git a/addons/theme_clicks2cart/controllers/__pycache__/main.cpython-310.pyc b/addons/theme_clicks2cart/controllers/__pycache__/main.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f61e99563458efb8e9551ef69521c7bf394a8420 GIT binary patch literal 807 zcmZWn&5qMB5cW7u`lA*E(k@zf0eYa3xF8`wD|+C7v={bN4pADLHYJI(wgYShr`_wm zLwn@N>-dDkX5MKBL#_=ZiQYkb2d;Kjt0rPP&;|H~a`x^hMrg)%lS)4ZD2=e`w{6uEU& zDLX~NvUO1P&`VKvnDONlkVF>qZ_Bp zJ%n!w@3}+TqmCrA)HHo|7j8kjM@fX1T6Zu53a8X~UBQO4zmnSPd$3d%L)gCmtYh|q NdZSG+Vk0=@zW`sR&ZPhV literal 0 HcmV?d00001 diff --git a/addons/theme_clicks2cart/controllers/main.py b/addons/theme_clicks2cart/controllers/main.py new file mode 100644 index 0000000..1dffc37 --- /dev/null +++ b/addons/theme_clicks2cart/controllers/main.py @@ -0,0 +1,15 @@ +from odoo import http +from odoo.http import request + +class Clicks2CartBlog(http.Controller): + @http.route(['/blog'], type='http', auth='public', website=True) + def blog_list(self, **post): + # Fetch actual blog posts if website_blog is installed + # Otherwise, just show the template + blog_posts = [] + if request.env.get('blog.post'): + blog_posts = request.env['blog.post'].sudo().search([('website_published', '=', True)], limit=10) + + return request.render('theme_clicks2cart.blog_page', { + 'blog_posts': blog_posts, + }) diff --git a/addons/theme_clicks2cart/data/website_data.xml b/addons/theme_clicks2cart/data/website_data.xml index c2a44c5..284a432 100644 --- a/addons/theme_clicks2cart/data/website_data.xml +++ b/addons/theme_clicks2cart/data/website_data.xml @@ -1,7 +1,19 @@ - + + + + + + + + + /blog + True + + Blog + + diff --git a/addons/theme_clicks2cart/static/src/scss/shop.scss b/addons/theme_clicks2cart/static/src/scss/shop.scss new file mode 100644 index 0000000..ae83412 --- /dev/null +++ b/addons/theme_clicks2cart/static/src/scss/shop.scss @@ -0,0 +1,428 @@ +/* Shop Page Decorative Backgrounds */ +#wrap.oe_structure:has(.oe_website_sale) { + background-image: + url('https://landing.engotheme.com/html/jenstore/demo/img/who.png'), + url('https://landing.engotheme.com/html/jenstore/demo/img/who.png'); + background-repeat: no-repeat, no-repeat; + background-position: left center, right bottom; + background-size: 40% auto, 30% auto; + background-attachment: fixed, absolute; + background-color: #fff; + padding-top: 50px; +} + +/* Hide Odoo Default Controls & Redundant Bars */ +.o_wsale_products_searchbar_formres, +.o_wsale_products_searchbar_form, +.o_wsale_products_searchbar, +.o_wsale_apply_layout, +.products_pager, +.o_website_sale_search, +#o_wsale_offcanvas_content { + display: none !important; +} + +/* Sidebar Styles */ +#products_grid_before { + display: block !important; + visibility: visible !important; + opacity: 1 !important; + width: 25% !important; + padding-right: 40px; + flex: 0 0 25% !important; + max-width: 25% !important; + + .sidebar_title { + font-family: 'Outfit', sans-serif !important; + text-transform: uppercase !important; + letter-spacing: 2px !important; + font-weight: 800 !important; + font-size: 1.1rem !important; + color: #000 !important; + margin-bottom: 25px !important; + display: block; + border-bottom: 3px solid #000; + padding-bottom: 12px; + width: 100%; + } + + .s_sidebar_card { + border: none !important; + background: transparent !important; + margin-bottom: 45px; + padding: 0; + + /* Category specific tweaks */ + #wsale_products_categories_collapse { + margin-top: -10px; + } + + .nav-pills { + .nav-item { + border-bottom: 1px solid #f2f2f2; + &:last-child { border-bottom: none; } + } + + .nav-link { + padding: 12px 0; + color: #333; + font-size: 0.95rem; + font-family: 'Outfit', sans-serif; + transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); + text-transform: capitalize; + letter-spacing: 0.5px; + font-weight: 600; + background: transparent !important; + display: flex; + justify-content: space-between; + align-items: center; + + &:hover, &.active { + color: #e6b3a3 !important; + padding-left: 10px; + } + + span.badge { + font-weight: 400; + color: #999; + font-size: 0.8rem; + background: none; + padding: 0; + } + + /* Plus/Minus Icons */ + &[data-bs-toggle="collapse"]:after { + font-family: 'FontAwesome'; + content: '\f067'; + font-size: 0.75rem; + color: #bbb; + transition: all 0.3s; + } + + &[aria-expanded="true"]:after { + content: '\f068'; + color: #000; + } + } + } + } + + /* Attributes Styling (Color circles, Sizes) */ + .js_attributes { + .nav-item { + border: none; + margin-bottom: 35px; + + /* Attribute headers */ + h6, strong { + @extend .sidebar_title; + font-size: 0.95rem !important; + margin-top: 20px; + } + + /* Color circles */ + ul.nav-pills { + display: flex; + flex-wrap: wrap; + gap: 15px; + margin-top: 15px; + border: none !important; + + li.nav-item { + margin: 0; + border: none !important; + + label.nav-link { + border: 1px solid #eee; + border-radius: 50% !important; + width: 32px; + height: 32px; + padding: 0; + transition: all 0.3s; + position: relative; + + &.active { + box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000; + } + + input { display: none; } + &:after { content: none !important; } + } + } + } + } + } + + /* Price Filter Styling */ + .o_wsale_price_range_selector { + padding: 0 10px; + margin-top: 15px; + + .ui_slider_handle { + background: #000 !important; + border: none !important; + width: 16px !important; + height: 16px !important; + top: -6px !important; + border-radius: 50% !important; + cursor: pointer; + } + .ui_slider_range { + background: #000 !important; + } + } +} + +/* Redirection adjustments for main grid */ +#products_grid { + flex: 0 0 75% !important; + max-width: 75% !important; + width: 75% !important; + padding-left: 20px; +} + +/* Product Grid Top Bar */ +.products_header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 12px 25px; + background: #f4f4f4; + margin-bottom: 50px; + font-family: 'Outfit', sans-serif; + border-radius: 2px; + + .products_header_left { + display: flex; + align-items: center; + gap: 25px; + + .btn_sidebar_toggle { + background: #fff; + border: 1px solid #ddd; + color: #000; + padding: 7px 18px; + font-size: 0.75rem; + text-transform: uppercase; + font-weight: 800; + letter-spacing: 1.5px; + } + + .view_mode_icons { + display: flex; + gap: 15px; + color: #bbb; + font-size: 1.1rem; + + i { + cursor: pointer; + transition: color 0.3s; + &.active { color: #000; } + &:hover { color: #000; } + } + } + + .results_count { + color: #666; + font-size: 0.9rem; + font-weight: 500; + } + } + + .products_header_right { + display: flex; + align-items: center; + gap: 20px; + + .show_filter, .sort_filter { + display: flex; + align-items: center; + gap: 10px; + span { font-size: 0.85rem; color: #888; font-weight: 500; } + } + + .form-select, .btn-sm { + font-size: 0.85rem; + font-weight: 700; + color: #333; + background: transparent; + border: 1px solid #eee; + padding: 5px 15px; + } + } +} + +/* Product Cards */ +.oe_product { + margin-bottom: 60px; + + .oe_product_cart { + border: none !important; + background: transparent !important; + + .oe_product_image { + position: relative; + overflow: hidden; + background: #f7f7f7; + aspect-ratio: 1/1.2; + display: flex; + align-items: center; + justify-content: center; + + img { + width: 100%; + height: 100%; + object-fit: cover; + transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1); + } + + .s_product_label { + position: absolute; + top: 0; + right: 0; + padding: 6px 15px; + font-size: 0.65rem; + font-weight: 900; + letter-spacing: 2.5px; + color: #fff; + z-index: 10; + font-family: 'Outfit', sans-serif; + + &.label-sale { background: #e6b3a3; } + &.label-hot { background: #fd8b6b; } + } + + .s_product_actions { + position: absolute; + bottom: -70px; + left: 0; + right: 0; + display: flex; + justify-content: center; + gap: 15px; + padding: 20px; + background: rgba(255, 255, 255, 0.98); + transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); + z-index: 5; + + .action-btn { + width: 45px; + height: 45px; + background: #fff; + border: 1px solid #efefef; + display: flex; + align-items: center; + justify-content: center; + color: #111; + border-radius: 50%; + transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); + text-decoration: none; + font-size: 1rem; + + &:hover { + background: #000; + color: #fff; + border-color: #000; + transform: translateY(-8px); + box-shadow: 0 5px 15px rgba(0,0,0,0.1); + } + } + } + } + + &:hover { + .oe_product_image { + img { + transform: scale(1.15); + } + .s_product_actions { + bottom: 0; + } + } + } + + section { + padding: 25px 0 10px; + text-align: center; + + h6 { + font-family: 'Outfit', sans-serif; + font-weight: 700; + font-size: 1.15rem; + margin-bottom: 10px; + letter-spacing: 0.5px; + + a { + color: #000; + text-decoration: none; + transition: color 0.3s; + &:hover { color: #e6b3a3; } + } + } + + .o_rating_star_card { + color: #ffc107; + font-size: 0.85rem; + margin-bottom: 12px; + display: flex; + justify-content: center; + gap: 3px; + } + + .product_price { + font-family: 'Outfit', sans-serif; + font-weight: 900; + font-size: 1.25rem; + color: #000; + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + + del { + font-size: 0.95rem; + color: #ccc; + font-weight: 500; + text-decoration: line-through; + } + } + } + } +} + +/* Pagination */ +.o_wsale_products_grid_table_wrapper { + .pagination { + margin-top: 70px; + justify-content: flex-end; + gap: 12px; + + .page-item { + .page-link { + border: 1px solid #eee; + background: #fcfcfc; + color: #000; + width: 48px; + height: 48px; + display: flex; + align-items: center; + justify-content: center; + font-weight: 800; + font-size: 0.95rem; + border-radius: 4px !important; + transition: all 0.3s; + + &:hover { + background: #eee; + color: #000; + } + } + + &.active .page-link { + background: #000 !important; + color: #fff !important; + border-color: #000 !important; + } + } + } +} diff --git a/addons/theme_clicks2cart/static/src/scss/theme.scss b/addons/theme_clicks2cart/static/src/scss/theme.scss index 4b41f5f..53a9e81 100644 --- a/addons/theme_clicks2cart/static/src/scss/theme.scss +++ b/addons/theme_clicks2cart/static/src/scss/theme.scss @@ -1254,6 +1254,56 @@ footer#bottom.o_footer { } } +.s_holiday_section { + position: relative; + // padding: 120px 0; + overflow: hidden; + + .s_holiday_bg_accent { + position: absolute; + top: -150px; + left: -100px; + width: 450px; + height: 450px; + background-image: url('https://landing.engotheme.com/html/jenstore/demo/img/floral_accent_tl.png'); + background-size: contain; + background-repeat: no-repeat; + opacity: 0.1; + z-index: 1; + pointer-events: none; + transform: rotate(-15deg); + } + + .s_holiday_bg_accent_br { + position: absolute; + bottom: -100px; + right: -80px; + width: 400px; + height: 400px; + background-image: url('https://landing.engotheme.com/html/jenstore/demo/img/decor-flower.png'); + background-size: contain; + background-repeat: no-repeat; + opacity: 0.12; + z-index: 1; + pointer-events: none; + transform: scaleX(-1) rotate(30deg); + } + + .s_holiday_splash { + position: absolute; + top: 10%; + left: -5%; + width: 40vw; + height: 60vh; + background-image: url('https://landing.engotheme.com/html/jenstore/demo/img/wedding_brush_splash.png'); + background-size: contain; + background-repeat: no-repeat; + opacity: 0.04; + z-index: 0; + pointer-events: none; + } +} + // ========================================= // Product Action Hover Icons (Global) // ========================================= diff --git a/addons/theme_clicks2cart/views/pages.xml b/addons/theme_clicks2cart/views/pages.xml index 9ce4021..014548c 100644 --- a/addons/theme_clicks2cart/views/pages.xml +++ b/addons/theme_clicks2cart/views/pages.xml @@ -405,8 +405,10 @@
- + + +
@@ -839,4 +841,72 @@ + + + diff --git a/addons/theme_clicks2cart/views/shop_page.xml b/addons/theme_clicks2cart/views/shop_page.xml new file mode 100644 index 0000000..fdd9c0e --- /dev/null +++ b/addons/theme_clicks2cart/views/shop_page.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + +