130 lines
6.9 KiB
XML
130 lines
6.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Shop Page Banner & Layout Refinement -->
|
|
<template id="shop_banner_inherit" inherit_id="website_sale.products" name="Shop Banner">
|
|
<!-- Force Sidebar Visibility and Layout -->
|
|
<xpath expr="//div[contains(@class, 'o_wsale_products_main_row')]" position="attributes">
|
|
<attribute name="class" add="d-flex flex-row flex-wrap" separator=" "/>
|
|
</xpath>
|
|
<xpath expr="//*[@id='products_grid_before']" position="attributes">
|
|
<attribute name="class" remove="d-none" separator=" "/>
|
|
<attribute name="class" add="col-lg-3 d-block pe-4" separator=" "/>
|
|
</xpath>
|
|
<xpath expr="//*[@id='products_grid']" position="attributes">
|
|
<attribute name="class" remove="col-lg-12" separator=" "/>
|
|
<attribute name="class" add="col-lg-9" separator=" "/>
|
|
</xpath>
|
|
|
|
<!-- Customize Top Bar -->
|
|
<xpath expr="//div[hasclass('o_wsale_products_main_row')]" position="before">
|
|
<div class="products_header">
|
|
<div class="products_header_left">
|
|
<button class="btn btn_sidebar_toggle d-lg-none" data-bs-toggle="collapse" data-bs-target="#products_grid_before">
|
|
Show Sidebar
|
|
</button>
|
|
<div class="view_mode_icons d-none d-lg-flex">
|
|
<i class="fa fa-th active"/>
|
|
<i class="fa fa-list"/>
|
|
</div>
|
|
<div class="results_count d-none d-md-block">
|
|
<span>Showing 1 - 12 of 28 results</span>
|
|
</div>
|
|
</div>
|
|
<div class="products_header_right">
|
|
<div class="show_filter">
|
|
<span>Show</span>
|
|
<select class="form-select form-select-sm">
|
|
<option>12</option>
|
|
<option>24</option>
|
|
</select>
|
|
</div>
|
|
<div class="sort_filter">
|
|
<div class="dropdown">
|
|
<button class="btn btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
|
Default sorting
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li><a class="dropdown-item" href="#">Price: Low to High</a></li>
|
|
<li><a class="dropdown-item" href="#">Price: High to Low</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Customize Product Item -->
|
|
<template id="shop_product_item_inherit" inherit_id="website_sale.products_item" name="Shop Product Item">
|
|
<xpath expr="//form" position="replace">
|
|
<t t-set="combination_info" t-value="product._get_combination_info(only_template=True, add_qty=add_qty or 1)"/>
|
|
<div class="oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'" itemscope="itemscope" itemtype="http://schema.org/Product">
|
|
<div class="oe_product_image position-relative">
|
|
<!-- Badges -->
|
|
<t t-if="product.website_id.id % 2 == 0">
|
|
<span class="s_product_label label-sale">SALE</span>
|
|
</t>
|
|
<t t-else="">
|
|
<span class="s_product_label label-hot">HOT</span>
|
|
</t>
|
|
|
|
<a t-att-href="product_href" class="d-block h-100" itemprop="url">
|
|
<t t-set="image_holder" t-value="product._get_image_holder()"/>
|
|
<img t-att-src="website.image_url(image_holder, 'image_512')" class="img-fluid d-block mx-auto" t-att-alt="product.name" loading="lazy"/>
|
|
</a>
|
|
|
|
<!-- Hover Actions -->
|
|
<div class="s_product_actions">
|
|
<a href="#" class="action-btn quick-view"
|
|
t-att-data-name="product.name"
|
|
t-att-data-price="combination_info['price']"
|
|
t-att-data-img="website.image_url(product, 'image_1024')"
|
|
t-att-data-desc="product.description_sale or 'Premium floral arrangement for your special occasions.'">
|
|
<i class="fa fa-eye"></i>
|
|
</a>
|
|
<a href="#" class="action-btn add-to-cart"><i class="fa fa-shopping-cart"></i></a>
|
|
<a href="#" class="action-btn wishlist"><i class="fa fa-heart-o"></i></a>
|
|
</div>
|
|
</div>
|
|
|
|
<section>
|
|
<div class="o_rating_star_card">
|
|
<i class="fa fa-star"/>
|
|
<i class="fa fa-star"/>
|
|
<i class="fa fa-star"/>
|
|
<i class="fa fa-star"/>
|
|
<i class="fa fa-star-o"/>
|
|
</div>
|
|
<h6>
|
|
<a t-att-href="product_href" itemprop="name" t-field="product.name"/>
|
|
</h6>
|
|
<div class="product_price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer">
|
|
<span t-if="combination_info['price']" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
|
<del t-if="combination_info['has_discounted_price']" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Upgrade Sidebar UI: Categories -->
|
|
<template id="shop_sidebar_categories_inherit" inherit_id="website_sale.products_categories" name="Shop Sidebar Categories">
|
|
<xpath expr="//div[@id='wsale_products_categories_collapse']" position="before">
|
|
<h6 class="sidebar_title">Categories</h6>
|
|
</xpath>
|
|
<xpath expr="//div[@id='wsale_products_categories_collapse']" position="attributes">
|
|
<attribute name="class" add="s_sidebar_card" separator=" "/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Upgrade Sidebar UI: Attributes/Filters -->
|
|
<template id="shop_sidebar_attributes_inherit" inherit_id="website_sale.products_attributes" name="Shop Sidebar Attributes">
|
|
<xpath expr="//form" position="attributes">
|
|
<attribute name="class" add="s_sidebar_card" separator=" "/>
|
|
</xpath>
|
|
<xpath expr="//form//t[1]" position="before">
|
|
<!-- This will be styled via CSS if needed, or we can add individual headers -->
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|