feat: add new theme assets, snippets, and styling components for Theme Alan
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Header options -->
|
||||
<template id="as_header_switches" inherit_id="website.snippet_options">
|
||||
<xpath expr="//div/we-select[@data-variable='header-template']" position="inside">
|
||||
<we-button title="Alan: Header 1"
|
||||
data-name="as_header_opt1"
|
||||
data-customize-website-views="theme_alan.as_header_1"
|
||||
data-customize-website-variable="'as_header1'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_1.svg"/>
|
||||
|
||||
<we-button title="Alan: Header 2"
|
||||
data-name="as_header_opt2"
|
||||
data-customize-website-views="theme_alan.as_header_2"
|
||||
data-customize-website-variable="'as_header2'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_2.svg"/>
|
||||
<we-button title="Alan: Header 3"
|
||||
data-name="as_header_opt3"
|
||||
data-customize-website-views="theme_alan.as_header_3"
|
||||
data-customize-website-variable="'as_header3'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_3.svg"/>
|
||||
<we-button title="Alan: Header 4"
|
||||
data-name="as_header_opt4"
|
||||
data-customize-website-views="theme_alan.as_header_4"
|
||||
data-customize-website-variable="'as_header4'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_4.svg"/>
|
||||
<we-button title="Alan: Header 5"
|
||||
data-name="as_header_opt5"
|
||||
data-customize-website-views="theme_alan.as_header_5"
|
||||
data-customize-website-variable="'as_header5'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_5.svg"/>
|
||||
<we-button title="Alan: Header 6"
|
||||
data-name="as_header_opt6"
|
||||
data-customize-website-views="theme_alan.as_header_6"
|
||||
data-customize-website-variable="'as_header6'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_6.svg"/>
|
||||
<we-button title="Alan: Header 7"
|
||||
data-name="as_header_opt7"
|
||||
data-customize-website-views="theme_alan.as_header_7"
|
||||
data-customize-website-variable="'as_header7'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_7.svg"/>
|
||||
<we-button title="Alan: Header 8"
|
||||
data-name="as_header_opt8"
|
||||
data-customize-website-views="theme_alan.as_header_8"
|
||||
data-customize-website-variable="'as_header8'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_8.svg"/>
|
||||
<we-button title="Alan: Header 9"
|
||||
data-name="as_header_opt9"
|
||||
data-customize-website-views="theme_alan.as_header_9"
|
||||
data-customize-website-variable="'as_header9'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_9.svg"/>
|
||||
|
||||
<we-button title="Alan: Header 10"
|
||||
data-name="as_header_opt10"
|
||||
data-customize-website-views="theme_alan.as_header_10"
|
||||
data-customize-website-variable="'as_header10'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_10.svg"/>
|
||||
<we-button title="Alan: Header 11"
|
||||
data-name="as_header_opt11"
|
||||
data-customize-website-views="theme_alan.as_header_11"
|
||||
data-customize-website-variable="'as_header11'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_headers_11.svg"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//we-colorpicker[@data-color='header-sales_four']" position="after">
|
||||
<we-colorpicker data-dependencies="as_header_opt1, as_header_opt2"
|
||||
data-customize-website-color="" data-color="header-alan_topbar"
|
||||
data-customize-website-layer2-color="" data-layer-color="header-alan_topbar-custom" data-layer-gradient="menu-secondary-gradient"
|
||||
data-no-bundle-reload="true"
|
||||
data-null-value="'NULL'"
|
||||
data-with-combinations="customizeWebsiteColor"
|
||||
data-with-gradients="true"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Footer Options -->
|
||||
<template id="alan_footer_switches" inherit_id="website.snippet_options">
|
||||
<xpath expr="//div/we-select[@data-variable='footer-template']" position="inside">
|
||||
<we-button title="Alan: Footer 1"
|
||||
data-customize-website-views="theme_alan.alan_footer_1"
|
||||
data-customize-website-variable="'alan_footer1'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_1.svg"/>
|
||||
<we-button title="Alan: Footer 2"
|
||||
data-customize-website-views="theme_alan.alan_footer_2"
|
||||
data-customize-website-variable="'alan_footer2'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_2.svg"/>
|
||||
<we-button title="Alan: Footer 3"
|
||||
data-customize-website-views="theme_alan.alan_footer_3"
|
||||
data-customize-website-variable="'alan_footer3'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_3.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 4"
|
||||
data-customize-website-views="theme_alan.alan_footer_4"
|
||||
data-customize-website-variable="'alan_footer4'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_4.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 5"
|
||||
data-customize-website-views="theme_alan.alan_footer_5"
|
||||
data-customize-website-variable="'alan_footer5'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_5.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 6"
|
||||
data-customize-website-views="theme_alan.alan_footer_6"
|
||||
data-customize-website-variable="'alan_footer6'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_6.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 7"
|
||||
data-customize-website-views="theme_alan.alan_footer_7"
|
||||
data-customize-website-variable="'alan_footer7'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_7.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 8"
|
||||
data-customize-website-views="theme_alan.alan_footer_8"
|
||||
data-customize-website-variable="'alan_footer8'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_8.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 9"
|
||||
data-customize-website-views="theme_alan.alan_footer_9"
|
||||
data-customize-website-variable="'alan_footer9'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_9.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 10"
|
||||
data-customize-website-views="theme_alan.alan_footer_10"
|
||||
data-customize-website-variable="'alan_footer10'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_10.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 11"
|
||||
data-customize-website-views="theme_alan.alan_footer_11"
|
||||
data-customize-website-variable="'alan_footer11'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_11.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 12"
|
||||
data-customize-website-views="theme_alan.alan_footer_12"
|
||||
data-customize-website-variable="'alan_footer12'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_12.svg"/>
|
||||
|
||||
<we-button title="Alan: Footer 13"
|
||||
data-customize-website-views="theme_alan.alan_footer_13"
|
||||
data-customize-website-variable="'alan_footer13'"
|
||||
data-img="/theme_alan/static/src/img/icons/as_footers_13.svg"/>
|
||||
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,619 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="s_default_frame" name="User Default Frames">
|
||||
<div class="container">
|
||||
<div class="row g-3">
|
||||
<t t-foreach="frame_ids" t-as="frame">
|
||||
<div class="col-lg-6 d-flex flex-row as-frame-temp">
|
||||
<div class="as-edit-history-card">
|
||||
<div class="as-edit-history-card-body as_frame" t-att-data-frame_id="frame.id">
|
||||
<div class="container">
|
||||
<t t-out="frame.snippet_frame_html"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="as-edit-history-card-footer">
|
||||
<h6>
|
||||
<t t-esc="frame.name"/>
|
||||
</h6>
|
||||
<button class="btn as-e-btn-danger as_delete_frame" t-att-data-frame_id="frame.id"> <i class="fa fa-trash-o"></i> Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Menu Tags: START -->
|
||||
<template id="as_menu_tags" name="Menu Tags">
|
||||
<span t-if="submenu.sudo().is_tag_active" class="as-menu-tags" t-esc="submenu.sudo().tag_text"
|
||||
t-attf-style="background-color:#{submenu.sudo().tag_bg_color};color:#{submenu.sudo().tag_text_color}"/>
|
||||
</template>
|
||||
<!-- Menu Tags: END -->
|
||||
|
||||
<!-- Menu highlight: START -->
|
||||
<template id="as_website_menu" name="Website Menu Tags" inherit_id="website.submenu">
|
||||
<xpath expr="//li" position="replace">
|
||||
<li t-if="submenu.is_visible and not (submenu.child_id or submenu.is_mega_menu)" t-attf-class="#{item_class or ''}" role="presentation">
|
||||
<a t-att-href="submenu._clean_url()"
|
||||
t-attf-style="background-color:{{submenu.hlt_menu_bg_color if submenu.hlt_menu else '' }};color:{{submenu.hlt_menu_ft_col if submenu.hlt_menu else ''}} !important"
|
||||
t-attf-class="#{link_class or ''} #{submenu._is_active() and 'active'} as-menus"
|
||||
role="menuitem"
|
||||
t-ignore="true"
|
||||
t-att-target="'_blank' if submenu.new_window else None">
|
||||
<t t-call="theme_alan.as_menu_tags"/>
|
||||
<span t-if="submenu.hlt_menu" t-attf-class="fa {{submenu.hlt_menu_icon}}"/>
|
||||
<span t-field="submenu.name"/>
|
||||
</a>
|
||||
</li>
|
||||
</xpath>
|
||||
<xpath expr="//li[@t-elif='show_dropdown']" position="replace">
|
||||
<li t-elif="show_dropdown" t-attf-class="#{item_class or ''} dropdown #{submenu.is_mega_menu and 'position-static'}">
|
||||
<a t-attf-class="#{link_class or ''} dropdown-toggle #{submenu.is_mega_menu and 'o_mega_menu_toggle'} #{submenu._is_active() and 'active'} #{dropdown_toggler_classes} as-menus"
|
||||
data-bs-toggle="dropdown" href="#"
|
||||
t-attf-style="background-color:{{submenu.hlt_menu_bg_color if submenu.hlt_menu else '' }};color:{{submenu.hlt_menu_ft_col if submenu.hlt_menu else ''}} !important"
|
||||
t-att-data-bs-display="'static' if submenu.is_mega_menu else None">
|
||||
<t t-call="theme_alan.as_menu_tags"/>
|
||||
<span t-if="submenu.hlt_menu" t-attf-class="fa {{submenu.hlt_menu_icon}}"/>
|
||||
<span t-field="submenu.name"/>
|
||||
</a>
|
||||
<t t-if="submenu.active_mega_tabs">
|
||||
<!-- Here is tabs is come -->
|
||||
<div t-if="submenu.is_mega_menu"
|
||||
t-attf-class="dropdown-menu as-mega-tab-menu o_mega_menu #{submenu.mega_menu_classes}"
|
||||
data-name="Mega Menu">
|
||||
<div class="as-mm-tabs-container container">
|
||||
<div class="as-mm-tabs-levels">
|
||||
<t t-set="first_count" t-value="0"/>
|
||||
<t t-foreach="submenu.megamenu_tabs" t-as="mega_tab">
|
||||
|
||||
<!-- Loop -->
|
||||
<div t-attf-class="as-mm-tabs-level-1 #{'active' if not first_count else ''}">
|
||||
<t t-set="first_count" t-value="1"/>
|
||||
|
||||
<!-- Title Wrap -->
|
||||
<div class="s-mm-tabs-level-title">
|
||||
<a t-att-href="mega_tab.redirect">
|
||||
<span class="mm-t-icon"> <image t-att-src="request.website.image_url(mega_tab, 'icon')"/></span>
|
||||
<span class="mm-t-title" t-esc="mega_tab.name"/>
|
||||
</a>
|
||||
<span class="as-mob-tab-menu">
|
||||
<span />
|
||||
</span>
|
||||
</div>
|
||||
<!-- End Title Wrap -->
|
||||
<!-- Content Wrap -->
|
||||
<div class="as-mm-tabs-level-2">
|
||||
<div class="as-mm-tabs-level-2-in">
|
||||
<!-- Content -->
|
||||
<span class="mm-t-title" t-field="mega_tab.description"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Content Wrap -->
|
||||
</div>
|
||||
<!-- Loop -->
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Here is tabs is come -->
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div t-if="submenu.is_mega_menu"
|
||||
t-attf-class="dropdown-menu o_mega_menu #{submenu.mega_menu_classes}"
|
||||
data-name="Mega Menu"
|
||||
t-field="submenu.mega_menu_content"/>
|
||||
<ul t-else="" t-attf-class="dropdown-menu #{dropdown_menu_classes}" role="menu">
|
||||
<t t-foreach="submenu.child_id" t-as="submenu">
|
||||
<t t-call="website.submenu">
|
||||
<t t-set="item_class" t-value="None"/>
|
||||
<t t-set="link_class" t-valuef="dropdown-item"/>
|
||||
</t>
|
||||
</t>
|
||||
</ul>
|
||||
</t>
|
||||
</li>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Menu highlight: END -->
|
||||
|
||||
<!-- Scroll Bar: START -->
|
||||
<template id="as_frontend_layout" name="Scroll Top on Pages" inherit_id="web.frontend_layout">
|
||||
<xpath expr="//div[@id='wrapwrap']" position="inside">
|
||||
<div t-if="website.active_scroll_top" class="as_scroll_to_top btn btn-primary mb-1"> <i class="fa fa-chevron-up"/></div>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Scroll Bar: END -->
|
||||
|
||||
<!-- Product Label: START -->
|
||||
<template id="product_label" name="Product Label Option">
|
||||
<t t-set="labels" t-value="product.sudo().pro_label_line_ids.filtered(lambda l: l.website_id.id == website.id)"/>
|
||||
<t t-if="labels" t-call="theme_alan.label_layout_option"/>
|
||||
</template>
|
||||
<!-- Product Label: END -->
|
||||
|
||||
<!-- Label Layouts TemplateL START -->
|
||||
<template id="label_layout_option" name="Product Label Options Layout">
|
||||
<div class="as-ribbon-wrpa">
|
||||
<div t-attf-class="ribbon-style-#{(labels.label.label_option).replace('option_', '')}" t-att-id="labels.label.label_option">
|
||||
<span t-attf-style="background-color:#{labels.label.label_color} ; color:#{labels.label.label_text_color}"><i t-if="labels.label.label_option == 'option_5'" class="fa fa-tag"/> <t t-esc="labels.label.name" /></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Label Layouts TemplateL END -->
|
||||
|
||||
<!-- Login Popus: START -->
|
||||
<template id="as_sign_in_popup" name="Login Popup" inherit_id="portal.user_sign_in">
|
||||
<xpath expr="." position="replace">
|
||||
<li t-nocache="Profile session and user group can change unrelated to parent caches."
|
||||
t-nocache-_item_class="_item_class"
|
||||
t-nocache-_link_class="_link_class"
|
||||
groups="base.group_public" t-attf-class="#{_item_class} o_no_autohide_item">
|
||||
<a t-attf-href="/web/login" t-attf-class="#{_link_class} #{'as_login_popup' if website.active_login_popup else ''}">Sign in<span t-if="request.session.profile_session" class="text-danger fa fa-circle"/></a>
|
||||
</li>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Login Popus: END -->
|
||||
|
||||
<!-- Login Details: START -->
|
||||
<template id="as_shop_login" name="Alan Login">
|
||||
<div class="container">
|
||||
<button class="btn-close as_close">
|
||||
<span></span>
|
||||
</button>
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="as-login" data-bs-toggle="tab" data-bs-target="#as-login-tab" type="button" role="tab" aria-controls="Login" aria-selected="true">Login</button>
|
||||
</li>
|
||||
<li t-if="signup_enabled" class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="as-signup" data-bs-toggle="tab" data-bs-target="#as-signup-tab" type="button" role="tab" aria-controls="Signup" aria-selected="false">SignUp</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="as-login-logo text-center">
|
||||
<img t-attf-src="{{website_logo}}" />
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="as-login-tab" role="tabpanel" aria-labelledby="as-login">
|
||||
<form class="oe_login_form" role="form" t-attf-action="/web/login" method="post" onsubmit="this.action = '/web/login' + location.hash">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<div class="form-group field-login">
|
||||
<label for="login">Email</label>
|
||||
<input type="text" placeholder="Email" name="login" t-att-value="login" id="login" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" />
|
||||
</div>
|
||||
<div class="form-group field-password">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" placeholder="Password" name="password" id="password" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" autocomplete="current-password" t-att-autofocus="'autofocus' if login else None" maxlength="4096"/>
|
||||
</div>
|
||||
<p class="alert alert-danger" id="errormsg" role="alert" style="display:none"></p>
|
||||
<div t-attf-class="clearfix oe_login_buttons text-center mb-1 {{'pt-2' if form_small else 'pt-3'}}">
|
||||
<button type="submit" class="btn btn-primary btn-block loginbtn as-btn">Log in</button>
|
||||
<div class="justify-content-center mt-2 d-flex small">
|
||||
<a t-if="reset_password_enabled" href="/web/reset_password" style="cursor:pointer"><span>Reset Password</span></a>
|
||||
</div>
|
||||
<div class="o_login_auth">
|
||||
<t t-if="len(providers) > 0" t-call="auth_oauth.providers"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div t-if="signup_enabled" class="tab-pane fade" id="as-signup-tab" role="tabpanel" aria-labelledby="as-signup">
|
||||
<form class="oe_signup_form" role="form" method="post" t-if="not message">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<t t-set="only_passwords" t-value="bool(token and not invalid_token)"/>
|
||||
<div class="form-group field-login">
|
||||
<label for="login">Your Email</label>
|
||||
<input type="text" name="login" t-att-value="login" id="logins" class="form-control form-control-sm" autofocus="autofocus"
|
||||
autocapitalize="off" required="required" t-att-readonly="'readonly' if only_passwords else None"/>
|
||||
</div>
|
||||
<div class="form-group field-name">
|
||||
<label for="name">Your Name</label>
|
||||
<input type="text" name="name" t-att-value="name" id="names" class="form-control form-control-sm" placeholder="e.g. John Doe"
|
||||
required="required" t-att-readonly="'readonly' if only_passwords else None"
|
||||
t-att-autofocus="'autofocus' if login and not only_passwords else None" />
|
||||
</div>
|
||||
<div class="form-group field-password pt-2">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="passwords" class="form-control form-control-sm"
|
||||
required="required" t-att-autofocus="'autofocus' if only_passwords else None"/>
|
||||
</div>
|
||||
<div class="form-group field-confirm_password">
|
||||
<label for="confirm_password">Confirm Password</label>
|
||||
<input type="password" name="confirm_password" id="confirm_passwords" class="form-control form-control-sm" required="required"/>
|
||||
</div>
|
||||
<p class="alert alert-danger" id="errors" style="display:none;" ></p>
|
||||
<div class="text-center oe_login_buttons pt-3">
|
||||
<button type="submit" class="btn btn-primary btn-block signupbtn as-btn"> Sign up</button>
|
||||
<span class="btn btn-link btn-sm haveAccount">Already have an account?</span>
|
||||
<div class="o_login_auth">
|
||||
<t t-if="len(providers) > 0" t-call="auth_oauth.providers"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Login Details: END -->
|
||||
|
||||
|
||||
<!-- B2B Mode -->
|
||||
<template id="as_product_compare" inherit_id="website_sale_comparison.product_compare" name="Theme Alan Comparator Page">
|
||||
<xpath expr="//div[hasclass('product_summary')]/span[hasclass('o_comparison_price')][1]" position="attributes">
|
||||
<attribute name="t-attf-style">{{'display:none !important;' if request.env.user._is_public() and request.website.active_b2b_mode else ''}}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('product_summary')]/span[hasclass('o_comparison_price')][2]" position="attributes">
|
||||
<attribute name="t-attf-style">{{'display:none !important;' if request.env.user._is_public() and request.website.active_b2b_mode else ''}}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//form[@action='/shop/cart/update']" position="attributes">
|
||||
<attribute name="t-attf-style">{{'display:none !important;' if request.env.user._is_public() and request.website.active_b2b_mode else ''}}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="as_product_product" inherit_id="website_sale_comparison.product_product" name="Theme Alan Comparator - Product row in comparator popover">
|
||||
<xpath expr="//h6/div" position="attributes">
|
||||
<attribute name="t-attf-class">{{'d-none' if combination_info['prevent_zero_price_sale'] or (website.env.user._is_public() and website.active_b2b_mode) else ''}}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="as_price_dynamic_filter_template_product_product" inherit_id="website_sale.price_dynamic_filter_template_product_product" name="Theme Alan Dynamic Product Filter Price">
|
||||
<xpath expr="//t[contains(@t-if, 'not website.prevent_zero_price_sale')]" position="attributes">
|
||||
<attribute name="t-if"> (not website.prevent_zero_price_sale or record_price) and not (website.env.user._is_public() and website.active_b2b_mode)</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//span[contains(@t-field, 'website.prevent_zero_price_sale_text')]" position="attributes">
|
||||
<attribute name="t-if"> not (website.env.user._is_public() and website.active_b2b_mode)</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="as_one_hybrid" inherit_id="website.one_hybrid" name="Theme Alan Single any Search Results">
|
||||
<xpath expr="//b[hasclass('text-nowrap')]" position="attributes">
|
||||
<attribute name="t-if">result.get('detail') and not is_b2b_mode</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Brand Page: START -->
|
||||
<template id="brand_list" name="Brand Page">
|
||||
<t t-call="website.layout">
|
||||
<div class="as-brand-breadcrumb">
|
||||
<div class="container">
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-6 text-center text-md-start">
|
||||
<h3 class="as-all-brand-title m-0">Brands</h3>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<ol class="breadcrumb justify-content-center justify-content-md-end m-0 p-0">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/shop">All Products</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<span>Brand</span>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="as-all-brand-page">
|
||||
<div class="container">
|
||||
<div class="oe_structure" id="as_brands_page1" data-editor-message="Drag and drop the snippet"/>
|
||||
<div class="row as-letter-container-box g-3">
|
||||
<t t-foreach="brands" t-as="brand">
|
||||
<div class="col-6 col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="as-lp-brand-box">
|
||||
<span class="brand-img" t-field="brand.logo" t-options="{'widget': 'image', 'class': 'img-rounded'}" />
|
||||
<div class="as-lp-brand-info">
|
||||
<h6>
|
||||
<a t-att-href="'/shop?brand=%s' % brand.id" target="new">
|
||||
<t t-esc="brand.name"/>
|
||||
</a>
|
||||
</h6>
|
||||
<span class="brand-count">
|
||||
<t t-if="len(brand.brand_product_ids) == 1">
|
||||
<t t-esc="len(brand.brand_product_ids)" /> Product
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="len(brand.brand_product_ids)" /> Products
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<t t-call="website.pager"/>
|
||||
|
||||
<div class="oe_structure" id="as_brands_page2" data-editor-message="Drag and drop the snippet"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
<!-- Brand Page: END -->
|
||||
|
||||
<!-- Mini Cart: START -->
|
||||
<!-- Mini Cart Template-->
|
||||
<template id="as_mini_cart" name="Shop Mini Cart">
|
||||
<div class="container">
|
||||
<div class="min-cart-head">
|
||||
<h5><i class="asi asi-shopping-bag"></i> Your Cart</h5>
|
||||
<button class="btn-close as_close">
|
||||
<span />
|
||||
</button>
|
||||
</div>
|
||||
<div class="as-clear-mini-cart"><p>You have <span class="as-sigl-qtys"><span class="as-qty"> <t t-esc="website_sale_order.cart_quantity"/></span> <span class="as-qty-sigl-info"> <t t-if="website_sale_order.cart_quantity > 1">items</t> <t t-else="">item</t> </span></span>
|
||||
in your cart </p><span t-if="len(request.website.sale_get_order().website_order_line)" class="as_clr_cart">Clear Cart</span></div>
|
||||
<t t-if="not website_sale_order or not website_sale_order.website_order_line">
|
||||
<t t-call="theme_alan.as_empty_mini_cart"/>
|
||||
</t>
|
||||
<div class="cart_body" t-if="website_sale_order and website_sale_order.website_order_line">
|
||||
<t t-call="theme_alan.as_mini_cart_lines"/>
|
||||
<div class="as-cart-summary">
|
||||
<t t-call="website_sale.total"/>
|
||||
</div>
|
||||
<div class="as-cart-btn-bar">
|
||||
<a href="/shop/cart" class="btn as-btn btn-primary">View Cart</a>
|
||||
<a href="/shop/checkout" class="as-btn btn btn-secondary">Checkout</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Mini Cart Lines -->
|
||||
<template id="as_mini_cart_lines" name="Shop Mini Cart lines">
|
||||
<div class="as-mini-main-cart">
|
||||
<ul class="as-mini-cart-products">
|
||||
<t t-foreach="website_sale_order.website_order_line" t-as="line" t-attf-class="#{'optional_product info'}">
|
||||
<li class="as-mc-media">
|
||||
<div class="as-mc-img">
|
||||
<t t-if="line.product_id.product_tmpl_id">
|
||||
<span t-field="line.product_id.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max mb-2'}" />
|
||||
</t>
|
||||
</div>
|
||||
<div class="as-mc-info">
|
||||
<h6>
|
||||
<a t-attf-href="/shop/product/{{line.product_id.product_tmpl_id.id}}">
|
||||
<t t-esc="line.product_id.with_context(display_default_code=False).display_name"/>
|
||||
</a>
|
||||
<t t-call="website_sale.cart_line_description_following_lines">
|
||||
<t t-set="div_class" t-value="'d-none d-md-block'"/>
|
||||
</t>
|
||||
</h6>
|
||||
<div class="m_c_prod_price">
|
||||
<t t-if="line.discount">
|
||||
<del t-attf-class="#{'text-danger mr8'}" style="white-space: nowrap;" t-out="line.price_unit * line.product_uom_qty" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
</t>
|
||||
<t t-if="website.show_line_subtotals_tax_selection == 'tax_excluded'" t-set='product_price' t-value='line.price_subtotal'/>
|
||||
<t t-else="" t-set='product_price' t-value='line.price_total'/>
|
||||
<span t-out="product_price" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
||||
<small t-if="not line._is_not_sellable_line() and line.product_id.base_unit_price" class="cart_product_base_unit_price d-block text-muted" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'>
|
||||
<t t-set='product' t-value='line.product_id'/>
|
||||
<t t-set='combination_info' t-value="{'base_unit_price':product._get_base_unit_price(product_price)}"/>
|
||||
</t>
|
||||
</small>
|
||||
</div>
|
||||
<div class="m_c_qty">
|
||||
<div class="css_quantity input-group">
|
||||
<div class="input-group-prepend">
|
||||
<a t-attf-href="#" class="btn btn-link js_add_cart_json d-none d-md-inline-block" aria-label="Remove one" title="Remove one">
|
||||
<i class="fa fa-minus"/>
|
||||
</a>
|
||||
</div>
|
||||
<input type="text" t-attf-class="js_quantity form-control quantity p-1 text-center sale_line_#{line.product_id.id}" t-att-data-line-id="line.id" t-att-data-product-id="line.product_id.id" t-att-value="int(line.product_uom_qty) == line.product_uom_qty and int(line.product_uom_qty) or line.product_uom_qty"/>
|
||||
<div class="input-group-append">
|
||||
<a t-attf-href="#" class="btn btn-link float_left js_add_cart_json d-none d-md-inline-block" aria-label="Add one" title="Add one">
|
||||
<i class="fa fa-plus"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<a href='#' aria-label="Remove from cart" title="Remove from cart" class='js_delete_product no-decoration'><i class='fa fa-trash-o'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
<div t-if="suggested_products and len(suggested_products)" class="as-min-suggested">
|
||||
<div id="suggestedProductControls" class="carousel slide" data-bs-ride="carousel" >
|
||||
<h5 t-attf-class="as-mini-title" t-if="suggested_products">Suggested Accessories</h5>
|
||||
<div class="carousel-inner">
|
||||
<t t-foreach="suggested_products" t-as="suggested_prod">
|
||||
<div t-attf-class="carousel-item {{'active' if suggested_prod_first else ''}}">
|
||||
<div class="as-min-sa-pro">
|
||||
<div class="as-sa-img">
|
||||
<a t-att-href="suggested_prod.website_url">
|
||||
<span t-field="suggested_prod.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': ''}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="as-sa-info">
|
||||
<h6>
|
||||
<a t-att-href="suggested_prod.website_url"><t t-esc="suggested_prod.name"/></a>
|
||||
</h6>
|
||||
<div class="m_c_prod_price">
|
||||
<h6 class="oe_price_h4 css_editable_mode_hidden">
|
||||
<t t-set="combination_info" t-value="suggested_prod._get_combination_info_variant()"/>
|
||||
<del t-attf-class="text-danger mr8 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" style="white-space: nowrap;"/>
|
||||
<span t-esc="combination_info['price']" t-options="{'widget': 'monetary','display_currency': website.currency_id}" style="white-space: nowrap;"/>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="as-sa-btn">
|
||||
<input class="js_quantity" name="product_id" t-att-data-product-id="suggested_prod.id" t-att-data-product-list="website_sale_order.website_order_line.product_id.mapped('id')" type="hidden"/>
|
||||
<a t-if="suggested_prod.sudo()._website_show_quick_add()" role="button" class="js_add_suggested_products btn btn-dark text-nowrap">
|
||||
<i class="asi asi-shopping-cart"/>
|
||||
<span>Add to cart</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="suggested_products and len(suggested_products) > 1">
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#suggestedProductControls" data-bs-slide="prev">
|
||||
<span class="oi oi-chevron-left fa-2x oe_unmovable" role="img" aria-label="Previous" title="Previous"/>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#suggestedProductControls" data-bs-slide="next">
|
||||
<span class="oi oi-chevron-right fa-2x oe_unmovable" role="img" aria-label="Next" title="Next"/>
|
||||
</button>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Empty Mini Cart -->
|
||||
<template id="as_empty_mini_cart" name="Shop Empty Cart lines">
|
||||
<div class="as-mini-cart-empty">
|
||||
<div>
|
||||
<svg width="527" height="405" viewBox="0 0 527 405" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 200px;height: auto;">
|
||||
<path d="M41.634 370.844C54.0624 393.893 80.44 403.787 80.44 403.787C80.44 403.787 86.6671 376.312 74.2387 353.263C61.8103 330.214 35.4327 320.319 35.4327 320.319C35.4327 320.319 29.2056 347.795 41.634 370.844Z" fill="#2F2E41" />
|
||||
<path d="M419.647 297.511C400.271 315.126 397.022 343.11 397.022 343.11C397.022 343.11 425.188 342.535 444.565 324.921C463.941 307.306 467.19 279.321 467.19 279.321C467.19 279.321 439.024 279.896 419.647 297.511Z" fill="#2F2E41" />
|
||||
<path d="M50.1765 363.261C72.6149 376.761 81.2567 403.575 81.2567 403.575C81.2567 403.575 53.5186 408.502 31.0802 395.002C8.64174 381.502 0 354.688 0 354.688C0 354.688 27.7381 349.761 50.1765 363.261Z" fill="var(--primary)" />
|
||||
<path d="M429.065 303.975C421.368 329.005 397.425 343.852 397.425 343.852C397.425 343.852 385.962 318.117 393.659 293.087C401.356 268.058 425.298 253.211 425.298 253.211C425.298 253.211 436.762 278.946 429.065 303.975Z" fill="var(--primary)" />
|
||||
<path d="M362.06 360.29H125.274V358.587H360.356V275.967H145.18L134.727 254.19L136.263 253.453L146.252 274.263H362.06V360.29Z" fill="#2F2E41" />
|
||||
<path d="M156.789 402.026C166.667 402.026 174.675 394.018 174.675 384.139C174.675 374.26 166.667 366.252 156.789 366.252C146.91 366.252 138.902 374.26 138.902 384.139C138.902 394.018 146.91 402.026 156.789 402.026Z" fill="#3F3D56" />
|
||||
<path d="M333.101 402.026C342.979 402.026 350.987 394.018 350.987 384.139C350.987 374.26 342.979 366.252 333.101 366.252C323.222 366.252 315.214 374.26 315.214 384.139C315.214 394.018 323.222 402.026 333.101 402.026Z" fill="#3F3D56" />
|
||||
<path d="M387.385 247.859H121.237L63.6484 59.6227H446.693L446.344 60.7302L387.385 247.859ZM122.497 246.156H386.136L444.37 61.3262H65.9508L122.497 246.156Z" fill="#2F2E41" />
|
||||
<path d="M366.61 238.064H132.842L82.26 71.121H418.701L418.395 72.104L366.61 238.064Z" fill="#F2F2F2" />
|
||||
<path d="M451.465 42.806L449.818 42.369L461.059 0H526.448V1.70398H462.37L451.465 42.806Z" fill="#2F2E41" />
|
||||
<path d="M427.552 116.69H82.2584V118.393H427.552V116.69Z" fill="#2F2E41" />
|
||||
<path d="M407.777 179.45H101.459V181.153H407.777V179.45Z" fill="#2F2E41" />
|
||||
<path d="M256.017 60.4744H254.314V247.007H256.017V60.4744Z" fill="#2F2E41" />
|
||||
<path d="M332.286 60.421L320.057 246.949L321.758 247.061L333.986 60.5324L332.286 60.421Z" fill="#2F2E41" />
|
||||
<path d="M178.081 60.419L176.38 60.5298L188.538 247.063L190.238 246.952L178.081 60.419Z" fill="#2F2E41" />
|
||||
</svg>
|
||||
</div>
|
||||
<p>Your Shopping Cart is empty</p>
|
||||
<div class="button">
|
||||
<a href="/shop" class="btn as-btn btn-primary">Shop Now</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_shop_mini_cart" name="Mini Cart Extend" inherit_id="website_sale.header_cart_link" priority="1">
|
||||
<xpath expr="//a[@href='/shop/cart']" position="attributes">
|
||||
<attribute name="t-attf-class" separator=" " add="#{'as_mini_cart' if website.active_mini_cart else ''}"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Mini Cart: END -->
|
||||
|
||||
<!-- Mobile Header: START -->
|
||||
<template id="template_header_mobile" name="Template Header Mobile" inherit_id="website.template_header_mobile">
|
||||
<xpath expr="//t[@t-call='website.navbar']" position="replace">
|
||||
<t t-call="website.navbar">
|
||||
<t t-set="_navbar_classes" t-valuef="o_header_mobile d-block d-lg-none shadow-sm as-mobile-header"/>
|
||||
<t t-set="_navbar_expand_class" t-valuef="None"/>
|
||||
<t t-set="_navbar_name" t-valuef="Mobile"/>
|
||||
|
||||
<div id="o_main_nav" class="container flex-nowrap justify-content-between">
|
||||
|
||||
<ul class="o_header_mobile_buttons_wrap as-mob-header-end navbar-nav flex-row align-items-center gap-2 mb-0">
|
||||
<!-- Website Cart -->
|
||||
<t t-call="website_sale.header_cart_link">
|
||||
<t t-set="_icon" t-value="True"/>
|
||||
<t t-set="_link_class" t-value="'o_navlink_background hm-icon-item as-h-bag'"/>
|
||||
<t t-set="_badge_class" t-value="'h-sup'"/>
|
||||
<t t-set="_icon_wrap_class" t-value="'hm-icon'"/>
|
||||
</t>
|
||||
<li class="as-mob-logo">
|
||||
<!-- Brand -->
|
||||
<t t-call="website.placeholder_header_brand"/>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn hm-icon o_not_editable p-0"
|
||||
type="button"
|
||||
data-bs-toggle="offcanvas"
|
||||
data-bs-target="#top_menu_collapse_mobile"
|
||||
aria-controls="top_menu_collapse_mobile"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<span class="navbar-toggler-icon"/>
|
||||
</button>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div t-attf-class="offcanvas #{_side if _side else 'offcanvas-start'} o_navbar_mobile" id="top_menu_collapse_mobile">
|
||||
<div class="offcanvas-header justify-content-end o_not_editable">
|
||||
<ul class="as-mob-search">
|
||||
<!-- Search bar -->
|
||||
<t t-call="website.placeholder_header_search_box">
|
||||
<t t-set="_classes" t-valuef=""/>
|
||||
<t t-set="_input_classes" t-valuef="text-bg-light"/>
|
||||
<t t-set="_submit_classes" t-valuef="bg-o-color-3"/>
|
||||
<t t-set="limit" t-valuef="0"/>
|
||||
</t>
|
||||
</ul>
|
||||
<button type="button" class="nav-link btn-close" data-bs-dismiss="offcanvas" aria-label="Close"/>
|
||||
</div>
|
||||
<div class="offcanvas-body d-flex flex-column justify-content-between h-100 w-100">
|
||||
<ul class="navbar-nav">
|
||||
|
||||
<!-- Navbar -->
|
||||
<t t-call="website.navbar_nav">
|
||||
<t t-set="_no_autohide_menu_mobile" t-valuef="True"/>
|
||||
|
||||
<!-- Menu -->
|
||||
<t t-foreach="website.menu_id.child_id" t-as="submenu">
|
||||
<t t-call="website.submenu">
|
||||
<t t-set="item_class" t-valuef="nav-item"/>
|
||||
<t t-set="link_class" t-valuef="nav-link"/>
|
||||
<t t-set="dropdown_toggler_classes" t-valuef="d-flex justify-content-between align-items-center"/>
|
||||
<t t-set="dropdown_menu_classes" t-valuef="position-relative rounded-0 o_dropdown_without_offset"/>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<ul class="as-mob-extra-menu navbar-nav">
|
||||
<!-- Website wishlist -->
|
||||
<t t-call="website_sale_wishlist.header_wishlist_link">
|
||||
<t t-set="_text" t-value="True"/>
|
||||
<t t-set="_icon" t-value="True"/>
|
||||
<t t-set="_item_class" t-valuef="nav-item"/>
|
||||
<t t-set="_link_class" t-value="'nav-link as-h-wish'"/>
|
||||
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/>
|
||||
<t t-set="_icon_wrap_class" t-value="'position-relative'"/>
|
||||
</t>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- <t t-call="website.placeholder_header_text_element">
|
||||
<t t-set="_txt_elt_content" t-valuef="sentence"/>
|
||||
</t>
|
||||
|
||||
<t t-call="website.placeholder_header_social_links">
|
||||
<t t-set="_div_class" t-valuef="mt-2 border-top pt-2 o_border_contrast"/>
|
||||
</t> -->
|
||||
</ul>
|
||||
<ul class="as-mob-bottom-link">
|
||||
<!-- Sign In -->
|
||||
<t t-call="portal.placeholder_user_sign_in">
|
||||
<t t-set="_link_class" t-valuef="btn btn-outline-secondary w-100"/>
|
||||
</t>
|
||||
<!-- User Dropdown -->
|
||||
<t t-call="portal.user_dropdown">
|
||||
<t t-set="_icon" t-value="true"/>
|
||||
<t t-set="_user_name" t-value="true"/>
|
||||
<t t-set="_user_name_class" t-valuef=""/>
|
||||
<t t-set="_link_class" t-valuef="as-mob-btm-link"/>
|
||||
<t t-set="_icon_class" t-valuef="me-2"/>
|
||||
<t t-set="_item_class" t-valuef="dropdown dropup"/>
|
||||
<t t-set="_dropdown_menu_class" t-valuef=""/>
|
||||
</t>
|
||||
<!-- Language Selector -->
|
||||
<t t-call="website.placeholder_header_language_selector">
|
||||
<t t-set="_btn_class" t-valuef="as-mob-btm-link"/>
|
||||
<t t-set="_txt_class" t-valuef=""/>
|
||||
<t t-set="_flag_class" t-valuef=""/>
|
||||
<t t-set="_div_classes" t-valuef="dropup"/>
|
||||
<t t-set="_dropdown_menu_class" t-valuef=""/>
|
||||
</t>
|
||||
<!-- Call To Action -->
|
||||
<!-- <t t-call="website.header_call_to_action_large"/> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Mobile Header: END -->
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,646 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Product Detail Page Indentifier -->
|
||||
<template id="as_product_detai_page_identifier" name="AS Product Detail" inherit_id="web.frontend_layout" priority="1">
|
||||
<xpath expr="//div[@id='wrapwrap']" position="attributes">
|
||||
<attribute name="t-attf-class" add="#{'as-product-detail' if as_product_detail else ''}" separator=" "/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Product Page -->
|
||||
<template id="as_product_customization" name="Product Page" inherit_id="website_sale.product">
|
||||
|
||||
<!-- Offer time, Last month count and bulk save: START -->
|
||||
<xpath expr="//div/t[@t-call='website_sale.product_price']" position="after">
|
||||
<t t-set="offer_timer" t-value="product_variant._get_offer_timing(website._get_current_pricelist())"/>
|
||||
<div t-if="website.active_product_offer_timer" class="as_offer_timer" t-att-data-offer="offer_timer"/>
|
||||
<div t-if="website.active_last_month_count" class="as_month_sale_count as-month-sale-count"/>
|
||||
<div t-if="website.active_product_bulk_save" class="as_bulk_save as-bulk-table"/>
|
||||
</xpath>
|
||||
<!-- Offer time, Last month count and bulk save: END -->
|
||||
|
||||
<!-- Product Sticky Cart: START -->
|
||||
<xpath expr="//div[@id='wrap']" position="after">
|
||||
<t t-if="website.active_product_sticky" t-call="theme_alan.as_product_stick_cart"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='wrap']" position="attributes">
|
||||
<attribute name="class" add=" as-sticky-cart-active" separator=" "/>
|
||||
</xpath>
|
||||
<!-- Product Sticky Cart: END -->
|
||||
|
||||
<!-- Product label: START -->
|
||||
<xpath expr="//div[@id='product_details']/h1[@t-field='product.name']" position="before">
|
||||
<t t-if="website.active_product_label" t-call="theme_alan.product_label"/>
|
||||
</xpath>
|
||||
<!-- Product label: END -->
|
||||
|
||||
<xpath expr="//div[@id='o_product_terms_and_share']" position="replace">
|
||||
<!-- Product Brand: START -->
|
||||
<div t-if="product.product_brand_id and (product.product_brand_id.website_id == request.website or not product.product_brand_id.website_id) and website.active_product_brand" class="as-brand-info">
|
||||
<div class="as-b-avatar">
|
||||
<img t-att-src="request.website.image_url(product.product_brand_id,'image_128')"/>
|
||||
</div>
|
||||
<div class="as-b-text">
|
||||
<h6 t-esc="product.product_brand_id.name"/>
|
||||
<p t-esc="product.product_brand_id.brand_description"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Product Brand: END -->
|
||||
|
||||
<!-- Product Advance Info: START -->
|
||||
<div t-if="len(product.product_offer_ids) and website.active_product_advance_info" class="as-offers-box">
|
||||
<ul>
|
||||
<t t-foreach="product.product_offer_ids" t-as="offer">
|
||||
<li t-if="offer.types == 'offer'">
|
||||
<div class="as-offer-icon"><span t-attf-class="fa fa-{{offer.icon}}"/></div>
|
||||
<div class="as-offer-text"><p><strong t-esc="offer.name"/>
|
||||
<t t-esc="offer.short_description"/></p>
|
||||
<span class="show_advance_product" t-att-data-info_id="offer.id"> Detail <i class="fa fa-angle-right" /> </span></div>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Product Advance Info: END -->
|
||||
<div class="as-pd-extra">
|
||||
<!-- Category: START -->
|
||||
<t t-set="show_categories" t-value="product.public_categ_ids.filtered(lambda x: x.website_id == request.website or not x.website_id)"/>
|
||||
<div t-if="show_categories and website.active_product_category" class="as-pd-cat-list as-pd-lists">
|
||||
<label>Category: </label>
|
||||
<span t-esc="', '.join(show_categories.mapped('name'))"/>
|
||||
</div>
|
||||
<!-- Category: END -->
|
||||
<!-- Product SKU: START -->
|
||||
<div t-if="website.active_product_reference" class="as_product_sku d-none as-pd-lists">
|
||||
<label>SKU: </label>
|
||||
<span></span>
|
||||
</div>
|
||||
<!-- Product SKU: END-->
|
||||
</div>
|
||||
<div id="o_product_terms_and_share"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Product Pager: START -->
|
||||
<xpath expr="//section[@id='product_detail']" position="before">
|
||||
<div class="as-product-next-prev-history">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item o_not_editable">
|
||||
<a t-att-href="keep(category=0)">All Products</a>
|
||||
</li>
|
||||
<li t-if="category" class="breadcrumb-item">
|
||||
<a t-att-href="keep('/shop/category/%s' % slug(category), category=0)" t-field="category.name" />
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<span t-field="product.name" />
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div t-if="website.active_product_pager" class="col as-pre-nxt-col">
|
||||
<div t-if="previous_product or next_product" class="as-pre-nxt-prod">
|
||||
<div t-if="previous_product" class="as-pre-prod-info as-pager-prod-info d-none">
|
||||
<div class="as-np-card">
|
||||
<div class="as-np-card-media">
|
||||
<img t-att-src="request.website.image_url(previous_product, 'image_128')"/>
|
||||
</div>
|
||||
<div class="as-np-card-info">
|
||||
<div class="as-pre-title">
|
||||
<span class="title" t-esc="previous_product.display_name"/>
|
||||
</div>
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-pre-price">
|
||||
<t t-set="as_combination" t-value="previous_product._get_combination_info()"/>
|
||||
<span class="oe_price" style="white-space: nowrap;" t-esc="as_combination['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
<span t-attf-class="text-danger oe_default_price ms-1 {{'' if as_combination['has_discounted_price'] else 'd-none'}}" style="text-decoration: line-through !important; white-space: nowrap;"
|
||||
t-esc="as_combination['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="as-pre-prod-info" t-attf-href="/shop/#{slug(previous_product) if previous_product else None}" t-attf-class="as-pager-prod #{'inactive' if not previous_product else 'active'}">
|
||||
<i class="fa fa-caret-left"></i>
|
||||
</a>
|
||||
<a href="/shop" class="as-shop-prod">
|
||||
<i class="fa fa-home"></i>
|
||||
</a>
|
||||
<a id="as-next-prod-info" t-attf-href="/shop/#{slug(next_product) if next_product else None}" t-attf-class="as-pager-prod #{'inactive' if not next_product else 'active'}">
|
||||
<i class="fa fa-caret-right"></i>
|
||||
</a>
|
||||
<div t-if="next_product" class="as-next-prod-info as-pager-prod-info d-none">
|
||||
<div class="as-np-card">
|
||||
<div class="as-np-card-media">
|
||||
<img t-att-src="request.website.image_url(next_product, 'image_128')"/>
|
||||
</div>
|
||||
<div class="as-np-card-info">
|
||||
<div class="as-pre-title">
|
||||
<span t-esc="next_product.display_name"/>
|
||||
</div>
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-pre-price">
|
||||
<t t-set="as_combination" t-value="next_product._get_combination_info()"/>
|
||||
<span class="oe_price" style="white-space: nowrap;" t-esc="as_combination['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
<span t-attf-class="text-danger oe_default_price ms-1 {{'' if as_combination['has_discounted_price'] else 'd-none'}}" style="text-decoration: line-through !important; white-space: nowrap;"
|
||||
t-esc="as_combination['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<!-- Search bar and negivation replace -->
|
||||
<xpath expr="//section[@id='product_detail']/div" position="replace">
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Product Pager: END -->
|
||||
|
||||
<!-- Compare Button Position: START -->
|
||||
<template id="product_add_to_compare_remove" name="Replace Default Compare" inherit_id="website_sale_comparison.product_add_to_compare">
|
||||
<xpath expr="//t[@t-set='categories']" position="replace"/>
|
||||
<xpath expr="//t[@t-set='product_variant_id']" position="replace"/>
|
||||
<xpath expr="//button" position="replace"/>
|
||||
</template>
|
||||
<template id="product_add_to_compare" name='Add to comparison in product page' inherit_id="website_sale.product" priority="81">
|
||||
<xpath expr="//div[@id='product_option_block']" position="inside">
|
||||
<t t-if="is_view_active('website_sale_comparison.product_add_to_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()"/>
|
||||
<button t-if="product_variant_id and categories"
|
||||
type="button"
|
||||
role="button"
|
||||
class="d-none d-md-block btn btn-link px-0 o_add_compare_dyn"
|
||||
aria-label="Compare"
|
||||
t-att-data-product-product-id="product_variant_id"
|
||||
data-action="o_comparelist">
|
||||
<span class="fa fa-exchange me-2"/>Compare
|
||||
</button>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Compare Button Position: END -->
|
||||
|
||||
<!-- Product Sticky Cart: START -->
|
||||
<template id="as_product_stick_cart">
|
||||
<div class="as-product-sticky-cart as_prod_sticky">
|
||||
<div class="as-product-sticky-in">
|
||||
<div class="media">
|
||||
<div class="prod_img">
|
||||
<img t-att-src="'/web/image/product.template/%s/image_256' % product.id"
|
||||
class="img img-fluid rounded" alt="Product Image"/>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h6 itemprop="name" t-field="product.name" class="te_product_name"/>
|
||||
<div t-if="not(request.env.user._is_public() and request.website.active_b2b_mode)" t-attf-class="mt-2 mb-3 as_product_price {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-block'}}">
|
||||
<h3>
|
||||
<span class="aoe_price" style="white-space: nowrap;" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
<span t-attf-class="text-danger soe_default_price ms-1 h5 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="text-decoration: line-through; white-space: nowrap;"
|
||||
t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
|
||||
<t t-if="is_view_active('website_sale.tax_indication')" t-call="website_sale.tax_indication"/>
|
||||
<del t-if="product.compare_list_price">
|
||||
<span t-esc="product.compare_list_price"
|
||||
groups="website_sale.group_product_price_comparison"
|
||||
t-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": product.currency_id,
|
||||
}'/>
|
||||
</del>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="product_unavailable" t-attf-class="{{'d-flex' if combination_info['prevent_zero_price_sale'] else 'd-none'}}">
|
||||
<h3 class="fst-italic" t-field="website.prevent_zero_price_sale_text"/>
|
||||
</div>
|
||||
<div class="as_add_cart">
|
||||
<t t-if="product.product_variant_count == 1">
|
||||
<t t-set="buy_now_show"
|
||||
t-value="request.website.viewref('website_sale.product_buy_now').active"/>
|
||||
<t t-set="wish_list_show"
|
||||
t-value="request.website.viewref('website_sale_wishlist.product_add_to_wishlist').active"/>
|
||||
<a role="button" id="sticky_add_to_cart" data-target_id="#add_to_cart"
|
||||
class="as_sticky_action as-s-btn as-s-cart" href="#">
|
||||
<i class="asi asi-shopping-cart" data-target_id="#add_to_cart"/>
|
||||
</a>
|
||||
<t t-if="wish_list_show">
|
||||
<a role="button" id="sticky_add_to_wishlist" data-target_id=".o_add_wishlist_dyn"
|
||||
class="as_sticky_action as-s-btn as-s-wish" href="#">
|
||||
<i class="asi asi-heart" data-target_id=".o_add_wishlist_dyn"/>
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="buy_now_show">
|
||||
<a role="button" id="sticky_buy_now" data-target_id=".o_we_buy_now"
|
||||
class="as_sticky_action as-s-btn as-s-buynow"
|
||||
href="#">
|
||||
<i class="asi asi-zap" data-target_id=".o_we_buy_now"/>
|
||||
</a>
|
||||
</t>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div id="as-scroll-top" class="as-s-btn as-s-scroll as-scroll-top">
|
||||
<i class="asi asi-chevron-up"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Product Sticky Cart: END -->
|
||||
|
||||
<!-- Product Advance Information Editore: START -->
|
||||
<template id="as_product_advance_info_design" name="Advance Information Editor">
|
||||
<t t-call="website.layout">
|
||||
<t t-set="no_footer" t-value="1"/>
|
||||
<t t-set="no_header" t-value="1"/>
|
||||
<div class="wrap js_sale">
|
||||
<div t-field="layout.detail_description"/>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
<template id="as_product_variants" name="Variant Extenda" inherit_id="website_sale.variants">
|
||||
<xpath expr="//strong[hasclass('attribute_name')]" position="replace">
|
||||
<strong class="attribute_name"><t t-esc="ptal.attribute_id.name"/><span t-if="ptal.sudo().attribute_id.attribute_extra_info_id and request.website.active_product_variant_info" class="show_advance_product" t-att-data-info_id="ptal.attribute_id.attribute_extra_info_id.id"><t t-esc="ptal.attribute_id.attribute_extra_info_id.name"/> <i class="fa fa-angle-right"></i> </span> </strong>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Product Advance Information Editore: END -->
|
||||
|
||||
<!-- Product Tabs: START-->
|
||||
<template id="as_product_comment" inherit_id="website_sale.product_comment">
|
||||
<xpath expr="//div[hasclass('o_shop_discussion_rating')]" position="attributes">
|
||||
<attribute name="t-attf-style">{{'display:none !important;'}}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="as_product_content_tabs" name="Product Tabs">
|
||||
<div class="product-details-tabs">
|
||||
<div class="container">
|
||||
<t t-set="active_tab" t-value="0"/>
|
||||
<t t-set="active_tab_name" t-value="False"/>
|
||||
<ul class="nav nav-tabs" id="as_product_tabs" role="tablist">
|
||||
<t t-set="is_tab_active_set" t-value="0"/>
|
||||
<li class="nav-item">
|
||||
<button t-if="product.product_tab_description or request.env.user._is_admin()" class="nav-link active" id="as-description-tab" data-bs-toggle="tab" data-bs-target="#nav-description" type="button" role="tab" aria-controls="nav-description" aria-selected="true">Description
|
||||
<t t-set="active_tab" t-value="1"/><t t-set="active_tab_name" t-value="'Description'"/>
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button t-if="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()" t-attf-class="nav-link #{'active' if not active_tab else ''}" id="nav-specification-tab" data-bs-toggle="tab" data-bs-target="#nav-specification" type="button" role="tab" aria-controls="nav-specification" aria-selected="false">Specification
|
||||
<t t-if="not active_tab"><t t-set="active_tab" t-value="1"/><t t-set="active_tab_name" t-value="'Specification'"/></t></button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button t-if="is_view_active('website_sale.product_comment')" t-attf-class="nav-link #{'active' if not active_tab else ''}" id="nav-reviews-tab" data-bs-toggle="tab" data-bs-target="#nav-reviews" type="button" role="tab" aria-controls="nav-reviews" aria-selected="false">Reviews
|
||||
<t t-if="not active_tab"><t t-set="active_tab" t-value="1"/><t t-set="active_tab_name" t-value="'Reviews'"/></t>
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button t-if="product.doc_attachments" t-attf-class="nav-link #{'active' if not active_tab else ''}" id="nav-documents-tab" data-bs-toggle="tab" data-bs-target="#nav-documents" type="button" role="tab" aria-controls="nav-documents" aria-selected="false">Documents
|
||||
<t t-if="not active_tab"><t t-set="active_tab" t-value="1"/><t t-set="active_tab_name" t-value="'Documents'"/></t>
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button t-if="product.product_faqs_ids.filtered(lambda l: l.website_ids.id in (website.id, False))" t-attf-class="nav-link #{'active' if not active_tab else ''}" id="nav-faqs-tab" data-bs-toggle="tab" data-bs-target="#nav-faqs" type="button" role="tab" aria-controls="nav-faqs" aria-selected="false">FAQs
|
||||
<t t-if="not active_tab"><t t-set="active_tab" t-value="1"/><t t-set="active_tab_name" t-value="'faqs'"/></t>
|
||||
</button>
|
||||
</li>
|
||||
<t t-if="product.pro_tab_ids and request.env['product.tab.line'].getTab(website.id,tab.website_ids.ids)" t-foreach="product.pro_tab_ids" t-as="tab">
|
||||
<li class="nav-item">
|
||||
<button t-attf-class="nav-link #{'active' if not active_tab and not is_tab_active_set else ''}" t-att-id="'nav-%s-tab' % (tab.id)" data-bs-toggle="tab" t-att-data-bs-target="'#nav-%s' % (tab.id)" type="button" role="tab" t-attf-aria-controls="'nav-%s' % (tab.id)" aria-selected="false"><t t-esc="tab.tab_name"/>
|
||||
<t t-if="not active_tab"><t t-set="active_tab" t-value="1"/><t t-set="is_tab_active_set" t-value="1"/><t t-set="active_tab_name" t-att-value="'D-tab'"/></t>
|
||||
</button>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div t-if="product.product_tab_description or request.env.user._is_admin()" t-attf-class="tab-pane fade show #{'show active' if active_tab_name == 'Description' else ''}" id="nav-description" role="tabpanel" aria-labelledby="as-description-tab">
|
||||
<div t-field="product.product_tab_description" class="oe_structure oe_empty" id="product_full_tab_description"/>
|
||||
</div>
|
||||
<div t-attf-class="tab-pane fade #{'show active' if active_tab_name == 'Specification' else ''}" id="nav-specification" role="tabpanel" aria-labelledby="nav-specification-tab">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<t t-if="categories">
|
||||
<div class="container">
|
||||
<div id="product_specifications">
|
||||
<div class="row">
|
||||
<t t-foreach="categories" t-as="category">
|
||||
<table class="table">
|
||||
<t t-if="len(categories) > 1">
|
||||
<tr>
|
||||
<th class="text-start" t-att-colspan="2">
|
||||
<span t-if="category" t-field="category.name"/>
|
||||
<span t-else="">Uncategorized</span>
|
||||
</th>
|
||||
</tr>
|
||||
</t>
|
||||
<tr t-foreach="categories[category].filtered(lambda l: len(l.value_ids) > 1)" t-as="ptal">
|
||||
<td class="w-25"><span t-field="ptal.attribute_id.name"/></td>
|
||||
<td class="w-75 text-muted">
|
||||
<t t-foreach="ptal.value_ids" t-as="pav">
|
||||
<span t-field="pav.name"/><t t-if="not pav_last"> or</t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<t t-set="single_value_attributes" t-value="categories[category]._prepare_single_value_for_display()"/>
|
||||
<tr t-foreach="single_value_attributes" t-as="attribute">
|
||||
<td class="w-25"><span t-field="attribute.name"/></td>
|
||||
<td class="w-75 text-muted">
|
||||
<t t-foreach="single_value_attributes[attribute]" t-as="ptal">
|
||||
<span t-field="ptal.product_template_value_ids._only_active().name"/><t t-if="not ptal_last">, </t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<div t-attf-class="tab-pane fade #{'show active' if active_tab_name == 'Reviews' else ''}" id="nav-reviews" role="tabpanel" aria-labelledby="nav-reviews-tab">
|
||||
<t t-if="is_view_active('website_sale.product_comment')" t-call="portal.message_thread">
|
||||
<t t-set="object" t-value="product"/>
|
||||
<t t-set="display_rating" t-value="True"/>
|
||||
<t t-set="message_per_page" t-value="5"/>
|
||||
<t t-set="two_columns" t-value="true"/>
|
||||
</t>
|
||||
</div>
|
||||
<div t-attf-class="tab-pane fade #{'show active' if active_tab_name == 'Documents' else ''}" id="nav-documents" role="tabpanel" aria-labelledby="nav-documents-tab">
|
||||
<div t-if="product.doc_attachments" class="as-pd-doc-tab">
|
||||
<div class="row g-2">
|
||||
<t t-foreach="product.sudo().doc_attachments" t-as="attachment">
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="as-pd-doc-download">
|
||||
<div class="o_image" t-att-data-mimetype="attachment.mimetype" />
|
||||
<div class="as-pd-doc-name">
|
||||
<div class="text-truncate mw-100 d-inline-block" t-esc="attachment.name" />
|
||||
<a class="btn btn-primary small badge fw-400"
|
||||
t-attf-href="/web/content/#{attachment.id}?download=true"
|
||||
t-att-title="attachment.name">
|
||||
<i t-attf-class="fa fa-download" role="img" /> Download
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-attf-class="tab-pane fade #{'show active' if active_tab_name == 'faqs' else ''}" id="nav-faqs" role="tabpanel" aria-labelledby="nav-faqs-tab">
|
||||
<div t-if="product.product_faqs_ids.filtered(lambda l: l.website_ids.id in (website.id, False))" class="as-pd-faqs-tab">
|
||||
<div class="row g-2">
|
||||
<t t-foreach="product.product_faqs_ids.filtered(lambda l: l.website_ids.id in (website.id, False))" t-as="faqs">
|
||||
<div class="accordion" t-att-id="faqs.id">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" t-attf-data-bs-target="#collapseOne_{{faqs.id}}" aria-expanded="true" t-attf-aria-controls="collapseOne_{{faqs.id}}">
|
||||
<t t-esc="faqs.question"/>
|
||||
</button>
|
||||
</h2>
|
||||
<div t-attf-id="collapseOne_{{faqs.id}}" class="accordion-collapse collapse" data-bs-parent="#accordionExample">
|
||||
<div class="accordion-body">
|
||||
<t t-esc="faqs.answer" t-options='{"widget": "html"}'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<t t-set="is_tab_set" t-value="0"/>
|
||||
<t t-if="not active_tab_name" t-set="active_tab_name" t-value="'D-tab'"/>
|
||||
<t t-foreach="product.pro_tab_ids" t-as="tab">
|
||||
<t t-if="request.env['product.tab.line'].getTab(website.id,tab.website_ids.ids)">
|
||||
<div t-attf-class="tab-pane fade #{'show active' if active_tab_name == 'D-tab' and not is_tab_set else ''}" t-att-id="'nav-%s' % (tab.id)" role="tabpanel" t-att-aria-labelledby="'nav-%s-tab' % (tab.id)">
|
||||
<div t-field="tab.tab_content"
|
||||
class="oe_structure">
|
||||
</div>
|
||||
</div>
|
||||
<t t-set="is_tab_set" t-value="1"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template id="product_attributes_body" inherit_id="website_sale.product" name="Product attributes table">
|
||||
<xpath expr="//section[@id='product_full_spec']" position="replace"/>
|
||||
<xpath expr="//section[hasclass('o_wsale_alternative_products')]" position="replace"/>
|
||||
<xpath expr="//div[@id='product_full_description']" position="after">
|
||||
<t t-call="theme_alan.as_product_content_tabs"/>
|
||||
<t t-call="theme_alan.as_accessory_and_alternative_products"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Product Tabs: END-->
|
||||
|
||||
<!-- OFFER TABLE: START -->
|
||||
<template id="bulk_save_offers" name="product pricelist items">
|
||||
<t t-if="not (request.env.user._is_public() and request.website.active_b2b_mode) and sum(pricelist_item_ids.mapped('min_quantity')) > 0">
|
||||
<span class="bulk-title">Save big with bulk buys!</span>
|
||||
<ul class="o_wsale_product_price_list">
|
||||
<t t-foreach="pricelist_item_ids" t-as="rule">
|
||||
<t t-if="rule.min_quantity > 0 and product">
|
||||
<t t-set="rule_price" t-value="rule.sudo()._compute_price(product.sudo(), rule.min_quantity, product.uom_id.sudo(), date=datetime.date.today(), currency=website.currency_id)"/>
|
||||
<li>
|
||||
<span class="as-bs-qty">Buy <span t-esc="rule.min_quantity"/> <span t-esc="product.uom_id.sudo().name"/></span>
|
||||
<span class="as-bs-price"> at <span t-esc="rule_price" t-options="{'widget': 'monetary', 'display_currency': product.currency_id}"/></span>
|
||||
</li>
|
||||
</t>
|
||||
</t>
|
||||
</ul>
|
||||
</t>
|
||||
</template>
|
||||
<!-- OFFER TABLE: END -->
|
||||
|
||||
<!-- B2B Mode -->
|
||||
<template id="theme_alan_product_price" inherit_id="website_sale.product_price">
|
||||
<xpath expr="//div[contains(@t-attf-class, 'product_price')]" position="attributes">
|
||||
<attribute name="t-attf-style">{{'display:none !important;' if request.env.user._is_public() and request.website.active_b2b_mode else ''}}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//h3[hasclass('css_editable_mode_hidden')]" position="inside">
|
||||
<span t-if="combination_info['has_discounted_price']" t-attf-class="as-product-discounted {{'' if combination_info['has_discounted_price'] else 'd-none'}}">
|
||||
<t t-esc="combination_info['as_offer_discount']"/> % OFF
|
||||
</span>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="theme_alan_product" inherit_id="website_sale.product" priority="99">
|
||||
<xpath expr="//div[contains(@t-attf-class,'css_quantity')]" position="attributes">
|
||||
<attribute name="t-attf-style">{{'display:none !important;' if request.env.user._is_public() and request.website.active_b2b_mode else ''}}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='add_to_cart_wrap']" position="attributes">
|
||||
<attribute name="t-attf-style">{{'display:none !important;' if request.env.user._is_public() and request.website.active_b2b_mode else ''}}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='o_wsale_cta_wrapper']" position="before">
|
||||
<div t-if="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a href="/web/login" t-attf-class="btn btn-primary #{'as_login_popup' if request.website.active_login_popup else ''}"> Login for Price</a>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="theme_alan_product_variants" name="Theme Alan List View of Variants" inherit_id="website_sale.product_variants">
|
||||
<xpath expr="//span[@t-if='diff_price != 0']" position="attributes">
|
||||
<attribute name="t-if" add="and not(request.env.user._is_public() and request.website.active_b2b_mode)" separator=" "/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="theme_alan_badge_extra_price" name="Theme Alan Badge Extra Price" inherit_id="website_sale.badge_extra_price">
|
||||
<xpath expr="//span[@t-if='price_extra']" position="attributes">
|
||||
<attribute name="t-if" add="and not(request.env.user._is_public() and request.website.active_b2b_mode)" separator=" "/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Accessory and alternative slider: START -->
|
||||
<template id="as_accessory_and_alternative_products" name="Accessory and Alternative Products">
|
||||
<div class="as-product-alt-acc-products">
|
||||
<div class="container">
|
||||
<div class="as-accessory-product as-pd-extra-slider" t-if="product.accessory_product_ids and request.website.active_product_accessory">
|
||||
<div class="as-pd-title">
|
||||
<h3>Accessory Products</h3>
|
||||
<div class="end">
|
||||
<div class="swiper-button-ass-prev"><i class="asi asi-chevron-left"/></div>
|
||||
<div class="swiper-button-ass-next"><i class="asi asi-chevron-right"/></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accessory_product as-al-ass-swiper swiper" id="as_accessory_product">
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="product.accessory_product_ids" t-as="ace_product">
|
||||
<t t-set="as_combination_info" t-value="ace_product.sudo().product_tmpl_id._get_combination_info(product_id=ace_product.id)"/>
|
||||
<div class="swiper-slide">
|
||||
<div class="as-product-card as-product-card-01 as_color_variant">
|
||||
<div class="as-product-card-media as-media-ratio">
|
||||
<div class="as-product-card-media-primary as-media-ratio-wrap oe_product_image_img_wrapper" t-field="ace_product.image_512" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'o_accessory_product' }" />
|
||||
<!--lable-->
|
||||
<t t-call="theme_alan.product_label">
|
||||
<t t-set="product" t-value="ace_product.product_tmpl_id"/>
|
||||
</t>
|
||||
<!-- Rating -->
|
||||
<t t-call="theme_alan.as_rating_template">
|
||||
<t t-set="product" t-value="ace_product.product_tmpl_id"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="as-product-card-body">
|
||||
<!-- Offer Timer -->
|
||||
<t t-set="offer_timer" t-value="ace_product.sudo()._get_offer_timing(website._get_current_pricelist())"/>
|
||||
<div t-if="website.active_shop_offer_timer and offer_timer" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="offer_timer"/>
|
||||
</div>
|
||||
<div class="as-product-card-info">
|
||||
|
||||
<!-- Brand -->
|
||||
<div t-if="website.active_shop_brand_info and ace_product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="ace_product.product_tmpl_id.product_brand_id.name"/>
|
||||
</div>
|
||||
<div class="as-pc-title">
|
||||
<a t-att-href="ace_product.website_url">
|
||||
<span t-att-title="ace_product.name" t-field="ace_product.name" class="o_text_overflow" style="display: block;"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Color Variant -->
|
||||
<div t-if="ace_product.have_color_attribute and website.active_shop_color_variant" class="as-color-variant as-pc-colors">
|
||||
<ul>
|
||||
<t t-foreach="ace_product.product_tmpl_id.get_variant_color_images()" t-as="vc">
|
||||
<li>
|
||||
<label t-att-data-product_tmpl_id="ace_product.product_tmpl_id.id" class="as_color_variant_img css_attribute_color_tag p-3" t-attf-style="background-image: url({{vc}}); background-size: cover;">
|
||||
<span t-att-data-color-image="vc" />
|
||||
</label>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Out Of Stock -->
|
||||
<t t-if="website.active_shop_stock_info">
|
||||
<t t-if="not ace_product.sudo().allow_out_of_stock_order and ace_product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<div id="out_of_stock_message" class="as-pc-message">
|
||||
<span>Out of stock</span>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="as-alternative-product as-pd-extra-slider" t-if="product.alternative_product_ids and website.active_product_alternative">
|
||||
<div class="as-pd-title">
|
||||
<h3>Alternative Products</h3>
|
||||
<div class="end">
|
||||
<div class="swiper-button-alt-prev"><i class="asi asi-chevron-left"/></div>
|
||||
<div class="swiper-button-alt-next"><i class="asi asi-chevron-right"/></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper as-al-alt-swiper" id="as_alternative">
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="product.alternative_product_ids" t-as="alt_product">
|
||||
<div class="swiper-slide">
|
||||
<div class="as-product-card as-product-card-01 o_wsale_product_grid_wrapper as_color_variant">
|
||||
<div class="as-product-card-media as-media-ratio">
|
||||
<t t-set="as_combination_info" t-value="alt_product._get_combination_info()"/>
|
||||
<div class="as-product-card-media-primary as-media-ratio-wrap oe_product_image_img_wrapper" t-field="alt_product.image_512" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'o_alternative_product' }">
|
||||
</div>
|
||||
<div t-if="alt_product.hover_image and website.active_shop_hover_image" class="as-hover-image">
|
||||
<span t-field="alt_product.hover_image" t-options="{'widget': 'image'}"/>
|
||||
</div>
|
||||
<!--lable-->
|
||||
<t t-call="theme_alan.product_label">
|
||||
<t t-set="product" t-value="alt_product"/>
|
||||
</t>
|
||||
<!-- Rating -->
|
||||
<t t-call="theme_alan.as_rating_template">
|
||||
<t t-set="product" t-value="alt_product"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="as-product-card-body">
|
||||
<!-- Offer Timer -->
|
||||
<t t-set="offer_timer" t-value="alt_product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
<div t-if="website.active_shop_offer_timer and offer_timer" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="offer_timer"/>
|
||||
</div>
|
||||
<div class="as-product-card-info">
|
||||
<!-- Brand -->
|
||||
<div t-if="website.active_shop_brand_info and alt_product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="alt_product.product_brand_id.name" />
|
||||
</div>
|
||||
<div class="as-pc-title">
|
||||
<a t-att-href="alt_product.website_url">
|
||||
<span t-att-title="alt_product.name" t-field="alt_product.name" class="o_text_overflow" style="display: block;" />
|
||||
</a>
|
||||
</div>
|
||||
<!-- Out Of Stock -->
|
||||
<t t-if="website.active_shop_stock_info">
|
||||
<t t-if="not alt_product.sudo().allow_out_of_stock_order and alt_product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<div id="out_of_stock_message" class="as-pc-message">
|
||||
<span>Out of stock</span>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Color Variant -->
|
||||
<div t-if="alt_product.have_color_attribute and website.active_shop_color_variant" class="as-color-variant as-pc-colors">
|
||||
<ul>
|
||||
<t t-foreach="alt_product.get_variant_color_images()" t-as="vc">
|
||||
<li>
|
||||
<label t-att-data-product_tmpl_id="alt_product.id" class="as_color_variant_img css_attribute_color_tag p-3" t-attf-style="background-image: url({{vc}}); background-size: cover;">
|
||||
<span t-att-data-color-image="vc" />
|
||||
</label>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Accessory and alternative slider: END -->
|
||||
</odoo>
|
||||
@@ -0,0 +1,672 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="theme_alan_products_add_to_cart" inherit_id="website_sale.products_add_to_cart" name="Theme Alan Add to Cart">
|
||||
<xpath expr="//a[contains(@t-if, 'product._website_show_quick_add()')]" position="attributes">
|
||||
<attribute name="t-if" add="and not (request.env.user._is_public() and request.website.active_b2b_mode)" separator=" "/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="theme_alan_filter_products_price" inherit_id="website_sale.filter_products_price" name="Theme Alan Filter by Prices">
|
||||
<xpath expr="//div[@id='o_wsale_price_range_option']" position="attributes">
|
||||
<attribute name="t-attf-style">{{'display:none !important;' if request.env.user._is_public() and request.website.active_b2b_mode else ''}}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="as_header_cart_link" inherit_id="website_sale.header_cart_link" name="Theme Alan Header Cart Link">
|
||||
<xpath expr="//t[@t-set='show_cart']" position="attributes">
|
||||
<attribute name="t-value">not (request.env.user._is_public() and request.website.active_b2b_mode)</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="as_product_wishlist" inherit_id="website_sale_wishlist.product_wishlist" name="Theme Alan Wishlist Page">
|
||||
<xpath expr="//td[hasclass('o_wish_price')]" position="attributes">
|
||||
<attribute name="t-if">not (request.env.user._is_public() and request.website.active_b2b_mode)</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//td[hasclass('td-wish-btn')]" position="attributes">
|
||||
<attribute name="t-if">not (request.env.user._is_public() and request.website.active_b2b_mode)</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('checkbox')]" position="attributes">
|
||||
<attribute name="t-if">not (request.env.user._is_public() and request.website.active_b2b_mode)</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Alan Shop Indentifier -->
|
||||
<template id="as_page_identifier" name="Page identifier" inherit_id="web.frontend_layout" priority="1">
|
||||
<xpath expr="//div[@id='wrapwrap']" position="attributes">
|
||||
<attribute name="t-attf-class" add="#{'as_shop_page' if as_shop else ''}" separator=" "/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Clear Filter: START -->
|
||||
<template id="as_shop_clear_filter" name="Clear Filter" inherit_id="website_sale.products">
|
||||
<xpath expr="//div[hasclass('o_wsale_products_main_row')]" position="before">
|
||||
<t t-if="website.active_shop_clear_filter">
|
||||
<div t-if="(len(attrib_set) or (round(max_price or 0) != round(available_max_price or 0) or round(min_price or 0) != round(available_min_price or 0)) or len(selected_brands) or len(selected_tags))" class="as-shop-top-filter" id="as_shop_top_filter">
|
||||
<ul>
|
||||
<li class="as-clear-filter-all" >
|
||||
<a t-att-href="keep('/shop'+ ('/category/'+slug(category)) if category else None, attrib=0, rating=0, tags=0, brand=0, min_price=0, max_price=0)">Clear All Filter <b class="asi asi-x"/></a>
|
||||
</li>
|
||||
<t t-foreach="attributes" t-as="a">
|
||||
<t t-if="a.value_ids and len(a.value_ids) > 1" t-foreach="a.value_ids" t-as="v">
|
||||
<li t-if="v.id in attrib_set" data-name="attrib" t-att-data-value="'%s-%s' % (a.id,v.id)" class="as-clear-filter">
|
||||
<span><t t-esc="a.name"/>: </span>
|
||||
<span t-esc="v.name"/><b class="asi asi-x"/>
|
||||
</li>
|
||||
</t>
|
||||
</t>
|
||||
<t t-foreach="selected_tags" t-as="tag">
|
||||
<li class="as-clear-filter" data-name="tags" t-att-data-value="tag.id">
|
||||
<span>Tag: </span>
|
||||
<span t-esc="tag.name"/><b class="asi asi-x" />
|
||||
</li>
|
||||
</t>
|
||||
<t t-foreach="selected_brands" t-as="brand">
|
||||
<li class="as-clear-filter" data-name="brand" t-att-data-value="brand.id">
|
||||
<span>Brand: </span>
|
||||
<span t-esc="brand.name"/><b class="asi asi-x" />
|
||||
</li>
|
||||
</t>
|
||||
<t t-foreach="rating_set" t-as="rating">
|
||||
<li class="as-clear-filter" data-name="rating" t-att-data-value="rating">
|
||||
<span>Rating: </span>
|
||||
<span><em t-esc="rating"/><b class="asi asi-x" /></span>
|
||||
</li>
|
||||
</t>
|
||||
<div class="clear_price_filter" style="display: contents;">
|
||||
<li t-if="round(max_price or 0) != round(available_max_price or 0)" class="as-clear-filter">
|
||||
<span><a t-att-href="keep('/shop'+ ('/category/'+slug(category)) if category else None, max_price=0)">Max Price <t t-esc="max_price"/><b class="asi asi-x" /></a></span>
|
||||
</li>
|
||||
<li t-if="round(min_price or 0) != round(available_min_price or 0)" class="as-clear-filter">
|
||||
<span><a t-att-href="keep('/shop'+ ('/category/'+slug(category)) if category else None, min_price=0)"> Min Price <t t-esc="min_price"/><b class="asi asi-x" /></a></span>
|
||||
</li>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//t[@t-call='website_sale.products_breadcrumb']" position="replace"/>
|
||||
<xpath expr="//div[hasclass('oe_website_sale')]" position="before">
|
||||
|
||||
<div class="shop-breadcrumbs">
|
||||
<div class="container">
|
||||
<ol t-attf-class="breadcrumb #{_classes}">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/shop">Products</a>
|
||||
</li>
|
||||
<t t-foreach="category.parents_and_self" t-as="cat">
|
||||
<li t-if="cat == category" class="breadcrumb-item">
|
||||
<span class="d-inline-block" t-field="cat.name"/>
|
||||
</li>
|
||||
<li t-else="" class="breadcrumb-item">
|
||||
<a t-att-href="keep('/shop/category/%s' % slug(cat), category=0)" t-field="cat.name"/>
|
||||
</li>
|
||||
</t>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Clear Filter: END -->
|
||||
|
||||
<!-- PPG: START -->
|
||||
<template id="as_shop_filter" name="Filter Bar" inherit_id="website_sale.products">
|
||||
<xpath expr="//div[hasclass('products_header')]" position="inside">
|
||||
<div t-if="website.active_shop_ppg" class="as-ppg-dropdown dropdown">
|
||||
<label>Show</label>
|
||||
<button type="button" class="dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span><t t-esc="ppg or request.session['ppg']"/></span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<t t-foreach="ppg_list" t-as="ppg">
|
||||
<a class="dropdown-item" t-att-href="keep('/shop', ppg=ppg.name)"><t t-esc="ppg.name"/></a>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- PPG: END -->
|
||||
|
||||
<template id="as_shop_info" inherit_id="website_sale.products_item" name="Shop Page">
|
||||
|
||||
<xpath expr="//div[hasclass('product_price')]" position="attributes">
|
||||
<attribute name="t-if">not (request.env.user._is_public() and request.website.active_b2b_mode)</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('product_price')]" position="after">
|
||||
<div t-if="request.env.user._is_public() and request.website.active_b2b_mode" class="as-b2b-price">
|
||||
<a role="button" href="/web/login" t-attf-class="#{'as_login_popup' if request.website.active_login_popup else ''}">
|
||||
<i class="asi asi-lock"></i> <span>Login for price</span>
|
||||
</a>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<!-- Load More: START -->
|
||||
<xpath expr="//form[hasclass('oe_product_cart')]" position="inside">
|
||||
<input type="hidden" name="product_ref_id" class="product_ref_id" t-att-value="product.id"/>
|
||||
</xpath>
|
||||
<xpath expr="//t[@t-set='product_href']" position="attributes">
|
||||
<attribute name="t-if">pager</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//t[@t-set='product_href']" position="after">
|
||||
<t t-else="" t-set="product_href" t-value="keep(product.website_url)" />
|
||||
</xpath>
|
||||
<!-- Load More: END -->
|
||||
<!-- Color Icon and Offer Timer: START -->
|
||||
<xpath expr="//div[hasclass('product_price')]" position="after">
|
||||
<div t-if="product.have_color_attribute and website.active_shop_color_variant" class="as-color-variant">
|
||||
<ul>
|
||||
<t t-foreach="product.get_variant_color_images()" t-as="vc">
|
||||
<li t-att-data-product_tmpl_id="product.id">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag p-3" t-attf-style="background-image: url({{vc}}); background-size: cover;">
|
||||
<span t-att-data-color-image="vc" />
|
||||
</label>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
<t t-set="offer_timer" t-value="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
<div t-if="website.active_product_offer_timer and offer_timer" class="as-product-offer-time">
|
||||
<div class="as_offer_timer" t-att-data-offer="offer_timer"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<!-- Color Icon and Offer Timer: END -->
|
||||
<!-- Similar Product and Quick View and Label: START -->
|
||||
<xpath expr="//div[hasclass('oe_product_image')]" position="inside">
|
||||
<div class="as-product-card-actions">
|
||||
<a t-if="website.active_shop_quick_view" href="#" role="button" class="btn btn-primary as_quick_view" t-att-data-product_tmpl_id="product.id" title="Quick View">
|
||||
<span class="fa fa-eye"/>
|
||||
</a>
|
||||
<a t-if="product.alternative_product_ids and website.active_shop_similar_product" href="#"
|
||||
role="button" class="btn btn-primary as_similar_product"
|
||||
t-att-data-product_tmpl_id="product.id" title="Similar Product">
|
||||
<span class="fa fa-search"/>
|
||||
</a>
|
||||
</div>
|
||||
<t t-if="website.active_shop_label" t-call="theme_alan.product_label"/>
|
||||
</xpath>
|
||||
<!-- Similar Product and Quick View and Label: END -->
|
||||
<!-- Out of Stock Labels: START -->
|
||||
<xpath expr="//div[hasclass('o_wsale_product_sub')]" position="after">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order
|
||||
and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1
|
||||
and website.active_shop_stock_info">
|
||||
<div id="out_of_stock_message" class="as-product-stock-message">
|
||||
<span>Out of stock</span>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
<!-- Out of Stock Labels: END -->
|
||||
<!-- Hover Image: START -->
|
||||
<xpath expr="//span[hasclass('oe_product_image_img_wrapper')]" position="after">
|
||||
<div t-if="product.hover_image and website.active_shop_hover_image" class="as-hover-image">
|
||||
<span t-field="product.hover_image" t-options="{'widget': 'image'}"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<!-- Hover Image: END -->
|
||||
<!-- Brand, Rating Info : START -->
|
||||
<xpath expr="//h6[hasclass('o_wsale_products_item_title')]" position="before">
|
||||
<span t-if="is_view_active('website_sale.product_comment') and product.sudo().rating_avg and website.active_shop_rating" class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.sudo().rating_avg % 1 == 0"><t t-esc="int(product.sudo().rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
<div t-if="website.active_shop_brand_info" class="as-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
</xpath>
|
||||
<!-- Brand, Rating Info: END -->
|
||||
</template>
|
||||
|
||||
<!-- Load More: START -->
|
||||
<template id="as_shop_products" name="Lazy Load More Products" inherit_id="website_sale.products">
|
||||
<xpath expr="//tr[@t-foreach='bins']//t//div" position="replace">
|
||||
<div t-attf-class="o_wsale_product_grid_wrapper as_color_variant position-relative h-100 o_wsale_product_grid_wrapper_#{td_product['x']}_#{td_product['y']}">
|
||||
<t t-call="website_sale.products_item">
|
||||
<t t-set="product" t-value="td_product['product']"/>
|
||||
</t>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('products_pager')]" position="before">
|
||||
<t t-if="website.active_load_more">
|
||||
<div class="as-shop-load-more">
|
||||
<a href="#" class="btn btn-primary" id="loadMoreproducts">Load More</a>
|
||||
<span class="all_loaded d-none"/>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('products_pager')]" position="attributes">
|
||||
<attribute name="t-attf-style">#{'display:none !important;' if as_shop and website.active_load_more else ''}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('products_pager')]" position="after">
|
||||
<div t-if="website.active_load_more" class="alan_pager d-none">
|
||||
<t t-call="website.pager">
|
||||
<t t-set="pager" t-value="alan_pager"/>
|
||||
</t>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="as_load_more_pager" name="Lazy Load More Pager" inherit_id="website.pager">
|
||||
<xpath expr="//ul/t/li[contains(@t-attf-class, 'page-item')]" position="attributes">
|
||||
<attribute name="t-att-data-prd_ids">page.get('prd_ids')</attribute>
|
||||
<attribute name="t-att-data-ppr">ppr</attribute>
|
||||
<attribute name="t-att-data-ppg">ppg</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="shop_page_next_products" name="Shop next Products">
|
||||
<tr t-foreach="bins" t-as="tr_product">
|
||||
<t t-foreach="tr_product" t-as="td_product">
|
||||
<t t-if="td_product">
|
||||
<td t-att-colspan="td_product['x'] != 1 and td_product['x']"
|
||||
t-att-rowspan="td_product['y'] != 1 and td_product['y']"
|
||||
t-attf-class="oe_product"
|
||||
t-att-data-ribbon-id="td_product['ribbon'].id"
|
||||
data-name="Product">
|
||||
<div t-attf-class="o_wsale_product_grid_wrapper as_color_variant position-relative h-100 o_wsale_product_grid_wrapper_#{td_product['x']}_#{td_product['y']}">
|
||||
<t t-call="website_sale.products_item">
|
||||
<t t-set="product" t-value="td_product['product']"/>
|
||||
</t>
|
||||
</div>
|
||||
</td>
|
||||
</t>
|
||||
<td t-else=""/>
|
||||
</t>
|
||||
</tr>
|
||||
</template>
|
||||
<!-- Load More: END -->
|
||||
|
||||
<!-- Shop Attributes Filter:Start -->
|
||||
<template id="as_rating_loop">
|
||||
<t t-foreach="range(1,ratings)" t-as="rating">
|
||||
<label class="form-check">
|
||||
<input class="form-check-input" t-attf-id="rating_{{rating}}" type="checkbox" name="rating" t-att-value="rating" t-att-checked="'checked' if rating in rating_set else None" t-att-title="rating" />
|
||||
<span t-attf-class="form-check-label as_rating_attr star-{{rating}} #{'active' if rating in rating_set else ''}" t-attf-for="rating_{{rating}}">
|
||||
<span t-esc="rating"/>
|
||||
<i class="fa fa-star-o"/>
|
||||
& up
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="as_brand_loop">
|
||||
<t t-foreach="brands" t-as="brand">
|
||||
<label t-attf-class="as_brand_attr_image #{'active' if brand.id in brand_set else ''} as_attr" t-att-data-name="brand.name">
|
||||
<img t-att-src="request.website.image_url(brand,'image_128')"/>
|
||||
<input type="checkbox" name="brand" t-att-value="brand.id" t-att-checked="'checked' if brand.id in brand_set else None" t-att-title="brand.name" />
|
||||
</label>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="as_product_att_brands_offcanvas" name="Alan Product Brands Attributes">
|
||||
<t t-set="brand_status" t-value="'inactive'"/>
|
||||
<t t-foreach="brands" t-as="b" t-if="b.id in brand_set" t-set="brand_status" t-value="'active'"/>
|
||||
<div t-if="brands"
|
||||
t-attf-class="accordion-item {{(brand_status == 'active') and 'order-1' or 'order-2'}}">
|
||||
<h2 class="accordion-header mb-0" id="o_wsale_offcanvas_brands_header">
|
||||
<button t-attf-class="o_wsale_offcanvas_title accordion-button rounded-0 {{ not brand_set and 'collapsed'}}"
|
||||
type="button"
|
||||
t-att-data-status="brand_status"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#o_wsale_offcanvas_brands"
|
||||
t-att-aria-expanded="brand_status == 'active' and 'True' or 'False'"
|
||||
aria-controls="o_wsale_offcanvas_brands">
|
||||
<b>Brands</b>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="o_wsale_offcanvas_brands"
|
||||
t-attf-class="accordion-collapse collapse {{ (brand_status == 'active') and 'show'}}"
|
||||
t-att-aria-expanded="(brand_status == 'active') and 'True' or 'False'"
|
||||
aria-labelledby="o_wsale_offcanvas_brands_header">
|
||||
<div class="accordion-body">
|
||||
<div t-if="website.active_attribute_search" class="as-aside-attr-search">
|
||||
<input class="form-control as_attribute_search as_filter_search" placeholder="Search" type="text"/>
|
||||
<i class="fa fa-search"/>
|
||||
</div>
|
||||
<div class="as-aside-brand-list as-aside-scroll">
|
||||
<t t-call="theme_alan.as_brand_loop"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_product_att_ratings_offcanvas" name="Alan Product Rating Attributes">
|
||||
<t t-set="rating_status" t-value="'active' if len(rating_set) else 'inactive'"/>
|
||||
<div t-if="ratings != 1"
|
||||
t-attf-class="accordion-item border-top-0 {{(rating_status == 'active') and 'order-1' or 'order-2'}}">
|
||||
<h2 class="accordion-header mb-0" id="o_wsale_offcanvas_attribute_rating_header">
|
||||
<button t-attf-class="o_wsale_offcanvas_title accordion-button rounded-0 {{ not rating_set and 'collapsed'}}"
|
||||
type="button"
|
||||
t-att-data-status="rating_status"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#o_wsale_offcanvas_rating"
|
||||
t-att-aria-expanded="rating_status == 'active' and 'True' or 'False'"
|
||||
aria-controls="o_wsale_offcanvas_attribute_rating">
|
||||
<b>Rating</b>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="o_wsale_offcanvas_rating"
|
||||
t-attf-class="accordion-collapse collapse {{ (rating_status == 'active') and 'show'}}"
|
||||
t-att-aria-expanded="(rating_status == 'active') and 'True' or 'False'"
|
||||
aria-labelledby="o_wsale_offcanvas_attribute_rating_header">
|
||||
<div class="accordion-body">
|
||||
<div class="as-aside-star-list">
|
||||
<t t-call="theme_alan.as_rating_loop"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_product_att_brands" name="Alan Product Brands Attributes">
|
||||
<t t-set="brand_status" t-value="'inactive'"/>
|
||||
<t t-foreach="brands" t-as="b" t-if="b.id in brand_set" t-set="brand_status" t-value="'active'"/>
|
||||
<div class="accordion-item nav-item" t-if="brands">
|
||||
<h6 class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#o_products_attributes_brands" aria-expanded="false" aria-controls="o_products_attributes_brands" style="display: flex;">
|
||||
<b class="o_products_attributes_title d-none d-lg-block" >Brands</b>
|
||||
<i class="f-arrow"></i>
|
||||
</h6>
|
||||
<div id="o_products_attributes_brands" t-attf-class="accordion-collapse collapse {{'show' if len(brand_set) else ''}}">
|
||||
<div class="accordion-body">
|
||||
<div t-if="website.active_attribute_search" class="as-aside-attr-search">
|
||||
<input class="form-control as_filter_search" placeholder="Search" type="text"/>
|
||||
<i class="fa fa-search"/>
|
||||
</div>
|
||||
<div class="as-aside-brand-list as-aside-scroll">
|
||||
<t t-call="theme_alan.as_brand_loop"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_product_att_ratings" name="Alan Product Rating Attributes">
|
||||
<t t-set="rating_status" t-value="'active' if len(rating_set) else 'inactive'"/>
|
||||
<div class="accordion-item nav-item" t-if="ratings != 1">
|
||||
<h6 class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#o_products_attributes_ratings" aria-expanded="false" aria-controls="o_products_attributes_ratings" style="display: flex;">
|
||||
<b class="o_products_attributes_title d-none d-lg-block">Ratings</b>
|
||||
<i class="f-arrow"></i>
|
||||
</h6>
|
||||
<div id="o_products_attributes_ratings" t-attf-class="accordion-collapse collapse {{'show' if len(rating_set) else ''}}">
|
||||
<div class="accordion-body">
|
||||
<div class="as-aside-star-list">
|
||||
<t t-call="theme_alan.as_rating_loop"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_products_attributes" name="Alan Product Attributes" inherit_id="website_sale.products_attributes">
|
||||
<xpath expr="//div[@id='wsale_products_attributes_collapse']" position="replace">
|
||||
<div id="wsale_products_attributes_collapse"
|
||||
class=" position-relative">
|
||||
<form t-if="attributes or all_tags" class="js_attributes position-relative mb-2" method="get">
|
||||
<input t-if="category" type="hidden" name="category" t-att-value="category.id" />
|
||||
<input type="hidden" name="search" t-att-value="search" />
|
||||
<input type="hidden" name="order" t-att-value="order"/>
|
||||
<a t-if="not website.active_shop_clear_filter and (attrib_values or tags)" t-att-href="keep('/shop'+ ('/category/'+slug(category)) if category else None, attrib=0, tags=0)" t-attf-class="btn btn-{{navClass}} d-flex py-1 mb-2">
|
||||
<small class="mx-auto"><b>Clear Filters</b></small>
|
||||
<i class="oi oi-close"/>
|
||||
</a>
|
||||
<t t-foreach="attributes" t-as="a">
|
||||
<t t-cache="a,attrib_set">
|
||||
<div class="accordion-item nav-item" t-if="a.value_ids and len(a.value_ids) > 1">
|
||||
<h6 class="accordion-button collapsed" data-bs-toggle="collapse" t-attf-data-bs-target="#o_products_attributes_{{a.id}}" aria-expanded="false" t-attf-aria-controls="o_products_attributes_{{a.id}}" style="display: flex;">
|
||||
<b class="o_products_attributes_title d-none d-lg-block" t-field="a.name"/>
|
||||
<i class="f-arrow"></i>
|
||||
</h6>
|
||||
<div t-attf-id="o_products_attributes_{{a.id}}" t-attf-class="accordion-collapse collapse {{'show' if len(attrib_values) else ''}}">
|
||||
<div class="accordion-body">
|
||||
<div t-if="a.display_type not in ('select',) and website.active_attribute_search" class="as-aside-attr-search">
|
||||
<input class="form-control as_attribute_search as_filter_search" placeholder="Search" type="text"/>
|
||||
<i class="fa fa-search"/>
|
||||
</div>
|
||||
<t t-if="a.display_type == 'select'">
|
||||
<select class="form-select css_attribute_select mb-2" name="attrib">
|
||||
<option value="" selected="true">-</option>
|
||||
<t t-foreach="a.value_ids" t-as="v">
|
||||
<option t-att-value="'%s-%s' % (a.id,v.id)" t-esc="v.name" t-att-selected="v.id in attrib_set">
|
||||
(<span t-esc="attr_count.get(v.id)"/>)
|
||||
</option>
|
||||
</t>
|
||||
</select>
|
||||
</t>
|
||||
<div t-elif="a.display_type == 'color'" class="as-aside-color-list as-aside-scroll">
|
||||
<t t-call="website_sale.o_wsale_offcanvas_color_attribute"/>
|
||||
</div>
|
||||
<div t-elif="a.display_type in ('radio', 'pills', 'multi')" class="flex-column as-aside-scroll">
|
||||
<t t-foreach="a.value_ids" t-as="v">
|
||||
<div class="form-check mb-1">
|
||||
<input type="checkbox" name="attrib" class="form-check-input" t-att-id="'%s-%s' % (a.id,v.id)" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="'checked' if v.id in attrib_set else None"/>
|
||||
<label class="form-check-label fw-normal" t-att-for="'%s-%s' % (a.id,v.id)" t-field="v.name"/>
|
||||
<t t-if="website.active_attribute_count">(<span t-esc="attr_count.get(v.id)"/>)</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="opt_wsale_filter_tags and opt_wsale_attributes" t-call="website_sale.filter_products_tags">
|
||||
<t t-set="all_tags" t-value="all_tags"/>
|
||||
</t>
|
||||
<t t-if="len(brands) and website.active_brand_filter" t-call="theme_alan.as_product_att_brands"/>
|
||||
<t t-if="ratings != 1 and website.active_rating_filter" t-call="theme_alan.as_product_att_ratings"/>
|
||||
<div t-if="request.website.active_stock_only" class="as-product-stock">
|
||||
<a class="active" t-if="stock_only" t-att-href="keep('/shop', stock='inactive')"><span>Hide Out Of Stock</span></a>
|
||||
<a class="inactive" t-else="" t-att-href="keep('/shop', stock='active')"><span>Hide Out Of Stock</span></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="as_o_wsale_offcanvas" name="Website Offcanvas Extend" inherit_id="website_sale.o_wsale_offcanvas">
|
||||
<xpath expr="//form" position="inside">
|
||||
<t t-if="len(brands) and website.active_brand_filter" t-call="theme_alan.as_product_att_brands_offcanvas"/>
|
||||
<t t-if="ratings != 1 and website.active_rating_filter" t-call="theme_alan.as_product_att_ratings_offcanvas"/>
|
||||
</xpath>
|
||||
<xpath expr="//t[@t-foreach='attributes']//div[hasclass('accordion-body')]/div" position="before">
|
||||
<div t-if="website.active_attribute_search" class="as-aside-attr-search">
|
||||
<input class="form-control as_attribute_search as_filter_search" placeholder="Search" type="text"/>
|
||||
<i class="fa fa-search"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//form[contains(@t-attf-class, 'js_attributes')]//div[hasclass('form-check')]" position="inside">
|
||||
<t t-if="website.active_attribute_count">
|
||||
(<span t-esc="attr_count.get(v.id)"/>)
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//div[@t-if='all_tags']" position="attributes">
|
||||
<attribute name="class" separator=" " add="accordion-item" />
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="filter_products_price" name="Price Filter Extend" inherit_id="website_sale.filter_products_price">
|
||||
<xpath expr="//div[@id='o_wsale_price_range_option']" position="after">
|
||||
<div class="oe_structure" t-field="request.website.shop_special_offer" data-editor-message="Drag and drop the snippet here"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="categorie_link_product_count" name="Alan Category Counts" inherit_id="website_sale.categorie_link">
|
||||
<xpath expr="//div[hasclass('form-check')]" position="inside">
|
||||
<t t-if="website.active_attribute_count">
|
||||
(<span t-esc="category_count.get(c.id)"/>)
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Product Tags -->
|
||||
<template id="theme_alan_products_tag" inherit_id="website_sale.filter_products_tags" name="Theme Alan Tags">
|
||||
<xpath expr="//div[contains(@t-if,'all_tags')]" position="replace">
|
||||
<div class="accordion-item nav-item" t-if="all_tags">
|
||||
<h6 class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#o_products_attributes_tags" aria-expanded="false" aria-controls="o_products_attributes_tags" style="display: flex;">
|
||||
<b class="o_products_attributes_title d-none d-lg-block">Tags</b>
|
||||
<i class="f-arrow"></i>
|
||||
</h6>
|
||||
<div id="o_products_attributes_tags" t-attf-class="accordion-collapse collapse">
|
||||
<div class="accordion-body">
|
||||
<div t-if="website.active_attribute_search" class="as-aside-attr-search">
|
||||
<input class="form-control as_tag_search as_filter_search" placeholder="Search" type="text"/>
|
||||
<i class="fa fa-search"/>
|
||||
</div>
|
||||
<div class="as-aside-scroll">
|
||||
<t t-call="website_sale.filter_products_tags_list">
|
||||
<t t-set="all_tags" t-value="all_tags"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="filter_products_tags_list_product_count" name="Alan Tag Counts" inherit_id="website_sale.filter_products_tags_list">
|
||||
<xpath expr="//div[hasclass('form-check')]" position="inside">
|
||||
<t t-if="website.active_attribute_count">
|
||||
(<span t-esc="tag_count.get(tag.id)"/>)
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
<!-- Shop Attributes Filter:END -->
|
||||
|
||||
<!-- Shop Page Layout -->
|
||||
<template id="as_shop_style_layout" name="Shop Style" inherit_id="website.snippet_options">
|
||||
<xpath expr="//div[@data-js='OptionsTab']/we-collapse" position="after">
|
||||
<we-title>Alan Shop Setting</we-title>
|
||||
<we-select string="Shop Style" data-variable="shop-template">
|
||||
<we-button title="Default"
|
||||
data-name="button_shop0_opt"
|
||||
data-customize-website-variable="'alan_shop0'">Default</we-button>
|
||||
<we-button title="Shadow"
|
||||
data-name="button_shop1_opt"
|
||||
data-customize-website-variable="'alan_shop1'">Shadow</we-button>
|
||||
<we-button title="Glass Blur"
|
||||
data-name="button_shop2_opt"
|
||||
data-customize-website-variable="'alan_shop2'">Glass Blur</we-button>
|
||||
<we-button title="Simple"
|
||||
data-name="button_shop3_opt"
|
||||
data-customize-website-variable="'alan_shop3'">Simple</we-button>
|
||||
<we-button title="Modern"
|
||||
data-name="button_shop4_opt"
|
||||
data-customize-website-variable="'alan_shop4'">Modern</we-button>
|
||||
<we-button title="Clean"
|
||||
data-name="button_shop5_opt"
|
||||
data-customize-website-variable="'alan_shop5'">Clean</we-button>
|
||||
<we-button title="Trendy"
|
||||
data-name="button_shop6_opt"
|
||||
data-customize-website-variable="'alan_shop6'">Trendy</we-button>
|
||||
</we-select>
|
||||
|
||||
<we-select string="Shop Layout" data-variable="shop-layout">
|
||||
<we-button title="Alan Shop Full Layout"
|
||||
data-name="shop_layout_opt1"
|
||||
data-customize-website-variable="'alan_shop_layout_full'">Full</we-button>
|
||||
<we-button title="Alan Shop Box Layout"
|
||||
data-name="shop_layout_opt2"
|
||||
data-customize-website-variable="'alan_shop_layout_box'">Box</we-button>
|
||||
</we-select>
|
||||
|
||||
<we-select string="Product Images Size" data-variable="shop-img-size">
|
||||
<we-button title="Default (1/1)"
|
||||
data-name="shop_img_size1_1"
|
||||
data-customize-website-variable="'alan_shop_img_size_1_1'">Default (1/1)</we-button>
|
||||
<we-button title="Landscape (4/3)"
|
||||
data-name="shop_img_size4_3"
|
||||
data-customize-website-variable="'alan_shop_img_size4_3'">Landscape (4/3)</we-button>
|
||||
<we-button title="Portrait (4/5)"
|
||||
data-name="shop_img_size4_5"
|
||||
data-customize-website-variable="'alan_shop_img_size4_5'">Portrait (4/5)</we-button>
|
||||
<we-button title="Vertical (2/3)"
|
||||
data-name="shop_img_size2_3"
|
||||
data-customize-website-variable="'alan_shop_img_size2_3'">Vertical (2/3)</we-button>
|
||||
</we-select>
|
||||
|
||||
<we-select string="Product Images Fill" data-variable="shop-img-fill">
|
||||
<we-button title="Cover"
|
||||
data-name="shop_img_fil_cover"
|
||||
data-customize-website-variable="'alan_shop_img_fill_cover'">Cover</we-button>
|
||||
<we-button title="Contain"
|
||||
data-name="shop_img_fill_contain"
|
||||
data-customize-website-variable="'alan_shop_img_fill_contain'">Contain</we-button>
|
||||
</we-select>
|
||||
|
||||
<we-title>Alan Product Page Setting</we-title>
|
||||
<we-select string="Product Detail Layout" data-variable="product-detail-layout">
|
||||
<we-button title="Alan Product Detail Full Layout"
|
||||
data-name="product_detail_layout_opt1"
|
||||
data-customize-website-variable="'alan_product_detail_layout_full'">Full</we-button>
|
||||
<we-button title="Alan Product Detail Box Layout"
|
||||
data-name="product_detail_layout_opt2"
|
||||
data-customize-website-variable="'alan_product_detail_layout_box'">Box</we-button>
|
||||
</we-select>
|
||||
|
||||
<we-select string="Product Detail Style" data-variable="product-detail-style">
|
||||
<we-button title="Default"
|
||||
data-name="button_product0_opt"
|
||||
data-customize-website-variable="'alan_product0'">Default</we-button>
|
||||
<we-button title="Shadow"
|
||||
data-name="button_product1_opt"
|
||||
data-customize-website-variable="'alan_product1'">Shadow</we-button>
|
||||
<we-button title="Clean"
|
||||
data-name="button_product2_opt"
|
||||
data-customize-website-variable="'alan_product2'">Clean</we-button>
|
||||
<we-button title="Simple"
|
||||
data-name="button_product3_opt"
|
||||
data-customize-website-variable="'alan_product3'">Simple</we-button>
|
||||
<we-button title="Modern"
|
||||
data-name="button_product4_opt"
|
||||
data-customize-website-variable="'alan_product4'">Modern</we-button>
|
||||
<we-button title="Trendy"
|
||||
data-name="button_product5_opt"
|
||||
data-customize-website-variable="'alan_product5'">Trendy</we-button>
|
||||
</we-select>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Rating Info Template-->
|
||||
<template id="as_rating_template" name="Rating Template">
|
||||
<t t-if="request.website.active_shop_rating">
|
||||
<span t-if="is_view_active('website_sale.product_comment') and product.rating_avg" class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Category Slider -->
|
||||
<template id="as_shop_filmstrip_categories" name="AS Shop Filmstrip Category" inherit_id="website_sale.filmstrip_categories">
|
||||
<xpath expr="//ul" position="replace">
|
||||
<!-- Top Category Slider -->
|
||||
<div class="o_wsale_filmstip as_wsale_filmstip swiper">
|
||||
<t t-foreach="entries" t-as="c" t-if="c.image_128" t-set="atLeastOneImage" t-value="True"/>
|
||||
<t t-if="category.parent_id" t-set="backUrl" t-value="keep('/shop/category/' + slug(category.parent_id), category=0)"/>
|
||||
<t t-else="" t-set="backUrl" t-value="'/shop'"/>
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<div t-foreach="entries" t-as="c"
|
||||
t-attf-class="swiper-slide {{'' if not c_last else ''}}"
|
||||
t-att-data-link-href="keep('/shop/category/' + slug(c), category=0)">
|
||||
<input type="radio" t-attf-name="wsale_categories_top_radios_{{parentCategoryId}}" class="btn-check pe-none" t-att-id="c.id" t-att-value="c.id" t-att-checked="'true' if c.id == category.id else None"/>
|
||||
|
||||
<div t-attf-class="as-filmstip-cat {{navClass}} {{'' if c.image_128 else ''}} {{ 'border-primary' if c.id == category.id else '' }}" t-att-for="c.id">
|
||||
<div t-if="c.image_256"
|
||||
t-attf-style="background-image:url('data:image/png;base64,#{c.image_256}')"
|
||||
class="o_image_40_cover oe_img_bg o_bg_img_center"
|
||||
t-att-alt="c.name "/>
|
||||
<span t-field="c.name"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Similar Product Template -->
|
||||
<template id="as_similar_product" name="Similar Product">
|
||||
<div class="m_c_box as-similar-product-box">
|
||||
<div class="as-modal-header">
|
||||
<h5>Similar Products</h5>
|
||||
<button class="btn-close as_close">
|
||||
</button>
|
||||
</div>
|
||||
<div t-if="not products" class="as-similar-empty">
|
||||
<div class="img">
|
||||
<svg width="527" height="405" viewBox="0 0 527 405" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 200px;height: auto;">
|
||||
<path d="M41.634 370.844C54.0624 393.893 80.44 403.787 80.44 403.787C80.44 403.787 86.6671 376.312 74.2387 353.263C61.8103 330.214 35.4327 320.319 35.4327 320.319C35.4327 320.319 29.2056 347.795 41.634 370.844Z" fill="#2F2E41" />
|
||||
<path d="M419.647 297.511C400.271 315.126 397.022 343.11 397.022 343.11C397.022 343.11 425.188 342.535 444.565 324.921C463.941 307.306 467.19 279.321 467.19 279.321C467.19 279.321 439.024 279.896 419.647 297.511Z" fill="#2F2E41" />
|
||||
<path d="M50.1765 363.261C72.6149 376.761 81.2567 403.575 81.2567 403.575C81.2567 403.575 53.5186 408.502 31.0802 395.002C8.64174 381.502 0 354.688 0 354.688C0 354.688 27.7381 349.761 50.1765 363.261Z" fill="var(--primary)" />
|
||||
<path d="M429.065 303.975C421.368 329.005 397.425 343.852 397.425 343.852C397.425 343.852 385.962 318.117 393.659 293.087C401.356 268.058 425.298 253.211 425.298 253.211C425.298 253.211 436.762 278.946 429.065 303.975Z" fill="var(--primary)" />
|
||||
<path d="M362.06 360.29H125.274V358.587H360.356V275.967H145.18L134.727 254.19L136.263 253.453L146.252 274.263H362.06V360.29Z" fill="#2F2E41" />
|
||||
<path d="M156.789 402.026C166.667 402.026 174.675 394.018 174.675 384.139C174.675 374.26 166.667 366.252 156.789 366.252C146.91 366.252 138.902 374.26 138.902 384.139C138.902 394.018 146.91 402.026 156.789 402.026Z" fill="#3F3D56" />
|
||||
<path d="M333.101 402.026C342.979 402.026 350.987 394.018 350.987 384.139C350.987 374.26 342.979 366.252 333.101 366.252C323.222 366.252 315.214 374.26 315.214 384.139C315.214 394.018 323.222 402.026 333.101 402.026Z" fill="#3F3D56" />
|
||||
<path d="M387.385 247.859H121.237L63.6484 59.6227H446.693L446.344 60.7302L387.385 247.859ZM122.497 246.156H386.136L444.37 61.3262H65.9508L122.497 246.156Z" fill="#2F2E41" />
|
||||
<path d="M366.61 238.064H132.842L82.26 71.121H418.701L418.395 72.104L366.61 238.064Z" fill="#F2F2F2" />
|
||||
<path d="M451.465 42.806L449.818 42.369L461.059 0H526.448V1.70398H462.37L451.465 42.806Z" fill="#2F2E41" />
|
||||
<path d="M427.552 116.69H82.2584V118.393H427.552V116.69Z" fill="#2F2E41" />
|
||||
<path d="M407.777 179.45H101.459V181.153H407.777V179.45Z" fill="#2F2E41" />
|
||||
<path d="M256.017 60.4744H254.314V247.007H256.017V60.4744Z" fill="#2F2E41" />
|
||||
<path d="M332.286 60.421L320.057 246.949L321.758 247.061L333.986 60.5324L332.286 60.421Z" fill="#2F2E41" />
|
||||
<path d="M178.081 60.419L176.38 60.5298L188.538 247.063L190.238 246.952L178.081 60.419Z" fill="#2F2E41" />
|
||||
</svg>
|
||||
</div>
|
||||
<p>No Similar Product Found!</p>
|
||||
</div>
|
||||
<div t-else="" class="as-similar-product-list">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<t t-set="combination_info"
|
||||
t-value="product._get_combination_info(combination, add_qty=1)"/>
|
||||
<div class="as-similar-product">
|
||||
<a class="link-overlay" target='_blank' t-attf-href="/shop/product/#{slug(product)}"/>
|
||||
<div class="sim-pro-img">
|
||||
<img t-att-src="website.image_url(product, 'image_512')" title="" alt="" />
|
||||
</div>
|
||||
<div class="sim-pro-body">
|
||||
<h4><t t-esc="product.name"/></h4>
|
||||
<div t-if="product.product_variant_ids and not (request.env.user._is_public() and request.website.active_b2b_mode)" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price">
|
||||
<del t-attf-class="text-danger mr-2 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
|
||||
<span t-if="combination_info['price']" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
<span itemprop="price" style="display:none;" t-esc="combination_info['price']" />
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Quick View Template -->
|
||||
<template id="as_quick_view" name="Quick Views">
|
||||
<t t-set="combination" t-value="product._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<t t-set="additional_title" t-value="product.name"/>
|
||||
<div itemscope="itemscope" itemtype="http://schema.org/Product" id="wrap" class="js_sale o_wsale_product_page quick-view">
|
||||
<button class="btn-close as_close"></button>
|
||||
<section id="product_detail"
|
||||
t-attf-class="container py-4 oe_website_sale #{'discount' if combination_info['has_discounted_price'] else ''}"
|
||||
t-att-data-view-track="view_track and '1' or '0'"
|
||||
t-att-data-product-tracking-info="'product_tracking_info' in combination_info and json.dumps(combination_info['product_tracking_info'])">
|
||||
<div class="row" id="product_detail_main" data-name="Product Page"
|
||||
t-att-data-image_width="website.product_page_image_width"
|
||||
t-att-data-image_layout="website.product_page_image_layout">
|
||||
<t t-set="image_cols" t-value="website._get_product_page_proportions()"/>
|
||||
<div t-attf-class="col-lg-#{image_cols[0]} mt-lg-4 o_wsale_product_images position-relative" t-if="website.product_page_image_width != 'none'">
|
||||
<t t-call="website_sale.shop_product_images"/>
|
||||
</div>
|
||||
<div t-attf-class="col-lg-#{image_cols[1]} mt-md-4" id="product_details">
|
||||
<t t-set="base_url" t-value="product.get_base_url()"/>
|
||||
<t t-if="request.website.active_product_label">
|
||||
<t t-set="labels" t-value="product.sudo().pro_label_line_ids.filtered(lambda l: l.website_id.id == website.id)"/>
|
||||
<t t-if="labels" t-call="theme_alan.label_layout_option"/>
|
||||
</t>
|
||||
<h1 itemprop="name" t-field="product.name">Product Name</h1>
|
||||
<span itemprop="url" style="display:none;" t-esc="base_url + product.website_url"/>
|
||||
<span itemprop="image" style="display:none;" t-esc="base_url + website.image_url(product, 'image_1920')" />
|
||||
<t t-if="is_view_active('website_sale.product_comment')">
|
||||
<a href="#o_product_page_reviews" class="o_product_page_reviews_link text-decoration-none">
|
||||
<t t-call="portal_rating.rating_widget_stars_static">
|
||||
<t t-set="rating_avg" t-value="product.sudo().rating_avg"/>
|
||||
<t t-set="trans_text_plural">%s reviews</t>
|
||||
<t t-set="trans_text_singular">%s review</t>
|
||||
<t t-set="rating_count" t-value="(trans_text_plural if product.rating_count > 1 else trans_text_singular) % product.rating_count"/>
|
||||
</t>
|
||||
</a>
|
||||
</t>
|
||||
<p t-field="product.description_sale" class="text-muted my-2" placeholder="A short description that will also appear on documents." />
|
||||
<div t-field="product.description_ecommerce" class="oe_structure"
|
||||
placeholder="A detailed, formatted description to promote your product on this page. Use '/' to discover more features."/>
|
||||
<form t-if="product._is_add_to_cart_possible()" action="/shop/cart/update" method="POST">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
||||
<input id="wsale_user_email" type="hidden" t-att-value="user_email"/>
|
||||
<div class="js_product js_main_product mb-3">
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
<t t-set="offer_timer" t-value="product_variant.sudo()._get_offer_timing(website._get_current_pricelist())"/>
|
||||
<t t-if="request.website.active_product_offer_timer and offer_timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="offer_timer"/>
|
||||
</t>
|
||||
<div t-if="request.website.active_last_month_count" class="as_month_sale_count d-none"/>
|
||||
<div t-if="request.website.active_product_bulk_save" class="as_bulk_save as-bulk-table d-none"/>
|
||||
<t t-placeholder="select">
|
||||
<input type="hidden" class="product_id" name="product_id" t-att-value="product_variant.id" />
|
||||
<input type="hidden" class="product_template_id" name="product_template_id" t-att-value="product.id" />
|
||||
<input t-if="product.public_categ_ids.ids" type="hidden" class="product_category_id" name="product_category_id" t-att-value="product.public_categ_ids.ids[0]" />
|
||||
<t t-if="combination" t-call="website_sale.variants">
|
||||
<t t-set="ul_class" t-valuef="flex-column" />
|
||||
<t t-set="parent_combination" t-value="None" />
|
||||
</t>
|
||||
<t t-else="">
|
||||
<ul class="d-none js_add_cart_variants mb-0" t-att-data-attribute_exclusions="{'exclusions: []'}"/>
|
||||
</t>
|
||||
</t>
|
||||
<div id="o_wsale_cta_wrapper" t-attf-style="{{'display:none !important;' if request.env.user._is_public() and request.website.active_b2b_mode else ''}}" class="d-flex flex-wrap align-items-center">
|
||||
<t t-set="hasQuantities" t-value="false"/>
|
||||
<t t-set="hasBuyNow" t-value="false"/>
|
||||
<t t-set="ctaSizeBig" t-value="not hasQuantities or not hasBuyNow"/>
|
||||
<div t-attf-class="css_quantity input-group {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-flex'}} me-2 mb-2 align-middle #{'input-group-lg' if ctaSizeBig else ''}" contenteditable="false">
|
||||
<a t-attf-href="#" class="btn btn-link js_add_cart_json" aria-label="Remove one" title="Remove one">
|
||||
<i class="fa fa-minus"></i>
|
||||
</a>
|
||||
<input type="text" class="form-control quantity text-center" data-min="1" name="add_qty" t-att-value="add_qty or 1"/>
|
||||
<a t-attf-href="#" class="btn btn-link float_left js_add_cart_json" aria-label="Add one" title="Add one">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div id="add_to_cart_wrap" t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-flex'}} align-items-center mb-2 me-auto">
|
||||
<a role="button" id="add_to_cart" t-attf-class="btn btn-primary js_check_product a-submit flex-grow-1 #{'btn-lg' if ctaSizeBig else ''}" href="#">
|
||||
<i class="fa fa-shopping-cart me-2"/>
|
||||
<span style="font-weight: bold">ADD TO CART</span>
|
||||
</a>
|
||||
<a t-if="is_view_active('website_sale.product_buy_now')" role="button" t-attf-class="btn btn-outline-primary o_we_buy_now ms-1 #{'btn-lg' if ctaSizeBig else ''}" href="#">
|
||||
<i class="fa fa-bolt me-2"/>
|
||||
<span style="font-weight:bold">BUY NOW</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="quick_view" style="display: flex;">
|
||||
<div>
|
||||
<t t-set="in_wish" t-value="product_variant and product_variant._is_in_wishlist()"/>
|
||||
<button t-if="product_variant" type="button" role="button" class="btn btn-link px-0 pe-3 o_add_wishlist_dyn" t-att-disabled='in_wish or None' t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist" title="Add to wishlist" ><i class="fa fa-heart-o me-2" role="img" aria-label="Add to wishlist"/>Add to wishlist</button>
|
||||
<div class="availability_messages o_not_editable"/>
|
||||
</div>
|
||||
<div>
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()"/>
|
||||
<button t-if="product_variant_id and categories"
|
||||
type="button"
|
||||
role="button"
|
||||
class="d-none d-md-block btn btn-link px-0 o_add_compare_dyn"
|
||||
aria-label="Compare"
|
||||
t-att-data-product-product-id="product_variant_id"
|
||||
data-action="o_comparelist">
|
||||
<span class="fa fa-exchange me-2"/>Compare
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contact_us_wrapper"
|
||||
t-attf-class="{{'d-flex' if combination_info['prevent_zero_price_sale'] else 'd-none'}} oe_structure oe_structure_solo #{_div_classes}">
|
||||
<section class="s_text_block" data-snippet="s_text_block" data-name="Text">
|
||||
<div class="container">
|
||||
<a t-att-href="website.contact_us_button_url"
|
||||
class="btn btn-primary btn_cta">Contact Us
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div t-if="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a href="/web/login" t-attf-class="btn btn-primary #{'as_login_popup' if request.website.active_login_popup else ''}"> Login for Price</a>
|
||||
</div>
|
||||
<p t-if="True" class="css_not_available_msg alert alert-warning">This combination does not exist.</p>
|
||||
<p t-elif="not product.active" class="alert alert-warning">This product is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This product has no valid combination.</p>
|
||||
<div id="product_attributes_simple">
|
||||
<t t-set="single_value_attributes" t-value="product.valid_product_template_attribute_line_ids._prepare_single_value_for_display()"/>
|
||||
<table t-attf-class="table table-sm text-muted {{'' if single_value_attributes else 'd-none'}}">
|
||||
<t t-foreach="single_value_attributes" t-as="attribute">
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="attribute.name"/>:
|
||||
<t t-foreach="single_value_attributes[attribute]" t-as="ptal">
|
||||
<span t-field="ptal.product_template_value_ids._only_active().name"/><t t-if="not ptal_last">, </t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<t t-if="is_view_active('website_sale.product_tags')" t-call="website_sale.product_tags">
|
||||
<t t-set="all_product_tags" t-value="product_variant.all_product_tag_ids"/>
|
||||
</t>
|
||||
</div>
|
||||
<div t-if="product.product_brand_id and request.website.active_product_brand" class="as-brand-info">
|
||||
<div class="as-b-avatar">
|
||||
<img t-att-src="request.website.image_url(product.product_brand_id,'image_128')" />
|
||||
</div>
|
||||
<div class="as-b-text">
|
||||
<h6 t-esc="product.product_brand_id.name"/>
|
||||
<p t-esc="product.product_brand_id.brand_description"/>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="len(product.product_offer_ids) and request.website.active_product_advance_info" class="as-offers-box">
|
||||
<ul>
|
||||
<t t-foreach="product.product_offer_ids" t-as="offer">
|
||||
<li t-if="offer.types == 'offer'">
|
||||
<div class="as-offer-icon"><span t-attf-class="fa fa-{{offer.icon}}"/></div>
|
||||
<div class="as-offer-text">
|
||||
<p><strong t-esc="offer.name"/><t t-esc="offer.short_description"/></p>
|
||||
<span class="show_advance_product" t-att-data-info_id="offer.id"> Detail <i class="fa fa-angle-right" /> </span>
|
||||
</div>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="as-pd-extra">
|
||||
<div t-if="request.website.active_product_reference" class="as_product_sku d-none as-pd-lists">
|
||||
<label>SKU: </label>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<t t-if="request.website.active_product_category" t-set="show_categories" t-value="product.public_categ_ids.filtered(lambda x: x.website_id == request.website or not x.website_id)"/>
|
||||
<div t-if="show_categories" class="as-pd-cat-list as-pd-lists">
|
||||
<label>Category: </label>
|
||||
<span t-esc="', '.join(show_categories.mapped('name'))"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pd-q-more-info">
|
||||
<a class="btn btn-primary btn-sm" t-attf-href="/shop/{{slug(product)}}"><i class="fa fa-info-circle"></i> More Information</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Color Dialog -->
|
||||
<template id="as_color_product_dialog" name="Product Variant Color">
|
||||
<div class="container">
|
||||
<div class="row g-3">
|
||||
<t t-foreach="product_variant" t-as="variant_id">
|
||||
<div class="col-lg-3">
|
||||
<div class="as-variant-product-card">
|
||||
<div class="as-vp-media as-media-ratio">
|
||||
<a class="as-media-ratio-wrap" t-att-href="'%s' % (variant_id.website_url)">
|
||||
<img itemprop="image" class="product_detail_img img" t-att-src="'/web/image/product.product/%s/image_512' % variant_id.id" alt="Product Image"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="as-vp-body">
|
||||
<h6 class="as-vp-title"><a t-att-href="'%s' % (variant_id.website_url)"><t t-esc="variant_id.display_name" /></a></h6>
|
||||
<div class="td-price as-vp-price" name="price">
|
||||
<t t-set="combination_info" t-value="variant_id._get_combination_info_variant(add_qty=1)" />
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,224 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="base_blog_slider_01">
|
||||
<div class="as-blog-card-01">
|
||||
<div class="as-blog-card-media">
|
||||
<div class="as-blog-card-media-cover" t-attf-style="background-image:{{blog.cover_background}}"></div>
|
||||
<div class="as-blog-card-meta">
|
||||
<div class="b-date"><i class="fa fa-calendar"></i>
|
||||
<span>
|
||||
<time t-field="blog.write_date" t-options='{"format": "MMM d, yyyy"}' />
|
||||
</span>
|
||||
</div>
|
||||
<div class="b-cat"><i class="fa fa-folder-open"></i>
|
||||
<a t-attf-href="/blog/#{slug(blog.blog_id)}" t-field="blog.blog_id"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="as-blog-card-body">
|
||||
<div t-if="len(blog.tag_ids)" class="b-tags">
|
||||
<t t-foreach="blog.tag_ids" t-as="one_tag">
|
||||
<a t-attf-href="/blog/tag/#{slug(one_tag.sudo())}"
|
||||
t-esc="one_tag.name"/>
|
||||
</t>
|
||||
</div>
|
||||
<h3><a t-attf-href="/blog/#{slug(blog.blog_id)}/#{slug(blog)}"><t t-esc="blog.name"/></a></h3>
|
||||
<p t-esc="blog.subtitle"></p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_blog_slider_02">
|
||||
<div class="as-blog-card-02">
|
||||
<div class="as-blog-card-media">
|
||||
<div class="as-blog-card-media-cover" t-attf-style="background-image:{{blog.cover_background}}"></div>
|
||||
<div class="b-date">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span>
|
||||
<time t-field="blog.write_date" t-options='{"format": "MMM d, yyyy"}' />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="as-blog-card-body">
|
||||
<h3><a t-attf-href="/blog/#{slug(blog.blog_id)}/#{slug(blog)}"><t t-esc="blog.name"/></a></h3>
|
||||
<p t-esc="blog.subtitle"></p>
|
||||
</div>
|
||||
<div class="as-blog-card-meta">
|
||||
<a class="b-read-more" t-attf-href="/blog/#{slug(blog.blog_id)}/#{slug(blog)}">Read More <i class="asi asi-arrow-right"></i></a>
|
||||
<div class="b-cat">
|
||||
<a t-attf-href="/blog/#{slug(blog.blog_id)}" t-field="blog.blog_id"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_blog_slider_03">
|
||||
<div class="as-blog-card-03">
|
||||
<div class="as-blog-card-media">
|
||||
<div class="as-blog-card-media-cover" t-attf-style="background-image:{{blog.cover_background}}"></div>
|
||||
<div class="b-date"><i class="fa fa-calendar"></i>
|
||||
<span>
|
||||
<time t-field="blog.write_date" t-options='{"format": "MMM d, yyyy"}' />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="as-blog-card-body">
|
||||
<div t-if="len(blog.tag_ids)" class="b-tags">
|
||||
<t t-foreach="blog.tag_ids" t-as="one_tag">
|
||||
<a t-attf-href="/blog/tag/#{slug(one_tag.sudo())}"
|
||||
t-esc="one_tag.name"/>
|
||||
</t>
|
||||
</div>
|
||||
<h3><a t-attf-href="/blog/#{slug(blog.blog_id)}/#{slug(blog)}"><t t-esc="blog.name"/></a></h3>
|
||||
<p t-esc="blog.subtitle"></p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_blog_slider_04">
|
||||
<div class="as-blog-card-04">
|
||||
<div class="as-blog-card-media">
|
||||
<div class="as-blog-card-media-cover" t-attf-style="background-image:{{blog.cover_background}}"></div>
|
||||
<div class="as-blog-card-body">
|
||||
<div class="b-date"><i class="fa fa-calendar"></i>
|
||||
<span>
|
||||
<time t-field="blog.write_date" t-options='{"format": "MMM d, yyyy"}' />
|
||||
</span>
|
||||
</div>
|
||||
<h3><a t-attf-href="/blog/#{slug(blog.blog_id)}/#{slug(blog)}"><t t-esc="blog.name"/></a></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_blog_slider_05">
|
||||
<div class="as-blog-card-05">
|
||||
<div class="as-blog-card-media">
|
||||
<div class="as-blog-card-media-cover" t-attf-style="background-image:{{blog.cover_background}}"></div>
|
||||
</div>
|
||||
<div class="as-blog-card-body">
|
||||
<h3><a t-attf-href="/blog/#{slug(blog.blog_id)}/#{slug(blog)}"><t t-esc="blog.name"/></a></h3>
|
||||
<div class="as-blog-card-meta">
|
||||
<div class="b-cat">
|
||||
<a t-attf-href="/blog/#{slug(blog.blog_id)}" t-field="blog.blog_id"/>
|
||||
</div>
|
||||
<div class="b-date">
|
||||
<time t-field="blog.write_date" t-options='{"format": "MMM d, yyyy"}' />
|
||||
</div>
|
||||
</div>
|
||||
<p t-esc="blog.subtitle"></p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_blog_slider_one" name="Blog Slider 1">
|
||||
<t t-call="theme_alan.base_blog_slider_01"/>
|
||||
</template>
|
||||
<template id="as_blog_slider_two" name="Blog Slider 2">
|
||||
<t t-call="theme_alan.base_blog_slider_02"/>
|
||||
</template>
|
||||
<template id="as_blog_slider_three" name="Blog Slider 3">
|
||||
<t t-call="theme_alan.base_blog_slider_03"/>
|
||||
</template>
|
||||
<template id="as_blog_slider_four" name="Blog Slider 4">
|
||||
<t t-call="theme_alan.base_blog_slider_04"/>
|
||||
</template>
|
||||
<template id="as_blog_slider_five" name="Blog Slider 5">
|
||||
<t t-call="theme_alan.base_blog_slider_05"/>
|
||||
</template>
|
||||
|
||||
<template id="s_blog_slider" name="Blog Slider">
|
||||
<div t-attf-class="swiper as_page_swiper" contenteditable="false">
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="records" t-as="blog">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-1'">
|
||||
<t t-call="theme_alan.as_blog_slider_one"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-2'">
|
||||
<t t-call="theme_alan.as_blog_slider_two"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-3'">
|
||||
<t t-call="theme_alan.as_blog_slider_three"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-4'">
|
||||
<t t-call="theme_alan.as_blog_slider_four"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-5'">
|
||||
<t t-call="theme_alan.as_blog_slider_five"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="configuration.get('pagination') != 'scroll_bar'">
|
||||
<div class="swiper-pagination"></div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div class="swiper-scrollbar"></div>
|
||||
</t>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="as_blog_grid_one" name="blog Grid 1">
|
||||
<t t-call="theme_alan.base_blog_slider_01"/>
|
||||
</template>
|
||||
<template id="as_blog_grid_two" name="blog Grid 2">
|
||||
<t t-call="theme_alan.base_blog_slider_02"/>
|
||||
</template>
|
||||
<template id="as_blog_grid_three" name="blog Grid 3">
|
||||
<t t-call="theme_alan.base_blog_slider_03"/>
|
||||
</template>
|
||||
<template id="as_blog_grid_four" name="blog Grid 4">
|
||||
<t t-call="theme_alan.base_blog_slider_04"/>
|
||||
</template>
|
||||
<template id="as_blog_grid_five" name="blog Grid 5">
|
||||
<t t-call="theme_alan.base_blog_slider_05"/>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="s_blog_grid" name="blog Grid">
|
||||
<div class="container">
|
||||
<div t-attf-class="row g-3 as-snippets-row">
|
||||
<t t-foreach="records" t-as="blog">
|
||||
<t t-set="col_mob_size" t-value="configuration.get('default_col_mob')"/>
|
||||
<t t-if="int(configuration.get('default_col_desk')) == 5">
|
||||
<t t-set="col_size" t-value="'five'"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="col_size" t-value="int(12/int(configuration.get('default_col_desk')))"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-1'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_blog_grid_one"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-2'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_blog_grid_two"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-3'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_blog_grid_three"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-4'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_blog_grid_four"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-5'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_blog_grid_five"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="s_brand_product_slider" name="Product Brand Slider">
|
||||
<div class="container">
|
||||
<div t-attf-class="#{configuration.get('slider_style')}">
|
||||
<div class="as-nav-tabs-style">
|
||||
<ul>
|
||||
<t t-set="active_brand" t-value="0"/>
|
||||
<t t-foreach="tab_ids" t-as="tab">
|
||||
<li t-att-data-id="tab.id" t-attf-class="as-tab-name #{'active' if active_brand == 0 else ''}">
|
||||
<span t-esc="tab.name"/>
|
||||
</li>
|
||||
<t t-set="active_brand" t-value="1"/>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="as-tab-content">
|
||||
<t t-set="show_content" t-value="0"/>
|
||||
<t t-foreach="tab_ids" t-as="tab">
|
||||
<t t-set="products" t-value="request.env['product.template'].sudo().search(
|
||||
[('product_brand_id.id', '=', tab.id),('is_published','=',True),('sale_ok','=',True)] + request.website.website_domain(), limit=3)"/>
|
||||
<div t-attf-data-tab-id="brand_{{tab.id}}" t-attf-class="as-tab-pane #{configuration.get('slider_style')} #{'active' if show_content == 0 else ''}">
|
||||
<div t-attf-class="swiper as_brand_products as_page_swiper" contenteditable="false">
|
||||
<t t-set="show_content" t-value="1"/>
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-if="configuration.get('slider_style') == 'as-tab-slider-1'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div class="swiper-slide" >
|
||||
<t t-call="theme_alan.as_product_base_slider_01"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-slider-2'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<t t-call="theme_alan.as_product_base_slider_02"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-slider-3'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<t t-call="theme_alan.as_product_base_slider_03"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-slider-4'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<t t-call="theme_alan.as_product_base_slider_04"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-slider-5'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<t t-call="theme_alan.as_product_base_slider_05"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="configuration.get('pagination') != 'scroll_bar'">
|
||||
<div class="swiper-pagination"></div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div class="swiper-scrollbar"></div>
|
||||
</t>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="s_brand_product_grid" name="Product Grid">
|
||||
<div class="container">
|
||||
<div t-attf-class="#{configuration.get('slider_style')}">
|
||||
<div class="as-nav-tabs-style">
|
||||
<ul>
|
||||
<t t-set="active_brand" t-value="0"/>
|
||||
<t t-foreach="tab_ids" t-as="tab">
|
||||
<li t-att-data-id="tab.id" t-attf-class="as-tab-name #{'active' if active_brand == 0 else ''}">
|
||||
<span t-esc="tab.name"/>
|
||||
</li>
|
||||
<t t-set="active_brand" t-value="1"/>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="as-tab-content">
|
||||
<t t-set="show_content" t-value="0"/>
|
||||
<t t-foreach="tab_ids" t-as="tab">
|
||||
<t t-set="products" t-value="request.env['product.template'].sudo().search(
|
||||
[('product_brand_id.id', '=', tab.id),('is_published','=',True),('sale_ok','=',True)] + request.website.website_domain(), limit=3)"/>
|
||||
|
||||
<t t-set="col_mob_size" t-value="configuration.get('default_col_mob')"/>
|
||||
<t t-if="int(configuration.get('default_col_desk')) == 5">
|
||||
<t t-set="col_size" t-value="'five'"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="col_size" t-value="int(12/int(configuration.get('default_col_desk')))"/>
|
||||
</t>
|
||||
|
||||
<div t-attf-data-tab-id="brand_{{tab.id}}" t-attf-class="as-tab-pane #{'active' if show_content == 0 else ''}">
|
||||
<div t-attf-class="row g-2 g-md-3 as-snippets-row as_brand_products #{configuration.get('grid_style')}" contenteditable="false">
|
||||
<t t-set="show_content" t-value="1"/>
|
||||
<t t-if="configuration.get('grid_style') == 'as-tab-grid-1'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_01"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('grid_style') == 'as-tab-grid-2'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_02"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('grid_style') == 'as-tab-grid-3'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_03"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('grid_style') == 'as-tab-grid-4'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_04"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('grid_style') == 'as-tab-grid-5'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_05"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="base_brand_slider_01">
|
||||
<div class="as-brand as-brand-card-01">
|
||||
<div class="as-brand-card-media">
|
||||
<img t-att-src="request.website.image_url(brand,'image_1024')"/>
|
||||
</div>
|
||||
<div class="as-brand-card-body" t-if="configuration.get('allow_link')">
|
||||
<a t-attf-href="/shop?brand={{brand.id}}"><t t-esc="brand.name"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_brand_slider_02">
|
||||
<div class="as-brand as-brand-card-02">
|
||||
<div class="as-brand-card-media">
|
||||
<img t-att-src="request.website.image_url(brand,'image_1024')"/>
|
||||
</div>
|
||||
<div class="as-brand-card-body" t-if="configuration.get('allow_link')">
|
||||
<a t-attf-href="/shop?brand={{brand.id}}"><t t-esc="brand.name"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="base_brand_slider_03">
|
||||
<div class="as-brand as-brand-card-03">
|
||||
<div class="as-brand-card-media">
|
||||
<img t-att-src="request.website.image_url(brand,'image_1024')"/>
|
||||
</div>
|
||||
<div class="as-brand-card-body" t-if="configuration.get('allow_link')">
|
||||
<a t-attf-href="/shop?brand={{brand.id}}"><t t-esc="brand.name"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_brand_slider_04">
|
||||
<div class="as-brand as-brand-card-04">
|
||||
<div class="as-brand-card-media">
|
||||
<img t-att-src="request.website.image_url(brand,'image_1024')"/>
|
||||
</div>
|
||||
<div class="as-brand-card-body" t-if="configuration.get('allow_link')">
|
||||
<a t-attf-href="/shop?brand={{brand.id}}"><t t-esc="brand.name"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_brand_slider_05">
|
||||
<div class="as-brand as-brand-card-05">
|
||||
<div class="as-brand-card-media">
|
||||
<img t-att-src="request.website.image_url(brand,'image_1024')"/>
|
||||
</div>
|
||||
<div class="as-brand-card-body" t-if="configuration.get('allow_link')">
|
||||
<a t-attf-href="/shop?brand={{brand.id}}"><t t-esc="brand.name"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_brand_slider_one" name="Brand Slider 1">
|
||||
<t t-call="theme_alan.base_brand_slider_01"/>
|
||||
</template>
|
||||
<template id="as_brand_slider_two" name="Brand Slider 2">
|
||||
<t t-call="theme_alan.base_brand_slider_02"/>
|
||||
</template>
|
||||
<template id="as_brand_slider_three" name="brand Slider 3">
|
||||
<t t-call="theme_alan.base_brand_slider_03"/>
|
||||
</template>
|
||||
<template id="as_brand_slider_four" name="Brand Slider 4">
|
||||
<t t-call="theme_alan.base_brand_slider_04"/>
|
||||
</template>
|
||||
<template id="as_brand_slider_five" name="Brand Slider 5">
|
||||
<t t-call="theme_alan.base_brand_slider_05"/>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="s_brand_slider" name="brand Slider">
|
||||
<div t-attf-class="swiper as_page_swiper" contenteditable="false">
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="records" t-as="brand">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-1'">
|
||||
<t t-call="theme_alan.as_brand_slider_one"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-2'">
|
||||
<t t-call="theme_alan.as_brand_slider_two"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-3'">
|
||||
<t t-call="theme_alan.as_brand_slider_three"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-4'">
|
||||
<t t-call="theme_alan.as_brand_slider_four"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-5'">
|
||||
<t t-call="theme_alan.as_brand_slider_five"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="configuration.get('pagination') != 'scroll_bar'">
|
||||
<div class="swiper-pagination"></div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div class="swiper-scrollbar"></div>
|
||||
</t>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- <template id="base_brand_grid" name="Base Grid">
|
||||
<div t-attf-class="col-#{col_size}">
|
||||
<img t-att-src="request.website.image_url(brand,'image_1024')" width="100" height="100"/>
|
||||
<h3><a t-attf-href="/shop?brand={{brand.id}}"><t t-esc="brand.name"/></a></h3>
|
||||
</div>
|
||||
</template> -->
|
||||
|
||||
<template id="as_brand_grid_one" name="brand Grid 1">
|
||||
<t t-call="theme_alan.base_brand_slider_01"/>
|
||||
</template>
|
||||
<template id="as_brand_grid_two" name="brand Grid 2">
|
||||
<t t-call="theme_alan.base_brand_slider_02"/>
|
||||
</template>
|
||||
<template id="as_brand_grid_three" name="brand Grid 3">
|
||||
<t t-call="theme_alan.base_brand_slider_03"/>
|
||||
</template>
|
||||
<template id="as_brand_grid_four" name="brand Grid 4">
|
||||
<t t-call="theme_alan.base_brand_slider_04"/>
|
||||
</template>
|
||||
<template id="as_brand_grid_five" name="brand Grid 5">
|
||||
<t t-call="theme_alan.base_brand_slider_05"/>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="s_brand_grid" name="brand Grid">
|
||||
<div class="container">
|
||||
<div t-attf-class="row g-3 as-snippets-row">
|
||||
<t t-foreach="records" t-as="brand">
|
||||
<t t-set="col_mob_size" t-value="configuration.get('default_col_mob')"/>
|
||||
<t t-if="int(configuration.get('default_col_desk')) == 5">
|
||||
<t t-set="col_size" t-value="'five'"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="col_size" t-value="int(12/int(configuration.get('default_col_desk')))"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-1'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_brand_grid_one"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-2'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_brand_grid_two"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-3'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_brand_grid_three"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-4'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_brand_grid_four"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-5'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_brand_grid_five"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="s_category_product_slider" name="Product Category Slider">
|
||||
<div class="container">
|
||||
<div t-attf-class="#{configuration.get('slider_style')}">
|
||||
<div class="as-nav-tabs-style">
|
||||
<ul>
|
||||
<t t-set="active_category" t-value="0"/>
|
||||
<t t-foreach="tab_ids" t-as="tab">
|
||||
<li t-att-data-id="tab.id" t-attf-class="as-tab-name #{'active' if active_category == 0 else ''}"><span t-esc="tab.name"/></li>
|
||||
<t t-set="active_category" t-value="1"/>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="as-tab-content">
|
||||
<t t-set="show_content" t-value="0"/>
|
||||
<t t-foreach="tab_ids" t-as="tab">
|
||||
<t t-set="products" t-value="request.env['product.template'].sudo().search(
|
||||
[('public_categ_ids', 'in', tab.id),('is_published','=',True),('sale_ok','=',True)] + request.website.website_domain(), limit=10)"/>
|
||||
<div t-attf-data-tab-id="category_{{tab.id}}" t-attf-class="as-tab-pane #{'active' if show_content == 0 else ''}">
|
||||
<div t-attf-class="swiper as_category_products as_page_swiper" contenteditable="false">
|
||||
<t t-set="show_content" t-value="1"/>
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-if="configuration.get('slider_style') == 'as-tab-slider-1'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-call="theme_alan.as_product_base_slider_01"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-slider-2'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-call="theme_alan.as_product_base_slider_02"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-slider-3'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-call="theme_alan.as_product_base_slider_03"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-slider-4'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-call="theme_alan.as_product_base_slider_04"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-slider-5'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-call="theme_alan.as_product_base_slider_05"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="configuration.get('pagination') != 'scroll_bar'">
|
||||
<div class="swiper-pagination"></div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div class="swiper-scrollbar"></div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="s_category_product_grid" name="Product Category Grid">
|
||||
<div class="container">
|
||||
<div t-attf-class="#{configuration.get('slider_style')}">
|
||||
<div class="as-nav-tabs-style">
|
||||
<ul>
|
||||
<t t-set="active_category" t-value="0"/>
|
||||
<t t-foreach="tab_ids" t-as="tab">
|
||||
<li t-att-data-id="tab.id" t-attf-class="as-tab-name #{'active' if active_category == 0 else ''}"><span t-esc="tab.name"/></li>
|
||||
<t t-set="active_category" t-value="1"/>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="as-tab-content">
|
||||
<t t-set="show_content" t-value="0"/>
|
||||
<t t-foreach="tab_ids" t-as="tab">
|
||||
<t t-set="products" t-value="request.env['product.template'].sudo().search(
|
||||
[('public_categ_ids', 'in', tab.id),('is_published','=',True),('sale_ok','=',True)] + request.website.website_domain(), limit=10)"/>
|
||||
|
||||
<t t-set="col_mob_size" t-value="configuration.get('default_col_mob')"/>
|
||||
<t t-if="int(configuration.get('default_col_desk')) == 5">
|
||||
<t t-set="col_size" t-value="'five'"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="col_size" t-value="int(12/int(configuration.get('default_col_desk')))"/>
|
||||
</t>
|
||||
<div t-attf-data-tab-id="category_{{tab.id}}" t-attf-class="as-tab-pane #{'active' if show_content == 0 else ''}">
|
||||
<div t-attf-data-tab-id="category_{{tab.id}}" t-attf-class="row g-2 g-md-3 as-snippets-row as_category_products
|
||||
#{configuration.get('grid_style')}
|
||||
#{'active' if show_content == 0 else ''}">
|
||||
<t t-set="show_content" t-value="1"/>
|
||||
<t t-if="configuration.get('grid_style') == 'as-tab-grid-1'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_01"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('grid_style') == 'as-tab-grid-2'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_02"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('grid_style') == 'as-tab-grid-3'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_03"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('grid_style') == 'as-tab-grid-4'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_04"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="configuration.get('slider_style') == 'as-tab-grid-5'">
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_05"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="base_category_card_01">
|
||||
<div class="as-category-card as-category-card-01">
|
||||
<div class="as-category-card-media">
|
||||
<img t-att-src="request.website.image_url(category,'image_1024')"/>
|
||||
</div>
|
||||
<div class="as-category-card-body">
|
||||
<div class="as-category-card-title">
|
||||
<h3>
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<t t-esc="category.name"/>
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="as-category-card-link">
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
Products <t t-esc="request.env['product.template'].sudo().search_count([('public_categ_ids', 'child_of', int(category.id)),('active','=',True),('is_published','=',True)])"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="base_category_card_02">
|
||||
<div class="as-category-card as-category-card-02">
|
||||
<div class="as-category-card-media">
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(category,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="as-category-card-title">
|
||||
<h3>
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<t t-esc="category.name"/>
|
||||
</a>
|
||||
</h3>
|
||||
<span>Products <t t-esc="request.env['product.template'].sudo().search_count([('public_categ_ids', 'child_of', int(category.id)),('active','=',True),('is_published','=',True)])"/></span>
|
||||
</div>
|
||||
<div class="as-category-card-link">
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<i class="asi asi-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_category_card_03">
|
||||
<div class="as-category-card as-category-card-03">
|
||||
<div class="as-category-card-media">
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(category,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="as-category-card-title">
|
||||
<h3>
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<t t-esc="category.name"/>
|
||||
</a>
|
||||
</h3>
|
||||
<span>Products <t t-esc="request.env['product.template'].sudo().search_count([('public_categ_ids', 'child_of', int(category.id)),('active','=',True),('is_published','=',True)])"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_category_card_04">
|
||||
<div class="as-category-card as-category-card-04">
|
||||
<div class="as-category-card-media">
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(category,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="as-category-card-title">
|
||||
<h3>
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<t t-esc="category.name"/>
|
||||
</a>
|
||||
</h3>
|
||||
<span>Products <t t-esc="request.env['product.template'].sudo().search_count([('public_categ_ids', 'child_of', int(category.id)),('active','=',True),('is_published','=',True)])"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="base_category_card_05">
|
||||
<div class="as-category-card as-category-card-05">
|
||||
<div class="as-category-card-media">
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(category,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="as-category-card-title">
|
||||
<h3>
|
||||
<a t-attf-href="/shop/category/{{slug(category.sudo())}}">
|
||||
<t t-esc="category.name"/>
|
||||
</a>
|
||||
</h3>
|
||||
<span>Products <t t-esc="request.env['product.template'].sudo().search_count([('public_categ_ids', 'child_of', int(category.id)),('active','=',True),('is_published','=',True)])"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_category_slider_one" name="Category Slider 1">
|
||||
<t t-call="theme_alan.base_category_card_01"/>
|
||||
</template>
|
||||
<template id="as_category_slider_two" name="Category Slider 2">
|
||||
<t t-call="theme_alan.base_category_card_02"/>
|
||||
</template>
|
||||
<template id="as_category_slider_three" name="Category Slider 3">
|
||||
<t t-call="theme_alan.base_category_card_03"/>
|
||||
</template>
|
||||
<template id="as_category_slider_four" name="Category Slider 4">
|
||||
<t t-call="theme_alan.base_category_card_04"/>
|
||||
</template>
|
||||
<template id="as_category_slider_five" name="Category Slider 5">
|
||||
<t t-call="theme_alan.base_category_card_05"/>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="s_category_slider" name="Category Slider">
|
||||
<div t-attf-class="swiper as_page_swiper" contenteditable="false">
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="records" t-as="category">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-1'">
|
||||
<t t-call="theme_alan.as_category_slider_one"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-2'">
|
||||
<t t-call="theme_alan.as_category_slider_two"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-3'">
|
||||
<t t-call="theme_alan.as_category_slider_three"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-4'">
|
||||
<t t-call="theme_alan.as_category_slider_four"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-5'">
|
||||
<t t-call="theme_alan.as_category_slider_five"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="configuration.get('pagination') != 'scroll_bar'">
|
||||
<div class="swiper-pagination"></div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div class="swiper-scrollbar"></div>
|
||||
</t>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="as_category_grid_one" name="Category Grid 1">
|
||||
<t t-call="theme_alan.base_category_card_01"/>
|
||||
</template>
|
||||
<template id="as_category_grid_two" name="Category Grid 2">
|
||||
<t t-call="theme_alan.base_category_card_02"/>
|
||||
</template>
|
||||
<template id="as_category_grid_three" name="Category Grid 3">
|
||||
<t t-call="theme_alan.base_category_card_03"/>
|
||||
</template>
|
||||
<template id="as_category_grid_four" name="Category Grid 4">
|
||||
<t t-call="theme_alan.base_category_card_04"/>
|
||||
</template>
|
||||
<template id="as_category_grid_five" name="Category Grid 5">
|
||||
<t t-call="theme_alan.base_category_card_05"/>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="s_category_grid" name="Category Grid">
|
||||
<div class="container">
|
||||
<div t-attf-class="row g-3 as-snippets-row">
|
||||
<t t-foreach="records" t-as="category">
|
||||
<t t-set="col_mob_size" t-value="configuration.get('default_col_mob')"/>
|
||||
<t t-if="int(configuration.get('default_col_desk')) == 5">
|
||||
<t t-set="col_size" t-value="'five'"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="col_size" t-value="int(12/int(configuration.get('default_col_desk')))"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-1'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_category_grid_one"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-2'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_category_grid_two"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-3'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_category_grid_three"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-4'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_category_grid_four"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-5'">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size}">
|
||||
<t t-call="theme_alan.as_category_grid_five"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="s_alan_dynamic_snippets" name="Alan Dynamic Snippets">
|
||||
<section class="s_dynamic_snippets container" data-as-snippet="as_dynamic_snippets">
|
||||
<div class="container text-center">
|
||||
<h2> Alan Dynamic Snippets</h2>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template id="s_alan_dynamic_snippets_opts" name="Alan Snippet Option"
|
||||
inherit_id="website.snippet_options">
|
||||
<xpath expr="." position="inside">
|
||||
<div data-js="as_snippet_configure" data-selector=".s_dynamic_snippets">
|
||||
<we-checkbox string="Alan Snippet Editor" data-select-class="as_static_menu" />
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="snippets" name="template_name" inherit_id="website.snippets">
|
||||
<xpath expr="//div[@id='snippet_effect']/div[hasclass('o_panel_body')]/t" position="before">
|
||||
<t t-snippet="theme_alan.s_alan_dynamic_snippets"
|
||||
t-thumbnail="/theme_alan/static/src/img/snippets/alan-dynamic.svg"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Image Options Extends-->
|
||||
<template id="snippet_options_image_optimization_widgets_extend" name="Image Optimizatiin Extend" inherit_id="web_editor.snippet_options_image_optimization_widgets">
|
||||
<xpath expr="." position="inside">
|
||||
<we-row string="Add Hotspot">
|
||||
<we-button class="add_img_hotspot flex-grow-0"><i class="fa fa-fw fa-circle"/></we-button>
|
||||
</we-row>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Image Popover product Template-->
|
||||
<template id="as_img_hotspot_product_popover" name="AS Image Dynamic Popover Template">
|
||||
<div t-if='product' t-attf-class="{{style}}">
|
||||
<div class="hp-media">
|
||||
<t t-set="combination_info" t-value="product._get_combination_info(only_template=True, add_qty=add_qty or 1)"/>
|
||||
<div class='hp-img'><img t-att-src='request.website.image_url(product, "image_1920")' alt='Image'/></div>
|
||||
<div class='hp-media-body'>
|
||||
<h3 class='hp-title'><t t-esc="product.name"/></h3>
|
||||
<div class="product_price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer">
|
||||
<del t-attf-class="text-danger mr-2 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
|
||||
<span t-if="combination_info['price']" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
<span itemprop="price" style="display:none;" t-esc="combination_info['price']" />
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name"/>
|
||||
</div>
|
||||
<a t-att-href="product.website_url" t-attf-class='btn btn-primary btn-sm'>Shop now</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hp-norecord" t-else="">
|
||||
<h3>No Product Selected</h3>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Image Hotspot Options -->
|
||||
<template id="s_img_hotspots_options" inherit_id="website.snippet_options">
|
||||
<xpath expr="." position="inside">
|
||||
<div data-js="img_hotspots_slider_actions" data-selector="p.hs_icon">
|
||||
<we-row>
|
||||
<we-select class="hs_types" string="Type">
|
||||
<we-button data-name="static_hs" data-select-class="static_type">Static</we-button>
|
||||
<we-button data-name="dynamic_hs" data-select-class="dynamic_type">Dynamic</we-button>
|
||||
</we-select>
|
||||
<we-button class="add_preview" data-dependencies="static_hs">
|
||||
<i class="fa fa-fw fa-eye"/>
|
||||
</we-button>
|
||||
</we-row>
|
||||
<we-row>
|
||||
<we-select string="On Click" data-attribute-name="st_type" data-dependencies="static_hs">
|
||||
<we-button class="st_pop_tpy" data-name="st_po" data-select-data-attribute="popover">Popover</we-button>
|
||||
<we-button class="st_modal_tpy" data-name="st_mod" data-select-data-attribute="modal">Modal</we-button>
|
||||
</we-select>
|
||||
<we-select string="On Click" data-attribute-name="dy_type" data-dependencies="dynamic_hs">
|
||||
<we-button class="pop_tpy" data-name="dy_po" data-select-data-attribute="popover">Popover</we-button>
|
||||
<we-button class="modal_tpy" data-name="dy_mod" data-select-data-attribute="modal">Modal</we-button>
|
||||
</we-select>
|
||||
<we-button class="add_product" data-dependencies="dynamic_hs">
|
||||
<i class="fa fa-fw fa-shopping-cart"/>
|
||||
</we-button>
|
||||
</we-row>
|
||||
<we-select string="Theme" data-attribute-name="po_theme" data-dependencies="static_hs">
|
||||
<we-button data-select-data-attribute="light_thm">Light</we-button>
|
||||
<we-button data-select-data-attribute="dark_thm">Dark</we-button>
|
||||
</we-select>
|
||||
<we-select string="Style" data-attribute-name="po_style" data-dependencies="static_hs,dy_po,dy_mod">
|
||||
<we-button class="style_icon" data-select-data-attribute="st1">Style-1</we-button>
|
||||
<we-button class="style_icon" data-select-data-attribute="st2">Style-2</we-button>
|
||||
<we-button class="style_icon" data-select-data-attribute="st3">Style-3</we-button>
|
||||
</we-select>
|
||||
<we-row>
|
||||
<we-input string="Main Title" placeholder="Title" data-select-data-attribute="Title" data-attribute-name="po_title" class="hs_types main_title o_we_large flex-grow-1 d-flex" data-dependencies="static_hs" data-no-preview="true">
|
||||
</we-input>
|
||||
<we-button data-key="title_translation" class="title_translation as_hotspot_translation static_hs flex-grow-0" data-dependencies="static_hs" data-no-preview="true">
|
||||
<span class="fa fa-language"> T </span>
|
||||
</we-button>
|
||||
</we-row>
|
||||
<we-row>
|
||||
<we-input string="Short Description" placeholder="Description" data-select-data-attribute="Description" data-attribute-name="po_desc" class="short_desc o_we_large flex-grow-1 d-flex" data-dependencies="static_hs" data-no-preview="true"/>
|
||||
<we-button data-key="desc_translation" class="descr_translation as_hotspot_translation flex-grow-0" data-dependencies="static_hs" data-no-preview="true">
|
||||
<span class="fa fa-language"> T </span>
|
||||
</we-button>
|
||||
</we-row>
|
||||
<we-row>
|
||||
<we-input string="Button Text" placeholder="Ex: Show Now" data-select-data-attribute="Show Now" data-attribute-name="po_btxt" class="o_we_large btn_txt o_we_large flex-grow-1 d-flex" data-dependencies="static_hs" data-no-preview="true"/>
|
||||
<we-button data-key="btn_translation" class="btn_txt_translation as_hotspot_translation flex-grow-0" data-dependencies="static_hs" data-no-preview="true">
|
||||
<span class="fa fa-language"> T </span>
|
||||
</we-button>
|
||||
</we-row>
|
||||
<we-input string="Redirect Url" data-select-data-attribute="/" class="o_we_large redirect_url" data-attribute-name="po_bturl" data-dependencies="static_hs" data-no-preview="true"/>
|
||||
<we-row string="Image">
|
||||
<we-button class="imagebox" data-dependencies="static_hs" data-no-preview="true">
|
||||
<i class="fa fa-fw fa-camera"/>
|
||||
</we-button>
|
||||
</we-row>
|
||||
<we-range string="Left-Right"
|
||||
data-no-preview="true"
|
||||
data-select-data-attribute=""
|
||||
data-attribute-default-value="50"
|
||||
data-attribute-name="pos_left"
|
||||
class="pos_left"
|
||||
data-min="0"
|
||||
data-max="100"
|
||||
data-step="1"/>
|
||||
<we-range string="Top-Bottom"
|
||||
data-no-preview="true"
|
||||
data-select-data-attribute=""
|
||||
data-attribute-name="pos_top"
|
||||
class="pos_top"
|
||||
data-attribute-default-value="50"
|
||||
data-min="0"
|
||||
data-max="100"
|
||||
data-step="1"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<!-- Hero Slideers -->
|
||||
<xpath expr="." position="inside">
|
||||
<div data-js="hero_builder" data-selector=".hero_slider">
|
||||
<we-row>
|
||||
<we-button class="add_slide" >Add Hero Slider</we-button>
|
||||
</we-row>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="megamenu_snippets" name="Megamenu" inherit_id="website.snippet_options">
|
||||
<xpath expr="//div[@data-js='MegaMenuLayout']/we-select/t[@t-set]" position="before">
|
||||
<t t-set="_label">Alan Mega Menu</t>
|
||||
<we-button t-att-data-select-label="_label"
|
||||
data-select-template="atharva_theme_base.as_megamenus"
|
||||
t-out="_label"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@data-js='MegaMenuLayout']" position="after">
|
||||
<div data-js="as_snippet_configure" data-selector=".as_mega_menu">
|
||||
<we-checkbox string="Alan Snippet Editor" data-select-class="as_static_menu" />
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Product Slider Templates: START -->
|
||||
<template id="m_product_slider" name="MegaMenu Product Slider">
|
||||
<div t-attf-class="swiper as_swiper {{style}}">
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="data" t-as="d">
|
||||
<div class="swiper-slide as-thumb-size-4-3">
|
||||
<div class="as-mm-product-card">
|
||||
<div class="as-mm-product-card-media as-media-wrap">
|
||||
<div class="as-media-wrap-in">
|
||||
<a t-attf-href="/shop/{{slug(d.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(d,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="as-mm-product-card-body">
|
||||
<div class="as-mm-product-title">
|
||||
<a t-attf-href="/shop/{{slug(d.sudo())}}">
|
||||
<t t-esc="d.sudo().display_name"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Product Slider Templates: END -->
|
||||
|
||||
<!-- Product Grid Templates: START -->
|
||||
<template id="m_product_grid" name="MegaMenu Product Grid">
|
||||
<div t-attf-class="as_m_product_grid {{style}}">
|
||||
<div class="row g-3 as-snippets-row as-thumb-size-4-3">
|
||||
<t t-foreach="data" t-as="d">
|
||||
<div t-attf-class="col-lg-{{col_item}}">
|
||||
<div class="as-mm-product-card">
|
||||
<div class="as-mm-product-card-media as-media-wrap">
|
||||
<div class="as-media-wrap-in">
|
||||
<a t-attf-href="/shop/{{slug(d)}}">
|
||||
<img t-att-src="request.website.image_url(d,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="as-mm-product-card-body">
|
||||
<div class="as-mm-product-title">
|
||||
<a t-attf-href="/shop/{{slug(d)}}">
|
||||
<t t-esc="d.sudo().display_name"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Product Grid Templates: END -->
|
||||
|
||||
<!-- Category Slider Templates: START -->
|
||||
<template id="m_category_slider" name="MegaMenu Category Slider">
|
||||
<div t-attf-class="swiper as_swiper {{style}}">
|
||||
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="data" t-as="d">
|
||||
<div class="swiper-slide">
|
||||
<div class="as-mm-cat-slider-card">
|
||||
<div class="as-mm-cat-card-media">
|
||||
<a t-attf-href="/shop/category/{{slug(d.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(d,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="as-mm-cat-card-body">
|
||||
<div class="as-mm-cat-title">
|
||||
<a t-attf-href="/shop/category/{{slug(d.sudo())}}">
|
||||
<t t-esc="d.sudo().name"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Category Slider Templates: END -->
|
||||
|
||||
<!-- Category Grid Templates: START -->
|
||||
<template id="m_category_grid" name="MegaMenu category Slider">
|
||||
<div t-attf-class="as_m_category_grid {{style}}">
|
||||
<div class="row g-3 as-snippets-row">
|
||||
<t t-foreach="data" t-as="d">
|
||||
<div t-attf-class="col-lg-{{col_item}}">
|
||||
<div class="as-mm-cat-card">
|
||||
<div t-if="style != 'as-mm-category-grid-5'" class="as-mm-cat-card-media">
|
||||
<a t-attf-href="/shop/category/{{slug(d.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(d,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="as-mm-cat-title">
|
||||
<span>
|
||||
<a t-attf-href="/shop/category/{{slug(d.sudo())}}">
|
||||
<t t-esc="d.sudo().name"/>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="as-mm-sub-cat">
|
||||
<ul>
|
||||
<t t-foreach="data[d]" t-as="sub">
|
||||
<li>
|
||||
<a t-attf-href="/shop/category/{{slug(sub.sudo())}}">
|
||||
<t t-esc="sub.name"/>
|
||||
</a>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Category Grid Templates: END -->
|
||||
|
||||
<!-- Brand Slider Templates: START -->
|
||||
<template id="m_brand_slider" name="MegaMenu Brand Slider">
|
||||
<div t-attf-class="swiper as_swiper {{style}}">
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="data" t-as="d">
|
||||
<div t-if="d.active" class="swiper-slide">
|
||||
<div class="as-mm-brand-card">
|
||||
<div class="as-mm-brand-card-media">
|
||||
<a t-attf-href="/shop?brand={{d.id}}">
|
||||
<img t-att-src="request.website.image_url(d,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<div t-if="allow_link" class="as-mm-brand-title">
|
||||
<a t-attf-href="/shop?brand={{d.id}}">
|
||||
<t t-esc="d.sudo().display_name"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Brand Slider Templates: END -->
|
||||
|
||||
<!-- Brand Grid Templates: START -->
|
||||
<template id="m_brand_grid" name="MegaMenu Brand Grid">
|
||||
<div t-attf-class="as_m_brand_grid {{style}}">
|
||||
<div class="row g-3 as-snippets-row">
|
||||
<t t-foreach="data" t-as="d">
|
||||
<div t-if="d.active" t-attf-class="col-lg-{{col_item}}">
|
||||
<div class="as-mm-brand-card">
|
||||
<div class="as-mm-brand-card-media">
|
||||
<a t-attf-href="/shop?brand={{d.id}}">
|
||||
<img t-att-src="request.website.image_url(d,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<div t-if="allow_link" class="as-mm-brand-title">
|
||||
<a t-attf-href="/shop?brand={{d.id}}">
|
||||
<t t-esc="d.sudo().display_name"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- Brand Grid Templates: END -->
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,463 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="base_banner_card_01">
|
||||
<div class="as-product-banner-card as-product-banner-card-01">
|
||||
<form class="as_color_variant as-product-banner-form" action="/shop/cart/update" method="post">
|
||||
<t t-set="combination" t-value="product.sudo()._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product.sudo()._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" t-nocache="The csrf token must always be up to date."/>
|
||||
<input name="product_id" t-att-value="product_variant.id" type="hidden"/>
|
||||
<div class="as-product-card-media as_color_variant">
|
||||
<div class="as-product-card-media-primary">
|
||||
<a class="oe_product_image_img_wrapper" t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img class="as_product_main_img" t-att-src="request.website.image_url(product,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hover Image -->
|
||||
<div t-if="configuration.get('allow_hover_image') and product.hover_image" class="as-hover-image">
|
||||
<img t-att-src="request.website.image_url(product,'hover_image')"/>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_label')">
|
||||
<t t-call="theme_alan.product_label"/>
|
||||
</t>
|
||||
<span t-if="configuration.get('allow_rating') and product.rating_avg" class="as-pc-rating">
|
||||
<span class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div class="as-product-card-action">
|
||||
<t t-if="configuration.get('allow_wishlist')">
|
||||
<t t-nocache="The wishlist depends on the user and must not be shared with other users. As this rendering is in the loop, the product value is set in the template, we must retain the id of the product on which we are."
|
||||
t-nocache-product_template_id="product.id">
|
||||
<t t-set="in_wish" t-value="product._is_in_wishlist()"/>
|
||||
<a t-if="product_variant" type="button" role="button" t-attf-class="as-pc-btn o_add_wishlist #{'disabled' if in_wish else ''}" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist"><span class="asi asi-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<a t-if="product_variant and categories" type="button" role="button" class="as-pc-btn as-pc-compare d-none d-md-inline-flex o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant.id" data-action="o_comparelist"><span class="asi asi-repeat"></span></a>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="as-product-card-body">
|
||||
<div t-if="configuration.get('allow_brand_info') and product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
<div class="as-pc-title">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}" t-esc="product.name" />
|
||||
</div>
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-price as-pc-price">
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
<!-- Stock Info -->
|
||||
<div t-if="configuration.get('allow_stock_info')" id="out_of_stock_message" class="as-pc-message">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<span>Out of stock</span>
|
||||
</t>
|
||||
<t t-elif="product.sudo().show_availability and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < product.available_threshold">
|
||||
<span>Only Few Units left in stock.</span>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-desc" itemprop="description" t-field="product.description_sale"/>
|
||||
|
||||
<!-- Color Variant -->
|
||||
<div t-if="configuration.get('allow_color_variant')" class="as-color-variant as-pc-colors">
|
||||
<t t-foreach="product.valid_product_template_attribute_line_ids" t-as="ptal">
|
||||
<t t-if="ptal.attribute_id.display_type == 'color'">
|
||||
<ul>
|
||||
<li t-foreach="ptal.product_template_value_ids._only_active()" t-as="ptav" >
|
||||
<t t-if="ptav.pv_thumbnail != False">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag" t-attf-style="background-image: url({{request.website.image_url(ptav,'pv_thumbnail')}}); background-size: cover;">
|
||||
<span t-att-data-product-image="request.website.image_url(product,'image_1024')"
|
||||
t-att-data-color-image="request.website.image_url(ptav,'pv_thumbnail')" >
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<label t-att-data-product_tmpl_id="product.id" t-attf-style="background-color:#{ptav.html_color or ptav.product_attribute_value_id.name}" t-attf-class="css_attribute_color_tag">
|
||||
</label>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Offer Timer -->
|
||||
<div t-if="configuration.get('allow_offer_time')" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-cart">
|
||||
<t t-if="configuration.get('allow_add_to_cart') and not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<!-- disable on outof stock -->
|
||||
<a role="button" id="as_add_to_cart"
|
||||
t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'as-pc-btn as-pc-cart'}}"
|
||||
aria-label="Shopping cart" title="Shopping cart">
|
||||
<i class="asi asi-shopping-cart"/> <span>Add to cart</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-elif="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a role="button" href="/web/login" t-attf-class="as-pc-btn as-pc-cart #{'as_login_popup' if request.website.active_login_popup else ''}" title="Login For Price">
|
||||
<i class="fa fa-lock"/> <span>Login For Price</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_quick_view')">
|
||||
<span class="as-pc-btn as-pc-quick-view as_quick_view" t-att-data-product_tmpl_id="product.id"><i class="asi asi-eye"></i></span>
|
||||
</t>
|
||||
</div>
|
||||
<ul t-if="configuration.get('allow_label')" class="as-pc-tags">
|
||||
<t t-foreach="product.sudo().product_tag_ids" t-as="tag">
|
||||
<li t-esc="tag.name"/>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_banner_card_02">
|
||||
<div class="as-product-banner-card as-product-banner-card-02">
|
||||
<form class="as_color_variant as-product-banner-form" action="/shop/cart/update" method="post">
|
||||
<t t-set="combination" t-value="product.sudo()._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product.sudo()._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" t-nocache="The csrf token must always be up to date."/>
|
||||
<input name="product_id" t-att-value="product_variant.id" type="hidden"/>
|
||||
<div class="as-product-card-media">
|
||||
<div class="as-product-card-media-primary">
|
||||
<a class="oe_product_image_img_wrapper" t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img class="as_product_main_img" t-att-src="request.website.image_url(product,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hover Image -->
|
||||
<div t-if="configuration.get('allow_hover_image') and product.hover_image" class="as-hover-image">
|
||||
<img t-att-src="request.website.image_url(product,'hover_image')"/>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_label')">
|
||||
<t t-call="theme_alan.product_label"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="as-product-card-body">
|
||||
<div class="as-product-card-body-in">
|
||||
<span t-if="configuration.get('allow_rating') and product.rating_avg" class="as-pc-rating">
|
||||
<span class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</span>
|
||||
<div t-if="configuration.get('allow_brand_info') and product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
<div class="as-pc-title">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}" t-esc="product.name" />
|
||||
</div>
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-price as-pc-price">
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
<!-- Stock Info -->
|
||||
<div t-if="configuration.get('allow_stock_info')" id="out_of_stock_message" class="as-pc-message">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<span>Out of stock</span>
|
||||
</t>
|
||||
<t t-elif="product.sudo().show_availability and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < product.available_threshold">
|
||||
<span>Only Few Units left in stock.</span>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-desc" itemprop="description" t-field="product.description_sale"/>
|
||||
|
||||
<!-- Color Variant -->
|
||||
<div t-if="configuration.get('allow_color_variant')" class="as-color-variant as-pc-colors">
|
||||
<t t-foreach="product.valid_product_template_attribute_line_ids" t-as="ptal">
|
||||
<t t-if="ptal.attribute_id.display_type == 'color'">
|
||||
<ul>
|
||||
<li t-foreach="ptal.product_template_value_ids._only_active()" t-as="ptav" >
|
||||
<t t-if="ptav.pv_thumbnail != False">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag" t-attf-style="background-image: url({{request.website.image_url(ptav,'pv_thumbnail')}}); background-size: cover;">
|
||||
<span t-att-data-product-image="request.website.image_url(product,'image_1024')"
|
||||
t-att-data-color-image="request.website.image_url(ptav,'pv_thumbnail')" >
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<label t-att-data-product_tmpl_id="product.id" t-attf-style="background-color:#{ptav.html_color or ptav.product_attribute_value_id.name}" t-attf-class="css_attribute_color_tag">
|
||||
</label>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Offer Timer -->
|
||||
<div t-if="configuration.get('allow_offer_time')" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-cart">
|
||||
<t t-if="configuration.get('allow_add_to_cart') and not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<!-- disable on outof stock -->
|
||||
<a role="button" id="as_add_to_cart"
|
||||
t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'as-pc-btn as-pc-cart'}}"
|
||||
aria-label="Shopping cart" title="Shopping cart">
|
||||
<i class="asi asi-shopping-cart"/>
|
||||
</a>
|
||||
</t>
|
||||
<t t-elif="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a role="button" href="/web/login" t-attf-class="as-pc-btn as-pc-cart #{'as_login_popup' if request.website.active_login_popup else ''}" title="Login For Price">
|
||||
<i class="fa fa-lock"/>
|
||||
</a>
|
||||
</t>
|
||||
|
||||
<t t-if="configuration.get('allow_quick_view')">
|
||||
<span class="as-pc-btn as-pc-quick-view as_quick_view" t-att-data-product_tmpl_id="product.id"><i class="asi asi-eye"></i></span>
|
||||
</t>
|
||||
|
||||
<t t-if="configuration.get('allow_wishlist')">
|
||||
<t t-nocache="The wishlist depends on the user and must not be shared with other users. As this rendering is in the loop, the product value is set in the template, we must retain the id of the product on which we are."
|
||||
t-nocache-product_template_id="product.id">
|
||||
<t t-set="in_wish" t-value="product._is_in_wishlist()"/>
|
||||
<a t-if="product_variant" type="button" role="button" t-attf-class="as-pc-btn o_add_wishlist #{'disabled' if in_wish else ''}" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist"><span class="asi asi-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<a t-if="product_variant and categories" type="button" role="button" class="as-pc-btn as-pc-compare d-none d-md-inline-flex o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant.id" data-action="o_comparelist"><span class="asi asi-repeat"></span></a>
|
||||
</t>
|
||||
</div>
|
||||
<ul t-if="configuration.get('allow_label')" class="as-pc-tags">
|
||||
<t t-foreach="product.sudo().product_tag_ids" t-as="tag">
|
||||
<li t-esc="tag.name"/>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="base_banner_card_03">
|
||||
<div class="as-product-banner-card as-product-banner-card-03">
|
||||
<form class="as_color_variant as-product-banner-form" action="/shop/cart/update" method="post">
|
||||
<t t-set="combination" t-value="product.sudo()._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product.sudo()._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" t-nocache="The csrf token must always be up to date."/>
|
||||
<input name="product_id" t-att-value="product_variant.id" type="hidden"/>
|
||||
<div class="as-product-card-body">
|
||||
|
||||
<div t-if="configuration.get('allow_brand_info') and product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
<div class="as-pc-title">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}" t-esc="product.name" />
|
||||
<span t-if="configuration.get('allow_rating') and product.rating_avg" class="as-pc-rating">
|
||||
<span class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-price as-pc-price">
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
<!-- Stock Info -->
|
||||
<div t-if="configuration.get('allow_stock_info')" id="out_of_stock_message" class="as-pc-message">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<span>Out of stock</span>
|
||||
</t>
|
||||
<t t-elif="product.sudo().show_availability and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < product.available_threshold">
|
||||
<span>Only Few Units left in stock.</span>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-desc" itemprop="description" t-field="product.description_sale"/>
|
||||
|
||||
<!-- Color Variant -->
|
||||
<div t-if="configuration.get('allow_color_variant')" class="as-color-variant as-pc-colors">
|
||||
<t t-foreach="product.valid_product_template_attribute_line_ids" t-as="ptal">
|
||||
<t t-if="ptal.attribute_id.display_type == 'color'">
|
||||
<ul>
|
||||
<li t-foreach="ptal.product_template_value_ids._only_active()" t-as="ptav" >
|
||||
<t t-if="ptav.pv_thumbnail != False">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag" t-attf-style="background-image: url({{request.website.image_url(ptav,'pv_thumbnail')}}); background-size: cover;">
|
||||
<span t-att-data-product-image="request.website.image_url(product,'image_1024')"
|
||||
t-att-data-color-image="request.website.image_url(ptav,'pv_thumbnail')" >
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<label t-att-data-product_tmpl_id="product.id" t-attf-style="background-color:#{ptav.html_color or ptav.product_attribute_value_id.name}" t-attf-class="css_attribute_color_tag">
|
||||
</label>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Offer Timer -->
|
||||
<div t-if="configuration.get('allow_offer_time')" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-cart">
|
||||
<t t-if="configuration.get('allow_add_to_cart') and not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<!-- disable on outof stock -->
|
||||
<a role="button" id="as_add_to_cart"
|
||||
t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'as-pc-btn as-pc-cart'}}"
|
||||
aria-label="Shopping cart" title="Shopping cart">
|
||||
<i class="asi asi-shopping-cart"/> <span>Add to cart</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-elif="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a role="button" href="/web/login" t-attf-class="as-pc-btn as-pc-cart #{'as_login_popup' if request.website.active_login_popup else ''}" title="Login For Price">
|
||||
<i class="fa fa-lock"/> <span>Login For Price</span>
|
||||
</a>
|
||||
</t>
|
||||
|
||||
<t t-if="configuration.get('allow_quick_view')">
|
||||
<span class="as-pc-btn as-pc-quick-view as_quick_view" t-att-data-product_tmpl_id="product.id"><i class="asi asi-eye"></i></span>
|
||||
</t>
|
||||
|
||||
<t t-if="configuration.get('allow_wishlist')">
|
||||
<t t-nocache="The wishlist depends on the user and must not be shared with other users. As this rendering is in the loop, the product value is set in the template, we must retain the id of the product on which we are."
|
||||
t-nocache-product_template_id="product.id">
|
||||
<t t-set="in_wish" t-value="product._is_in_wishlist()"/>
|
||||
<a t-if="product_variant" type="button" role="button" t-attf-class="as-pc-btn o_add_wishlist #{'disabled' if in_wish else ''}" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist"><span class="asi asi-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<a t-if="product_variant and categories" type="button" role="button" class="as-pc-btn as-pc-compare d-none d-md-inline-flex o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant.id" data-action="o_comparelist"><span class="asi asi-repeat"></span></a>
|
||||
</t>
|
||||
</div>
|
||||
<ul t-if="configuration.get('allow_label')" class="as-pc-tags">
|
||||
<t t-foreach="product.sudo().product_tag_ids" t-as="tag">
|
||||
<li t-esc="tag.name"/>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-media">
|
||||
<div class="as-product-card-media-primary">
|
||||
<a class="oe_product_image_img_wrapper" t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img class="as_product_main_img" t-att-src="request.website.image_url(product,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hover Image -->
|
||||
<div t-if="configuration.get('allow_hover_image') and product.hover_image" class="as-hover-image">
|
||||
<img t-att-src="request.website.image_url(product,'hover_image')"/>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_label')">
|
||||
<t t-call="theme_alan.product_label"/>
|
||||
</t>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template id="s_product_banner_slider" name="Product Slider">
|
||||
<div t-attf-class="swiper as_page_swiper" contenteditable="false">
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="records" t-as="product">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-1'">
|
||||
<t t-call="theme_alan.base_banner_card_01"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-2'">
|
||||
<t t-call="theme_alan.base_banner_card_02"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-3'">
|
||||
<t t-call="theme_alan.base_banner_card_03"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="configuration.get('pagination') != 'scroll_bar'">
|
||||
<div class="swiper-pagination"></div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div class="swiper-scrollbar"></div>
|
||||
</t>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template id="as_product_banner_grid_one" name="Product Grid 1">
|
||||
<div t-attf-class="as-product-banner-card-col col-lg-#{col_size}">
|
||||
<t t-call="theme_alan.base_banner_card_01"/>
|
||||
</div>
|
||||
</template>
|
||||
<template id="as_product_banner_grid_two" name="Product Grid 2">
|
||||
<div t-attf-class="as-product-banner-card-col col-lg-#{col_size}">
|
||||
<t t-call="theme_alan.base_banner_card_02"/>
|
||||
</div>
|
||||
</template>
|
||||
<template id="as_product_banner_grid_three" name="Product Grid 3">
|
||||
<div t-attf-class="as-product-banner-card-col col-lg-#{col_size}">
|
||||
<t t-call="theme_alan.base_banner_card_03"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template id="s_product_banner_grid" name="Product Grid">
|
||||
<div class="container">
|
||||
<div t-attf-class="row g-3">
|
||||
<t t-foreach="records" t-as="product">
|
||||
<t t-if="int(configuration.get('default_col_desk')) == 5">
|
||||
<t t-set="col_size" t-value="'five'"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="col_size" t-value="int(12/int(configuration.get('default_col_desk')))"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-1'">
|
||||
<t t-call="theme_alan.as_product_banner_grid_one"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-2'">
|
||||
<t t-call="theme_alan.as_product_banner_grid_two"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-3'">
|
||||
<t t-call="theme_alan.as_product_banner_grid_three"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,766 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="s_product_slider" name="Product Slider">
|
||||
<div t-attf-class="swiper as_page_swiper" contenteditable="false">
|
||||
<div class="swiper-button-prev asi asi-chevron-left"></div>
|
||||
<div class="swiper-button-next asi asi-chevron-right"></div>
|
||||
<div class="swiper-wrapper">
|
||||
<t t-foreach="records" t-as="product">
|
||||
<div t-attf-class="swiper-slide" >
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-1'">
|
||||
<t t-call="theme_alan.as_product_slider_one"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-2'">
|
||||
<t t-call="theme_alan.as_product_slider_two"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-3'">
|
||||
<t t-call="theme_alan.as_product_slider_three"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-4'">
|
||||
<t t-call="theme_alan.as_product_slider_four"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('slider_style') == 'as-slider-5'">
|
||||
<t t-call="theme_alan.as_product_slider_five"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="configuration.get('pagination') != 'scroll_bar'">
|
||||
<div class="swiper-pagination"></div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div class="swiper-scrollbar"></div>
|
||||
</t>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="s_product_grid" name="Product Grid">
|
||||
<div class="container">
|
||||
<div t-attf-class="row g-2 g-md-3 as-snippets-row">
|
||||
<t t-foreach="records" t-as="product">
|
||||
|
||||
<t t-set="col_mob_size" t-value="configuration.get('default_col_mob')"/>
|
||||
<t t-if="int(configuration.get('default_col_desk')) == 5">
|
||||
<t t-set="col_size" t-value="'five'"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="col_size" t-value="int(12/int(configuration.get('default_col_desk')))"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-1'">
|
||||
<t t-call="theme_alan.as_product_grid_one"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-2'">
|
||||
<t t-call="theme_alan.as_product_grid_two"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-3'">
|
||||
<t t-call="theme_alan.as_product_grid_three"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-4'">
|
||||
<t t-call="theme_alan.as_product_grid_four"/>
|
||||
</t>
|
||||
<t t-if="configuration.get('grid_style') == 'as-grid-5'">
|
||||
<t t-call="theme_alan.as_product_grid_five"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_product_slider_one" name="Product Slider 1">
|
||||
<t t-call="theme_alan.as_product_base_slider_01"/>
|
||||
</template>
|
||||
<template id="as_product_slider_two" name="Product Slider 2">
|
||||
<t t-call="theme_alan.as_product_base_slider_02"/>
|
||||
</template>
|
||||
<template id="as_product_slider_three" name="Product Slider 3">
|
||||
<t t-call="theme_alan.as_product_base_slider_03"/>
|
||||
</template>
|
||||
<template id="as_product_slider_four" name="Product Slider 4">
|
||||
<t t-call="theme_alan.as_product_base_slider_04"/>
|
||||
</template>
|
||||
<template id="as_product_slider_five" name="Product Slider 5">
|
||||
<t t-call="theme_alan.as_product_base_slider_05"/>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="as_product_grid_one" name="Product Grid 1">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_01"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_product_grid_two" name="Product Grid 2">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_02"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_product_grid_three" name="Product Grid 3">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{col_mob_size} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_03"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_product_grid_four" name="Product Grid 4">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{default_col_mob} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_04"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="as_product_grid_five" name="Product Grid 5">
|
||||
<div t-attf-class="col-lg-#{col_size} mob-col-#{default_col_mob} as_color_variant">
|
||||
<t t-call="theme_alan.as_product_base_slider_05"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<!-- Product Template 1 -->
|
||||
<template id="as_product_base_slider_01">
|
||||
<div class="as-product-card as-product-card-01">
|
||||
<form action="/shop/cart/update" method="post" class="as_color_variant as-product-card-form">
|
||||
<t t-set="combination" t-value="product.sudo()._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product.sudo()._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" t-nocache="The csrf token must always be up to date."/>
|
||||
<input name="product_id" t-att-value="product_variant.id" type="hidden"/>
|
||||
<!-- Product Img -->
|
||||
<div class="as-product-card-media as-media-ratio">
|
||||
<div class="as-product-card-media-primary as-media-ratio-wrap">
|
||||
<a class="oe_product_image_img_wrapper" t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img class="as_product_main_img" t-att-src="request.website.image_url(product,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hover Image -->
|
||||
<div t-if="configuration.get('allow_hover_image') and product.hover_image" class="as-hover-image">
|
||||
<img t-att-src="request.website.image_url(product,'hover_image')"/>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_label')">
|
||||
<t t-call="theme_alan.product_label"/>
|
||||
</t>
|
||||
<div t-if="configuration.get('allow_rating') and product.rating_avg" class="as-pc-rating">
|
||||
<span class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-body">
|
||||
<!-- Offer Timer -->
|
||||
<div t-if="configuration.get('allow_offer_time')" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-action as-quick-option">
|
||||
<t t-if="configuration.get('allow_quick_view')">
|
||||
<span class="as-pc-btn as-pc-quick-view as_quick_view" t-att-data-product_tmpl_id="product.id"><i class="asi asi-eye"></i></span>
|
||||
</t>
|
||||
|
||||
<t t-if="configuration.get('allow_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<a t-if="product_variant and categories" type="button" role="button" class="as-pc-btn as-pc-compare d-none d-md-inline-flex o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant.id" data-action="o_comparelist"><span class="asi asi-repeat"></span></a>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_wishlist')">
|
||||
<t t-nocache="The wishlist depends on the user and must not be shared with other users. As this rendering is in the loop, the product value is set in the template, we must retain the id of the product on which we are."
|
||||
t-nocache-product_template_id="product.id">
|
||||
<t t-set="in_wish" t-value="product._is_in_wishlist()"/>
|
||||
<a t-if="product_variant" type="button" role="button" t-attf-class="as-pc-btn as-pc-wishlist o_add_wishlist #{'disabled' if in_wish else ''}" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist"><span class="asi asi-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-cart">
|
||||
<t t-if="configuration.get('allow_add_to_cart') and not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<!-- disable on outof stock -->
|
||||
<a role="button" id="as_add_to_cart"
|
||||
t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'as-pc-cart-btn'}}"
|
||||
aria-label="Shopping cart" title="Shopping cart">
|
||||
<i class="asi asi-shopping-cart"/> <span>Add to Cart</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-elif="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a href="/web/login" role="button" title="Login For Price" t-attf-class="as-pc-cart-btn #{'as_login_popup' if request.website.active_login_popup else ''}">
|
||||
<i class="fa fa-lock"/> <span>Login For Price</span>
|
||||
</a>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="as-product-card-info">
|
||||
<div t-if="configuration.get('allow_brand_info') and product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
<div class="as-pc-title">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}" t-esc="product.name" />
|
||||
</div>
|
||||
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-price as-pc-price" >
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
<!-- Color Variant -->
|
||||
<div t-if="configuration.get('allow_color_variant')" class="as-color-variant as-pc-colors">
|
||||
<t t-foreach="product.valid_product_template_attribute_line_ids" t-as="ptal">
|
||||
<t t-if="ptal.attribute_id.display_type == 'color'">
|
||||
<ul>
|
||||
<li t-foreach="ptal.product_template_value_ids._only_active()" t-as="ptav" >
|
||||
<t t-if="ptav.pv_thumbnail != False">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag" t-attf-style="background-image: url({{request.website.image_url(ptav,'pv_thumbnail')}}); background-size: cover;">
|
||||
<span t-att-data-product-image="request.website.image_url(product,'image_1024')"
|
||||
t-att-data-color-image="request.website.image_url(ptav,'pv_thumbnail')" >
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<label t-att-data-product_tmpl_id="product.id" t-attf-style="background-color:#{ptav.html_color or ptav.product_attribute_value_id.name}" t-attf-class="css_attribute_color_tag">
|
||||
</label>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
<!-- Stock Info -->
|
||||
<div t-if="configuration.get('allow_stock_info')" id="out_of_stock_message" class="as-pc-message">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<span>Out of stock</span>
|
||||
</t>
|
||||
<t t-elif="product.sudo().show_availability and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < product.available_threshold">
|
||||
<span>Only Few Units left in stock.</span>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Product Template 2 -->
|
||||
<template id="as_product_base_slider_02">
|
||||
<div class="as-product-card as-product-card-02">
|
||||
<form action="/shop/cart/update" method="post" class="as_color_variant as-product-card-form">
|
||||
<t t-set="combination" t-value="product.sudo()._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product.sudo()._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" t-nocache="The csrf token must always be up to date."/>
|
||||
<input name="product_id" t-att-value="product_variant.id" type="hidden"/>
|
||||
<!-- Product Img -->
|
||||
<div class="as-product-card-media as-media-ratio">
|
||||
<div class="as-product-card-media-primary as-media-ratio-wrap">
|
||||
<a class="oe_product_image_img_wrapper" t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img class="as_product_main_img" t-att-src="request.website.image_url(product,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hover Image -->
|
||||
<div t-if="configuration.get('allow_hover_image') and product.hover_image" class="as-hover-image">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(product,'hover_image')"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_label')">
|
||||
<t t-call="theme_alan.product_label"/>
|
||||
</t>
|
||||
<div t-if="configuration.get('allow_rating') and product.rating_avg" class="as-pc-rating">
|
||||
<span class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_wishlist')">
|
||||
<t t-nocache="The wishlist depends on the user and must not be shared with other users. As this rendering is in the loop, the product value is set in the template, we must retain the id of the product on which we are."
|
||||
t-nocache-product_template_id="product.id">
|
||||
<t t-set="in_wish" t-value="product._is_in_wishlist()"/>
|
||||
<a t-if="product_variant" type="button" role="button" t-attf-class="as-pc-wishlist o_add_wishlist #{'disabled' if in_wish else ''}" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist"><span class="asi asi-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-body">
|
||||
<div class="as-product-card-cart">
|
||||
<t t-if="configuration.get('allow_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<a t-if="product_variant and categories" type="button" role="button" class="as-pc-btn as-pc-compare d-none d-md-inline-flex o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant.id" data-action="o_comparelist"><span class="asi asi-repeat"></span></a>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_add_to_cart') and not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<!-- disable on outof stock -->
|
||||
<a role="button" id="as_add_to_cart"
|
||||
t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'as-pc-cart-btn'}}"
|
||||
aria-label="Shopping cart" title="Shopping cart">
|
||||
<i class="asi asi-shopping-cart"/> <span>Add to Cart</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-elif="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a role="button" href="/web/login" t-attf-class="as-pc-cart-btn #{'as_login_popup' if request.website.active_login_popup else ''}" title="Login For Price">
|
||||
<i class="fa fa-lock"/> <span>Login For Price</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_quick_view')">
|
||||
<span class="as-pc-btn as-pc-quick-view as_quick_view" t-att-data-product_tmpl_id="product.id"><i class="asi asi-eye"></i></span>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div t-if="configuration.get('allow_brand_info') and product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
<div class="as-pc-title">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}" t-esc="product.name" />
|
||||
</div>
|
||||
<div class="as-price as-pc-price" t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
<!-- Color Variant -->
|
||||
<div t-if="configuration.get('allow_color_variant')" class="as-color-variant as-pc-colors">
|
||||
<t t-foreach="product.valid_product_template_attribute_line_ids" t-as="ptal">
|
||||
<t t-if="ptal.attribute_id.display_type == 'color'">
|
||||
<ul>
|
||||
<li t-foreach="ptal.product_template_value_ids._only_active()" t-as="ptav" >
|
||||
<t t-if="ptav.pv_thumbnail != False">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag" t-attf-style="background-image: url({{request.website.image_url(ptav,'pv_thumbnail')}}); background-size: cover;">
|
||||
<span t-att-data-product-image="request.website.image_url(product,'image_1024')"
|
||||
t-att-data-color-image="request.website.image_url(ptav,'pv_thumbnail')" >
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<label t-att-data-product_tmpl_id="product.id" t-attf-style="background-color:#{ptav.html_color or ptav.product_attribute_value_id.name}" t-attf-class="css_attribute_color_tag">
|
||||
</label>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
<!-- Offer Timer -->
|
||||
<div t-if="configuration.get('allow_offer_time')" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
</div>
|
||||
|
||||
<!-- Stock Info -->
|
||||
<div t-if="configuration.get('allow_stock_info')" id="out_of_stock_message" class="as-pc-message">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<span>Out of stock</span>
|
||||
</t>
|
||||
<t t-elif="product.sudo().show_availability and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < product.available_threshold">
|
||||
<span>Only Few Units left in stock.</span>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Product Template 3 -->
|
||||
<template id="as_product_base_slider_03">
|
||||
<div class="as-product-card as-product-card-03">
|
||||
<form action="/shop/cart/update" method="post" class="as_color_variant as-product-card-form">
|
||||
<t t-set="combination" t-value="product.sudo()._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product.sudo()._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" t-nocache="The csrf token must always be up to date."/>
|
||||
<input name="product_id" t-att-value="product_variant.id" type="hidden"/>
|
||||
<!-- Product Img -->
|
||||
<div class="as-product-card-media as-media-ratio">
|
||||
<div class="as-product-card-media-primary as-media-ratio-wrap">
|
||||
<a class="oe_product_image_img_wrapper" t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img class="as_product_main_img" t-att-src="request.website.image_url(product,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hover Image -->
|
||||
<div t-if="configuration.get('allow_hover_image') and product.hover_image" class="as-hover-image">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(product,'hover_image')"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_label')">
|
||||
<t t-call="theme_alan.product_label"/>
|
||||
</t>
|
||||
<div t-if="configuration.get('allow_rating') and product.rating_avg" class="as-pc-rating">
|
||||
<span class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-body">
|
||||
|
||||
<div t-if="configuration.get('allow_brand_info') and product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
<div class="as-pc-title">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}" t-esc="product.name" />
|
||||
</div>
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-price as-pc-price">
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-action">
|
||||
<t t-if="configuration.get('allow_wishlist')">
|
||||
<t t-nocache="The wishlist depends on the user and must not be shared with other users. As this rendering is in the loop, the product value is set in the template, we must retain the id of the product on which we are."
|
||||
t-nocache-product_template_id="product.id">
|
||||
<t t-set="in_wish" t-value="product._is_in_wishlist()"/>
|
||||
<a t-if="product_variant" type="button" role="button" t-attf-class="as-pc-btn as-pc-wishlist o_add_wishlist #{'disabled' if in_wish else ''}" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist"><span class="asi asi-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<a t-if="product_variant and categories" type="button" role="button" class="as-pc-btn as-pc-compare d-none d-md-inline-flex o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant.id" data-action="o_comparelist"><span class="asi asi-repeat"></span></a>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_add_to_cart') and not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<!-- disable on outof stock -->
|
||||
<a role="button" id="as_add_to_cart"
|
||||
t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'as-pc-btn as-pc-cart-btn'}}"
|
||||
aria-label="Shopping cart" title="Shopping cart">
|
||||
<i class="asi asi-shopping-cart"/>
|
||||
</a>
|
||||
</t>
|
||||
<t t-elif="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a role="button" href="/web/login" t-attf-class="as-pc-btn as-pc-cart-btn #{'as_login_popup' if request.website.active_login_popup else ''}" title="Login For Price">
|
||||
<i class="fa fa-lock"/>
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_quick_view')">
|
||||
<span class="as-pc-btn as-pc-quick-view as_quick_view" t-att-data-product_tmpl_id="product.id"><i class="asi asi-eye"></i></span>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Color Variant -->
|
||||
<div t-if="configuration.get('allow_color_variant')" class="as-color-variant as-pc-colors">
|
||||
<t t-foreach="product.valid_product_template_attribute_line_ids" t-as="ptal">
|
||||
<t t-if="ptal.attribute_id.display_type == 'color'">
|
||||
<ul>
|
||||
<li t-foreach="ptal.product_template_value_ids._only_active()" t-as="ptav" >
|
||||
<t t-if="ptav.pv_thumbnail != False">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag" t-attf-style="background-image: url({{request.website.image_url(ptav,'pv_thumbnail')}}); background-size: cover;">
|
||||
<span t-att-data-product-image="request.website.image_url(product,'image_1024')"
|
||||
t-att-data-color-image="request.website.image_url(ptav,'pv_thumbnail')" >
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<label t-att-data-product_tmpl_id="product.id" t-attf-style="background-color:#{ptav.html_color or ptav.product_attribute_value_id.name}" t-attf-class="css_attribute_color_tag">
|
||||
</label>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Offer Timer -->
|
||||
<div t-if="configuration.get('allow_offer_time')" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Stock Info -->
|
||||
<div t-if="configuration.get('allow_stock_info')" id="out_of_stock_message" class="as-pc-message">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<span>Out of stock</span>
|
||||
</t>
|
||||
<t t-elif="product.sudo().show_availability and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < product.available_threshold">
|
||||
<span>Only Few Units left in stock.</span>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Product Template 4 -->
|
||||
<template id="as_product_base_slider_04">
|
||||
<div class="as-product-card as-product-card-04">
|
||||
<form action="/shop/cart/update" method="post" class="as_color_variant as-product-card-form">
|
||||
<t t-set="combination" t-value="product.sudo()._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product.sudo()._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" t-nocache="The csrf token must always be up to date."/>
|
||||
<input name="product_id" t-att-value="product_variant.id" type="hidden"/>
|
||||
<!-- Product Img -->
|
||||
<div class="as-product-card-media as-media-ratio">
|
||||
<div class="as-product-card-media-primary as-media-ratio-wrap">
|
||||
<a class="oe_product_image_img_wrapper" t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img class="as_product_main_img" t-att-src="request.website.image_url(product,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hover Image -->
|
||||
<div t-if="configuration.get('allow_hover_image') and product.hover_image" class="as-hover-image">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(product,'hover_image')"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_label')">
|
||||
<t t-call="theme_alan.product_label"/>
|
||||
</t>
|
||||
|
||||
|
||||
|
||||
<div class="as-product-card-action">
|
||||
<t t-if="configuration.get('allow_wishlist')">
|
||||
<t t-nocache="The wishlist depends on the user and must not be shared with other users. As this rendering is in the loop, the product value is set in the template, we must retain the id of the product on which we are."
|
||||
t-nocache-product_template_id="product.id">
|
||||
<t t-set="in_wish" t-value="product._is_in_wishlist()"/>
|
||||
<a t-if="product_variant" type="button" role="button" t-attf-class="as-pc-btn as-pc-wishlist o_add_wishlist #{'disabled' if in_wish else ''}" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist"><span class="asi asi-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<a t-if="product_variant and categories" type="button" role="button" class="as-pc-btn as-pc-compare d-none d-md-inline-flex o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant.id" data-action="o_comparelist"><span class="asi asi-repeat"></span></a>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_quick_view')">
|
||||
<span class="as-pc-btn as-pc-quick-view as_quick_view" t-att-data-product_tmpl_id="product.id"><i class="asi asi-eye"></i></span>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-body">
|
||||
|
||||
<div t-if="configuration.get('allow_rating') and product.rating_avg" class="as-pc-rating">
|
||||
<span class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div t-if="configuration.get('allow_brand_info') and product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
|
||||
<div class="as-pc-title">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}" t-esc="product.name" />
|
||||
</div>
|
||||
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-price as-pc-price">
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- Color Variant -->
|
||||
<div t-if="configuration.get('allow_color_variant')" class="as-color-variant as-pc-colors">
|
||||
<t t-foreach="product.valid_product_template_attribute_line_ids" t-as="ptal">
|
||||
<t t-if="ptal.attribute_id.display_type == 'color'">
|
||||
<ul>
|
||||
<li t-foreach="ptal.product_template_value_ids._only_active()" t-as="ptav" >
|
||||
<t t-if="ptav.pv_thumbnail != False">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag" t-attf-style="background-image: url({{request.website.image_url(ptav,'pv_thumbnail')}}); background-size: cover;">
|
||||
<span t-att-data-product-image="request.website.image_url(product,'image_1024')"
|
||||
t-att-data-color-image="request.website.image_url(ptav,'pv_thumbnail')" >
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<label t-att-data-product_tmpl_id="product.id" t-attf-style="background-color:#{ptav.html_color or ptav.product_attribute_value_id.name}" t-attf-class="css_attribute_color_tag">
|
||||
</label>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Offer Timer -->
|
||||
<div t-if="configuration.get('allow_offer_time')" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
</div>
|
||||
|
||||
<!-- Stock Info -->
|
||||
<div t-if="configuration.get('allow_stock_info')" id="out_of_stock_message" class="as-pc-message">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<span>Out of stock</span>
|
||||
</t>
|
||||
<t t-elif="product.sudo().show_availability and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < product.available_threshold">
|
||||
<span>Only Few Units left in stock.</span>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-cart">
|
||||
<t t-if="configuration.get('allow_add_to_cart') and not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<!-- disable on outof stock -->
|
||||
<a role="button" id="as_add_to_cart"
|
||||
t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'as-pc-btn as-pc-cart-btn'}}"
|
||||
aria-label="Shopping cart" title="Shopping cart">
|
||||
<i class="asi asi-shopping-cart"/> <span>Add to Cart</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-elif="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a role="button" href="/web/login" t-attf-class="as-pc-btn as-pc-cart-btn #{'as_login_popup' if request.website.active_login_popup else ''}" title="Login For Price">
|
||||
<i class="fa fa-lock"/> <span>Login For Price</span>
|
||||
</a>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Product Template 5 -->
|
||||
<template id="as_product_base_slider_05">
|
||||
<div class="as-product-card as-product-card-05">
|
||||
<form action="/shop/cart/update" method="post" class="as_color_variant as-product-card-form">
|
||||
<t t-set="combination" t-value="product.sudo()._get_first_possible_combination()"/>
|
||||
<t t-set="combination_info" t-value="product.sudo()._get_combination_info(combination, add_qty=add_qty or 1)"/>
|
||||
<t t-set="product_variant" t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" t-nocache="The csrf token must always be up to date."/>
|
||||
<input name="product_id" t-att-value="product_variant.id" type="hidden"/>
|
||||
<!-- Product Img -->
|
||||
<div class="as-product-card-media as-media-ratio">
|
||||
<div class="as-product-card-media-primary as-media-ratio-wrap">
|
||||
<a class="oe_product_image_img_wrapper" t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img class="as_product_main_img" t-att-src="request.website.image_url(product,'image_1024')"/>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hover Image -->
|
||||
<div t-if="configuration.get('allow_hover_image') and product.hover_image" class="as-hover-image">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}">
|
||||
<img t-att-src="request.website.image_url(product,'hover_image')"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<t t-if="configuration.get('allow_label')">
|
||||
<t t-call="theme_alan.product_label"/>
|
||||
</t>
|
||||
|
||||
|
||||
|
||||
<t t-if="configuration.get('allow_wishlist')">
|
||||
<t t-nocache="The wishlist depends on the user and must not be shared with other users. As this rendering is in the loop, the product value is set in the template, we must retain the id of the product on which we are."
|
||||
t-nocache-product_template_id="product.id">
|
||||
<t t-set="in_wish" t-value="product._is_in_wishlist()"/>
|
||||
<a t-if="product_variant" type="button" role="button" t-attf-class="as-pc-btn as-pc-wishlist o_add_wishlist #{'disabled' if in_wish else ''}" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant.id" data-action="o_wishlist"><span class="asi asi-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<div class="as-product-card-cart">
|
||||
<t t-if="configuration.get('allow_add_to_cart') and not (request.env.user._is_public() and request.website.active_b2b_mode)">
|
||||
<!-- disable on outof stock -->
|
||||
<a role="button" id="as_add_to_cart"
|
||||
t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'as-pc-btn as-pc-cart-btn'}}"
|
||||
aria-label="Shopping cart" title="Shopping cart">
|
||||
<i class="asi asi-shopping-cart"/> <span>Add to Cart</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-elif="request.env.user._is_public() and request.website.active_b2b_mode">
|
||||
<a role="button" href="/web/login" t-attf-class="as-pc-btn as-pc-cart-btn #{'as_login_popup' if request.website.active_login_popup else ''}" title="Login For Price">
|
||||
<i class="fa fa-lock"/> <span>Login For Price</span>
|
||||
</a>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="as-product-card-body">
|
||||
<div class="as-product-card-action">
|
||||
<div t-if="configuration.get('allow_rating') and product.rating_avg" class="as-pc-rating">
|
||||
<span class="as_product_rating">
|
||||
<i class="fa fa-star"/>
|
||||
<t t-if="product.rating_avg % 1 == 0"><t t-esc="int(product.rating_avg)"/></t>
|
||||
<t t-else=""><t t-esc='"{:.1f}".format(product.rating_avg)'/></t>
|
||||
<span class="rating-count" t-if="product.rating_count" t-esc="product.rating_count"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ms-auto">
|
||||
<t t-if="configuration.get('allow_compare')">
|
||||
<t t-set="categories" t-value="product.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
||||
<a t-if="product_variant and categories" type="button" role="button" class="as-pc-btn as-pc-compare d-none d-md-inline-flex o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant.id" data-action="o_comparelist"><span class="asi asi-repeat"></span></a>
|
||||
</t>
|
||||
<t t-if="configuration.get('allow_quick_view')">
|
||||
<span class="as-pc-btn as-pc-quick-view as_quick_view" t-att-data-product_tmpl_id="product.id"><i class="asi asi-eye"></i></span>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="configuration.get('allow_brand_info') and product.product_brand_id" class="as-pc-brand">
|
||||
<span t-esc="product.product_brand_id.name" />
|
||||
</div>
|
||||
|
||||
<div class="as-pc-title">
|
||||
<a t-attf-href="/shop/{{slug(product.sudo())}}" t-esc="product.name" />
|
||||
</div>
|
||||
|
||||
<div t-if="not (request.env.user._is_public() and request.website.active_b2b_mode)" class="as-price as-pc-price">
|
||||
<t t-call="website_sale.product_price"/>
|
||||
<small t-if="combination_info['base_unit_price']"
|
||||
class="ms-1 text-muted o_base_unit_price_wrapper d-none" groups="website_sale.group_show_uom_price">
|
||||
<t t-call='website_sale.base_unit_price'/>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- Color Variant -->
|
||||
<div t-if="configuration.get('allow_color_variant')" class="as-color-variant as-pc-colors">
|
||||
<t t-foreach="product.valid_product_template_attribute_line_ids" t-as="ptal">
|
||||
<t t-if="ptal.attribute_id.display_type == 'color'">
|
||||
<ul>
|
||||
<li t-foreach="ptal.product_template_value_ids._only_active()" t-as="ptav" >
|
||||
<t t-if="ptav.pv_thumbnail != False">
|
||||
<label t-att-data-product_tmpl_id="product.id" class="as_color_variant_img css_attribute_color_tag" t-attf-style="background-image: url({{request.website.image_url(ptav,'pv_thumbnail')}}); background-size: cover;">
|
||||
<span t-att-data-product-image="request.website.image_url(product,'image_1024')"
|
||||
t-att-data-color-image="request.website.image_url(ptav,'pv_thumbnail')" >
|
||||
</span>
|
||||
</label>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<label t-att-data-product_tmpl_id="product.id" t-attf-style="background-color:#{ptav.html_color or ptav.product_attribute_value_id.name}" t-attf-class="css_attribute_color_tag">
|
||||
</label>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Offer Timer -->
|
||||
<div t-if="configuration.get('allow_offer_time')" class="as-offer-time as-pc-timer">
|
||||
<div class="as_offer_timer" t-att-data-offer="product.sudo().product_variant_id._get_offer_timing(website._get_current_pricelist())"/>
|
||||
</div>
|
||||
|
||||
<!-- Stock Info -->
|
||||
<div t-if="configuration.get('allow_stock_info')" id="out_of_stock_message" class="as-pc-message">
|
||||
<t t-if="not product.sudo().allow_out_of_stock_order and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < 1">
|
||||
<span>Out of stock</span>
|
||||
</t>
|
||||
<t t-elif="product.sudo().show_availability and product.sudo().with_context(warehouse=website._get_warehouse_available()).virtual_available < product.available_threshold">
|
||||
<span>Only Few Units left in stock.</span>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Alan Builder Snippet -->
|
||||
<template id="website_builder" name="Alan Website Builder">
|
||||
<section class="as-alan-snippet-builder as_snippet as-load">
|
||||
Alan Website Builder
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<!-- Alan Builder Snippet Options -->
|
||||
<template id="s_website_builder_options" inherit_id="website.snippet_options">
|
||||
<xpath expr="." position="inside">
|
||||
<div data-js="alan_website_builder" data-selector=".as-alan-snippet-builder">
|
||||
<we-button data-webisite_snippet_configure="" data-no-preview="true">Change Collection</we-button>
|
||||
</div>
|
||||
<div data-selector=".carousel-content">
|
||||
<we-row class="o_we_full_row">
|
||||
<we-title data-bs-original-title="" title="" style="">Content Shapes</we-title>
|
||||
<div>
|
||||
<we-select class="o_we_user_value_widget">
|
||||
<div>
|
||||
<we-toggler class="">None</we-toggler>
|
||||
<we-selection-items>
|
||||
<we-button class="o_we_user_value_widget">
|
||||
<div>Shape One</div>
|
||||
</we-button>
|
||||
</we-selection-items>
|
||||
</div>
|
||||
</we-select>
|
||||
</div>
|
||||
</we-row>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Alan Builder Snippet Thumbnail -->
|
||||
<template id="alan_websiite_builder" name="Website builder" inherit_id="website.snippets">
|
||||
<xpath expr="//div[@id='snippet_structure']/div[hasclass('o_panel_body')]" position="inside">
|
||||
<t t-snippet="theme_alan.website_builder" t-thumbnail="/theme_alan/static/src/img/snippets/alan-builder.svg"/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="theme_alan.s_searchbar_000_xml" model="ir.asset">
|
||||
<field name="name">Theme Alan Searchbar</field>
|
||||
<field name="bundle">web.assets_frontend</field>
|
||||
<field name="path">theme_alan/static/src/xml/searchbar.xml</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user