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.
261 lines
18 KiB
261 lines
18 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- Changing the shop template. Inheriting the website_sale.product template.-->
|
|
<template id="theme_og_shop" name="OG Shop"
|
|
inherit_id="website_sale.products">
|
|
<xpath expr="//div[hasclass('oe_website_sale')]" position="replace">
|
|
<div class="row o_wsale_products_main_row align-items-start flex-nowrap">
|
|
<div id="products_grid" class="oe_website_sale">
|
|
<!-- Recommended Section -->
|
|
<div class="best-sellers-section mb-5" t-if="recommended_data">
|
|
<h3 class="section_heading"
|
|
style="text-align: left; padding-top: 0px; padding-left: 70px;padding-right: 60px;">
|
|
Recommended
|
|
</h3>
|
|
<section class="best_seller"
|
|
style="padding-left: 70px;">
|
|
<div class="col-lg-12">
|
|
<div class="owl-carousel owl-theme"
|
|
id="carousel-2">
|
|
<t t-foreach="recommended_data"
|
|
t-as="product"
|
|
t-key="product_index">
|
|
<div class="item">
|
|
<a t-att-href="product['url']">
|
|
<div class="img-product">
|
|
<t t-if="product['image_url']">
|
|
<img t-att-src="product['image_url']"
|
|
alt="Product Image"/>
|
|
</t>
|
|
</div>
|
|
<div class="p-3 product-content">
|
|
<h6 class="text-dark mt-2">
|
|
<t t-esc="product['name']"/>
|
|
</h6>
|
|
<h3 class="price-product">
|
|
<b>
|
|
<t t-esc="product['currency_symbol']"/>
|
|
<t t-esc="product['price']"/>
|
|
</b>
|
|
</h3>
|
|
<div class="ratingandcart">
|
|
<div class="container-rating">
|
|
<a href="#"
|
|
t-att-data-product-id="product['product_variant_id']"
|
|
class="cart-btn">
|
|
<img class="w-50"
|
|
src="/theme_og_store/static/src/img/products/cart-icon.svg"
|
|
alt="Cart Icon"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<button
|
|
t-if="product['product_variant_id'] and product['type'] != 'combo'"
|
|
type="button"
|
|
role="button"
|
|
class="btn btn-light o_add_wishlist"
|
|
t-att-disabled="in_wish"
|
|
t-att-data-product-template-id="product['product_id']"
|
|
t-att-data-product-product-id="product['product_variant_id']"
|
|
data-action="o_wishlist"
|
|
title="Add to Wishlist">
|
|
<span class="fa fa-heart" role="img"
|
|
aria-label="Add to wishlist"/>
|
|
</button>
|
|
<t t-set="attrib_categories"
|
|
t-value="product['products_id'].valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
|
<button
|
|
t-if="product['product_variant_id'] and attrib_categories"
|
|
type="button"
|
|
role="button"
|
|
class="d-none d-md-inline-block btn btn-light o_add_compare"
|
|
title="Compare"
|
|
aria-label="Compare"
|
|
t-att-data-product-product-id="product['product_variant_id']"
|
|
data-action="o_comparelist">
|
|
<span class="fa fa-exchange"/>
|
|
</button>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<!-- Best Sellers Section -->
|
|
<div class="best-sellers-section mb-5">
|
|
<h3 class="section_heading"
|
|
style="text-align: left; padding-top: 0px; padding-left: 70px;padding-right: 60px;">
|
|
Best seller
|
|
</h3>
|
|
<section class="best_seller"
|
|
style="padding-left: 70px;">
|
|
<div class="col-lg-12">
|
|
<div class="owl-carousel owl-theme"
|
|
id="carousel-1">
|
|
<t t-foreach="best_sellers" t-as="product"
|
|
t-key="product_index">
|
|
<div class="item">
|
|
<a t-att-href="product['url']">
|
|
<div class="img-product">
|
|
<t t-if="product['image_url']">
|
|
<img t-att-src="product['image_url']"
|
|
alt="Product Image"/>
|
|
</t>
|
|
</div>
|
|
<div class="p-3 product-content">
|
|
<h6 class="text-dark mt-2">
|
|
<t t-esc="product['name']"/>
|
|
</h6>
|
|
<h3 class="price-product">
|
|
<b>
|
|
<t t-esc="product['currency_symbol']"/>
|
|
<t t-esc="product['price']"/>
|
|
</b>
|
|
</h3>
|
|
<div class="ratingandcart">
|
|
<div class="container-rating">
|
|
<a href="#"
|
|
t-att-data-product-id="product['product_variant_id']"
|
|
class="cart-btn">
|
|
<img class="w-50"
|
|
src="/theme_og_store/static/src/img/products/cart-icon.svg"
|
|
alt="Cart Icon"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<button
|
|
t-if="product['product_variant_id'] and product['type'] != 'combo'"
|
|
type="button"
|
|
role="button"
|
|
class="btn btn-light o_add_wishlist"
|
|
t-att-disabled="in_wish"
|
|
t-att-data-product-template-id="product['product_id']"
|
|
t-att-data-product-product-id="product['product_variant_id']"
|
|
data-action="o_wishlist"
|
|
title="Add to Wishlist">
|
|
<span class="fa fa-heart" role="img"
|
|
aria-label="Add to wishlist"/>
|
|
</button>
|
|
<t t-set="attrib_categories"
|
|
t-value="product['products_id'].valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
|
<button
|
|
t-if="product['product_variant_id'] and attrib_categories"
|
|
type="button"
|
|
role="button"
|
|
class="d-none d-md-inline-block btn btn-light o_add_compare"
|
|
title="Compare"
|
|
aria-label="Compare"
|
|
t-att-data-product-product-id="product['product_variant_id']"
|
|
data-action="o_comparelist">
|
|
<span class="fa fa-exchange"/>
|
|
</button>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<!-- All Products Sections -->
|
|
<div class="all-products-section mb-5"
|
|
t-att-data-all-products="all_products"
|
|
t-att-data-total-products="offset">
|
|
<h3 class="section_heading"
|
|
style="text-align: left; padding-top: 0px; padding-left: 70px;padding-right: 60px;">
|
|
All Products
|
|
</h3>
|
|
<section class="best_seller"
|
|
style="padding-left: 70px;margin-bottom: 18px;">
|
|
<div class="col-lg-12">
|
|
<div class="owl-carousel owl-theme"
|
|
id="carousel-3">
|
|
<t t-foreach="visible_products"
|
|
t-as="product"
|
|
t-key="product_index">
|
|
<div class="item">
|
|
<a t-att-href="product['url']">
|
|
<div class="img-product">
|
|
<t t-if="product['image_url']">
|
|
<img t-att-src="product['image_url']"
|
|
alt="Product Image"/>
|
|
</t>
|
|
</div>
|
|
<div class="p-3 product-content">
|
|
<h6 class="text-dark mt-2">
|
|
<t t-esc="product['name']"/>
|
|
</h6>
|
|
<h3 class="price-product">
|
|
<b>
|
|
<t t-esc="product['currency_symbol']"/>
|
|
<t t-esc="product['price']"/>
|
|
</b>
|
|
</h3>
|
|
<div class="ratingandcart">
|
|
<div class="container-rating">
|
|
<a href="#"
|
|
t-att-data-product-id="product['product_variant_id']"
|
|
class="cart-btn">
|
|
<img class="w-50"
|
|
src="/theme_og_store/static/src/img/products/cart-icon.svg"
|
|
alt="Cart Icon"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<t t-out="product_variant_id"/>
|
|
<button
|
|
t-if="product['product_variant_id'] and product['type'] != 'combo'"
|
|
type="button"
|
|
role="button"
|
|
class="btn btn-light o_add_wishlist"
|
|
t-att-disabled="in_wish"
|
|
t-att-data-product-template-id="product['product_id']"
|
|
t-att-data-product-product-id="product['product_variant_id']"
|
|
data-action="o_wishlist"
|
|
title="Add to Wishlist">
|
|
<span class="fa fa-heart" role="img"
|
|
aria-label="Add to wishlist"/>
|
|
</button>
|
|
<t t-set="product_tmpl"
|
|
t-value="request.env['product.template'].browse(product['product_id'])"/>
|
|
<t t-set="attrib_categories"
|
|
t-value="product_tmpl.valid_product_template_attribute_line_ids._prepare_categories_for_display()"/>
|
|
<button
|
|
t-if="product['product_variant_id'] and attrib_categories"
|
|
type="button"
|
|
role="button"
|
|
class="d-none d-md-inline-block btn btn-light o_add_compare"
|
|
title="Compare"
|
|
aria-label="Compare"
|
|
t-att-data-product-product-id="product['product_variant_id']"
|
|
data-action="o_comparelist">
|
|
<span class="fa fa-exchange"/>
|
|
</button>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<div class="text-center mt-3">
|
|
<button id="load-more-btn"
|
|
class="btn btn-secondary"
|
|
t-on-click="onClickLoadMore"
|
|
aria-label="Toggle navigation"
|
|
t-ref="LoadMore">Load More 12+
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="products_pager d-flex justify-content-center pt-5 pb-3">
|
|
<t t-call="website.pager"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|
|
|