You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

269 lines
18 KiB

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Customization with buttons, layout,search attributes etc.-->
<template id="boec_layout_button" name="Boec Layout Button"
inherit_id="website_sale.add_grid_or_list_option">
<xpath expr="//div[contains(@t-attf-class, 'o_wsale_apply_layout')]"
position="replace"/>
</template>
<template id="boec_pricelist_button" name="Boec Pricelist Button"
inherit_id="website_sale.products">
<xpath expr="//div[hasclass('oe_website_sale')]" position="before">
<div class="products_pager form-inline flex-md-nowrap justify-content-between justify-content-md-center"
style="margin-left:20%;margin-right:20%;">
<t t-call="website_sale.search">
<t t-set="_classes" t-valuef="mr-auto mt-2"/>
</t>
<t t-set="list_price_desc_label">Catalog price: High to Low</t>
<t t-set="list_price_asc_label">Catalog price: Low to High</t>
<t t-set="name_asc_label">Name: A to Z</t>
<t t-set="name_desc_label">Name: Z to A</t>
<t t-set="website_sale_sortable" t-value="[
(list_price_desc_label, 'list_price desc'),
(list_price_asc_label, 'list_price asc'),
(name_asc_label, 'name asc'),
(name_desc_label, 'name desc')
]"/>
<t t-set="website_sale_sortable_current"
t-value="[sort for sort in website_sale_sortable]"/>
<div class="dropdown mt-2 ml-md-2 dropdown_sorty_by">
<div t-attf-class="o_sortby_dropdown dropdown dropdown_sorty_by">
<a role="button" href="#"
t-attf-class="dropdown-toggle btn btn-sort"
data-bs-toggle="dropdown">
<span class="d-none d-lg-inline">
<t t-if='len(website_sale_sortable_current)'>
Sorting by :
<t t-out='website_sale_sortable_current[0][0]'/>
</t>
<t t-else='1'>
Sort by
</t>
</span>
<i class="fa fa-sort-amount-asc d-lg-none"/>
</a>
<div class="dropdown-menu dropdown-menu-end" role="menu"
style="transform: translate3d(0px, 30px, 0px);">
<t t-foreach="website_sale_sortable" t-as="sortby">
<a role="menuitem" rel="noindex,nofollow"
t-att-href="keep('/shop', order=sortby[1])"
class="dropdown-item" id="item-boec">
<span t-out="sortby[0]"/>
</a>
</t>
</div>
</div>
</div>
</div>
</xpath>
</template>
<template id="boec_attributes" name="Boec Attributes"
inherit_id="website_sale.products_attributes"
customize_show="True" priority="20" active="True">
<xpath expr="//div[@id='wsale_products_attributes_collapse']"
position="replace">
<div id="wsale_products_attributes_collapse"
class=" position-relative">
<a t-if="attrib_values"
t-att-href="keep('/shop'+ ('/category/'+slug(category)) if category else None, attrib=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>
<div class="sidebar">
<div class="wrapper">
<div class="box">
<div class="accordion" id="accordionExample">
<div class="card">
<div class="collapse d-lg-block"
id="wsale_products_attributes_collapse">
<form class="js_attributes 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"/>
<ul class="nav nav-pills flex-column">
<t t-foreach="attributes"
t-as="a">
<li t-if="a.value_ids and len(a.value_ids) > 1"
class="nav-item">
<div class="card-header"
id="headingSix">
<h2 class="mb-0">
<button class="btn btn-link collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapseSix"
aria-expanded="false"
aria-controls="collapseSix">
<strong t-field="a.name"/>
<i class="fas fa-angle-down"/>
</button>
</h2>
</div>
<t t-if="a.display_type == 'select'">
<div id="collapseSix"
class="collapse"
aria-labelledby="headingSix"
data-parent="#accordionExample">
<div class="card-body">
<div class="wrapp2">
<div class="list-group">
<select class="form-control"
name="attrib">
<option value=""/>
<!-- -->
<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"/>
</t>
<!-- -->
</select>
</div>
</div>
</div>
</div>
</t>
<t t-if="a.display_type == 'radio'">
<ul class="nav nav-pills flex-column">
<div id="collapseSix"
class="collapse"
aria-labelledby="headingSix"
data-parent="#accordionExample">
<div class="card-body">
<div class="wrapp2">
<div class="list-group">
<t t-foreach="a.value_ids"
t-as="v">
<li class="nav-item">
<label style="padding: 0.25rem 0rem; margin: 0"
t-attf-class="nav-link#{' active' if v.id in attrib_set else ''}">
<input type="checkbox"
name="attrib"
t-att-value="'%s-%s' % (a.id,v.id)"
t-att-checked="'checked' if v.id in attrib_set else None"/>
<span style="font-weight: normal"
t-field="v.name"/>
</label>
</li>
</t>
</div>
</div>
</div>
</div>
</ul>
</t>
<t t-if="a.display_type == 'color'">
<div id="collapseSix"
class="collapse"
aria-labelledby="headingSix"
data-parent="#accordionExample">
<div class="card-body">
<div class="wrapp2">
<div class="list-group">
<t t-foreach="a.value_ids"
t-as="v">
<label t-attf-style="background-color:#{v.html_color or v.name}"
t-attf-class="css_attribute_color #{'active' if v.id in attrib_set else ''}">
<input type="checkbox"
name="attrib"
t-att-value="'%s-%s' % (a.id,v.id)"
t-att-checked="'checked' if v.id in attrib_set else None"
t-att-title="v.name"/>
</label>
</t>
</div>
</div>
</div>
</div>
</t>
</li>
</t>
</ul>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<t t-if="opt_wsale_filter_price and opt_wsale_attributes"
t-call="website_sale.filter_products_price"/>
</div>
</xpath>
</template>
<template id="brand_filter" name="Boec Brand Filter"
inherit_id="website_sale.products_attributes" active="True"
customize_show="True" priority="21">
<xpath expr="//form[hasclass('js_attributes')]/ul" position="after">
<div class="sidebar">
<div class="wrapper">
<div class="box">
<div class="accordion" id="accordionExample">
<div class="card">
<div class="card-header" id="headingTwo">
<h2 class="mb-0">
<button class="btn btn-link collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapseTwo"
aria-expanded="true"
aria-controls="collapseTwo">
Brand Filter
<i class="fas fa-angle-down"/>
</button>
</h2>
</div>
<div id="collapseTwo" class="collapse"
aria-labelledby="headingTwo"
data-parent="#accordionExample">
<div class="card-body">
<div class="wrapp2">
<div class="list-group">
<li class="nav-item">
<a t-att-href="keep('/shop', brand=0)"
class="list-group-item list-group-item-action o_not_editable">
All Products
</a>
</li>
<t t-foreach="website.get_brands()"
t-as="brand"
t-if="website.get_brands()">
<li class="nav-item">
<a t-att-href="'/shop/brand/' + slug(brand)"
class="list-group-item list-group-item-action">
<t t-esc="brand.brand_name"/>
</a>
</li>
</t>
<t t-if="not website.get_brands()">
<div>
You have not selected a
Brand, for selecting a
brand
please goto Product >
Ecommerce tab and add
the brand.
Or switch-off this
filter
</div>
</t>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</template>
</odoo>