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.
 
 
 
 
 

313 lines
16 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Customize the breadcrumb navigation in the website_sale.products_breadcrumb template -->
<template id="theme_shopping_products_breadcrumb"
name="Theme Products Breadcrumb"
inherit_id="website_sale.products_breadcrumb">
<xpath expr="//ol[contains(@t-attf-class, 'breadcrumb')]"
position="replace">
<nav aria-label="breadcrumb" class="st-breadcrumbs"
style="margin-left: -16px;">
<ol t-if="category" class="breadcrumb mb-0">
<li class="breadcrumb-item st-breadcrumb__list">
<a href="/shop">Products</a>
</li>
<t t-foreach="category.parents_and_self" t-as="cat">
<li t-if="cat == category"
class="breadcrumb-item st-breadcrumb__list">
<span class="d-inline-block" t-field="cat.name"/>
</li>
<li t-else=""
class="breadcrumb-item st-breadcrumb__list">
<a t-att-href="keep('/shop/category/%s' % slug(cat), category=0)"
t-field="cat.name"/>
</li>
</t>
</ol>
</nav>
</xpath>
</template>
<!-- Customize the search box in the website.website_search_box template -->
<template id="theme_shopping_website_search_box" name="Theme Shop Searchbox"
inherit_id="website.website_search_box">
<xpath expr="//div[@role='search']"
position="replace">
<div t-attf-class="input-group #{_classes}" role="search">
<t t-set="search_placeholder">Search...</t>
<div class="st-search_container ">
<span class="input-group-text st-search_icon">
<i class="fa fa-search"/>
</span>
<input type="search" name="search"
t-att-class="'search-query form-control st-search_input st-productlist_searchbar'"
t-att-placeholder="placeholder if placeholder else search_placeholder"
t-att-value="search"/>
<span t-if="search"
class="input-group-text oe_search_found">
<small>(
<t t-out="search_count or 0"/>
found)
</small>
</span>
</div>
</div>
</xpath>
</template>
<!-- Customize the pricelist dropdown in the website_sale.pricelist_list template -->
<template id="theme_shopping_pricelist_list" name="Theme Shop Pricelists"
inherit_id="website_sale.pricelist_list">
<xpath expr="//div[contains(@t-attf-class, 'o_pricelist_dropdown')]"
position="replace">
<div class="o_pricelist_dropdown dropdown dropdown_sorty_by {{_classes if hasPricelistDropdown else 'd-none'}}">
<t t-set="curr_pl" t-value="website.pricelist_id"/>
<a role="button" href="#"
class="form-control st-productlist_searchbar"
data-bs-toggle="dropdown">
<span class="d-none d-lg-inline">
<t t-if="curr_pl" t-out="curr_pl.name"/>
</span>
<i class="fa fa-sort-amount-asc d-lg-none"/>
</a>
<div class="dropdown-menu dropdown-menu-end" role="menu">
<t t-foreach="website_sale_pricelists" t-as="pl">
<a role="menuitem"
t-att-href="'/shop/change_pricelist/%s' % pl.id"
class="dropdown-item">
<span class="switcher_pricelist small"
t-att-data-pl_id="pl.id" t-esc="pl.name"/>
</a>
</t>
</div>
</div>
</xpath>
</template>
<!-- Customize the sort-by dropdown in the website_sale.sort template -->
<template id="theme_shopping_sort" name="Theme Shop Sort-by"
inherit_id="website_sale.sort">
<xpath expr="//div[contains(@t-attf-class, 'o_sortby_dropdown')]"
position="replace">
<div t-attf-class="o_sortby_dropdown dropdown dropdown_sorty_by {{_classes}}">
<a role="button" href="#"
class="form-control st-productlist_searchbar"
data-bs-toggle="dropdown">
<span class="d-none d-lg-inline">
<t t-if="isSortingBy" t-out="isSortingBy[0][1]"/>
<span t-else="1" t-field="website.shop_default_sort"/>
</span>
<i class="fa fa-sort-amount-asc d-lg-none"/>
</a>
<div class="dropdown-menu dropdown-menu-end" role="menu">
<t t-foreach="website_sale_sortable" t-as="sortby">
<a role="menuitem" rel="noindex,nofollow"
t-att-href="keep('/shop', order=sortby[0])"
class="dropdown-item">
<span t-out="sortby[1]"/>
</a>
</t>
</div>
</div>
</xpath>
</template>
<!-- Customize the grid or list view toggle in the website_sale.add_grid_or_list_option template -->
<template id="theme_shopping_grid_or_list" active="True"
inherit_id="website_sale.add_grid_or_list_option"
name="Theme Shop Grid or List">
<xpath expr="//div[contains(@t-attf-class, 'o_wsale_apply_layout')]"
position="replace">
<div t-attf-class="o_wsale_apply_layout btn-group {{_classes}}"
t-att-data-active-classes="_activeClasses">
<input type="radio" class="btn-check"
name="st_products_layout"
id="st_apply_grid"
t-att-checked="'checked' if layout_mode != 'list' else None"
value="grid"
checked="checked"/>
<label class="btn st-product_listtab-btn st_grid active"
title="Grid" for="st_apply_grid">
<i class="fa fa-th"/>
</label>
<input type="radio" class="btn-check"
name="st_products_layout"
id="st_apply_list"
t-att-checked="'checked' if layout_mode == 'list' else None"
value="list"/>
<label t-attf-class="btn btn-{{navClass}} #{_activeClasses if layout_mode == 'list' else None} btn st-product_listtab-btn st_list"
title="List" for="st_apply_list">
<i class="fa fa-list"/>
</label>
</div>
</xpath>
</template>
<!-- Inherit the website_sale.products template to customize the shopping page -->
<template id="theme_shopping_page" name="Theme Shop"
inherit_id="website_sale.products">
<xpath expr="//div[@id='wrap']" position="before">
<section class="container">
<t t-call="website_sale.products_breadcrumb"/>
</section>
</xpath>
<xpath expr="//div[hasclass('o_wsale_products_grid_before_rail')]/div[hasclass('products_categories')]"
position="before">
<div class="st-product_filter-head">
<span class="st-product_filter--heading">
Filter
</span>
<a t-attf-href="/shop">
<button class="st-product_clear-btn">Clear all</button>
</a>
</div>
</xpath>
<xpath expr="//div[@id='products_grid']" position="replace">
<div id="products_grid"
t-attf-class="#{'o_wsale_layout_list' if layout_mode == 'list' else ''} {{'col-lg-10' if hasLeftColumn else 'col-12'}}">
<div class="st-productlist-result_top">
<t t-if="is_view_active('website_sale.search')"
t-call="website_sale.search">
<t t-set="search" t-value="original_search or search"/>
<t t-set="_form_classes"
t-valuef="d-lg-inline {{'d-inline' if not category else 'd-none'}}"/>
</t>
<t t-call="website_sale.pricelist_list" t-cache="pricelist">
<t t-set="_classes" t-valuef="d-none d-lg-inline"/>
</t>
<t t-if="is_view_active('website_sale.sort')"
t-call="website_sale.sort">
<t t-set="_classes"
t-valuef="d-none d-lg-inline-block"/>
</t>
<div class="d-flex">
<t t-if="is_view_active('website_sale.add_grid_or_list_option')"
t-call="website_sale.add_grid_or_list_option">
<t t-set="_classes" t-valuef="d-flex"/>
</t>
</div>
</div>
<button t-if="is_view_active('website_sale.sort') or opt_wsale_categories or opt_wsale_attributes or opt_wsale_attributes_top"
t-attf-class="btn btn-{{navClass}} position-relative {{not opt_wsale_attributes_top and 'd-lg-none'}}"
data-bs-toggle="offcanvas"
data-bs-target="#o_wsale_offcanvas">
<i class="fa fa-sliders"/>
<span t-if="isFilteringByPrice or attrib_set or tags"
t-attf-class="position-absolute top-0 start-100 translate-middle border border-{{navClass}} rounded-circle bg-danger p-1">
<span class="visually-hidden">filters active</span>
</span>
</button>
<t t-if="opt_wsale_categories_top"
t-call="website_sale.filmstrip_categories"/>
<div t-if="original_search and products"
class="alert alert-warning mt8">
No results found for '<span t-esc="original_search"/>'.
Showing results for '<span t-esc="search"/>'.
</div>
<t t-if="category">
<t t-set='editor_msg'>Drag building blocks here to customize
the header for "<t t-esc='category.name'/>" category.
</t>
<div class="mb16" id="category_header"
t-att-data-editor-message="editor_msg"
t-field="category.website_description"/>
</t>
<div t-if="products"
class="o_wsale_products_grid_table_wrapper pt-3 pt-lg-0">
<table class="table table-borderless h-100 m-0"
t-att-data-ppg="ppg" t-att-data-ppr="ppr"
t-att-data-default-sort="website.shop_default_sort"
t-att-data-name="grid_block_name">
<colgroup t-ignore="true">
<!-- Force the number of columns (useful when only one row of (x < ppr) products) -->
<col t-foreach="ppr" t-as="p"/>
</colgroup>
<tbody>
<tr t-foreach="bins" t-as="tr_product">
<t t-foreach="tr_product" t-as="td_product">
<t t-if="td_product">
<!-- We use t-attf-class here to allow easier customization -->
<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"
t-att-data-name="product_block_name">
<div t-attf-class="o_wsale_product_grid_wrapper 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>
</tbody>
</table>
</div>
<div t-nocache="get the actual search" t-else=""
class="text-center text-muted mt128 mb256">
<t t-if="not search">
<h3 class="mt8">No product defined</h3>
<p t-if="category">No product defined in this
category.
</p>
</t>
<t t-else="">
<h3 class="mt8">No results</h3>
<p>No results for "<strong t-esc='search'/>"
<t t-if="category">in category "<strong
t-esc="category.display_name"/>"
</t>
.
</p>
</t>
<p t-ignore="true" groups="sales_team.group_sale_manager">
Click <i>'New'</i> in the top-right corner to create
your first product.
</p>
</div>
<div class="products_pager d-flex justify-content-center pt-5 pb-3">
<t t-call="website.pager"/>
</div>
</div>
</xpath>
</template>
<!-- Inherit the website_sale.products_add_to_cart template to customize the shopping cart button -->
<template id="shopping_cart_button"
inherit_id="website_sale.products_add_to_cart"
name="Shopping Cart Button">
<xpath expr="//a[hasclass('a-submit')]" position="replace">
<div class="st-product_overlay-content">
<a t-if="product._website_show_quick_add()"
href="#" role="button"
class="btn btn-primary a-submit st-cart_btn--sm"
aria-label="Shopping cart" title="Shopping cart"><i
class="fa fa-shopping-cart fa-stack custom_cart"/>Add to
Cart
</a>
</div>
</xpath>
</template>
<!-- Inherit the website_sale_wishlist.add_to_wishlist template to customize the wishlist button -->
<template id="shopping_wishlist_button"
inherit_id="website_sale_wishlist.add_to_wishlist"
name="Wishlist Button">
<xpath expr="//button[hasclass('o_add_wishlist')]"
position="replace">
<div class="st-product_overlay-content"
style="float: right; width: 20%;">
<button t-if="product_variant_id"
type="button"
role="button"
class="btn btn-outline-primary bg-white o_add_wishlist st-product-like_btn btn st-product-like_btn"
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">
<i class="fa fa-heart" aria-label="Add to wishlist"/>
</button>
</div>
</xpath>
</template>
</odoo>