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.
 
 
 
 
 

254 lines
14 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="voltro_shop" name="Voltro Shop"
inherit_id="website_sale.products">
<xpath expr="//div[@id='wrap']/div[hasclass('container','oe_website_sale','pt-2')]/div[hasclass('row','o_wsale_products_main_row')]/div[@id='products_grid']"
position="replace">
<div id="products_grid"
t-attf-class="#{'o_wsale_layout_list' if layout_mode == 'list' else ''} {{'col-lg-9' if hasLeftColumn else 'col-12'}}">
<t t-call="website_sale.products_breadcrumb">
<t t-set="_classes"
t-valuef="d-none d-lg-flex w-100 p-0 small"/>
</t>
<div class="products_header btn-toolbar flex-nowrap align-items-center justify-content-between gap-3 mb-3">
<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 t-if="category"
class="d-flex align-items-center d-lg-none me-auto">
<t t-if="not category.parent_id" t-set="backUrl"
t-valuef="/shop"/>
<t t-else="" t-set="backUrl"
t-value="keep('/shop/category/' + slug(category.parent_id), category=0)"/>
<a t-attf-class="btn btn-{{navClass}} me-2"
t-att-href="category.parent_id and keep('/shop/category/' + slug(category.parent_id), category=0) or '/shop'">
<i class="fa fa-angle-left"/>
</a>
<h4 t-out="category.name" class="mb-0 me-auto"/>
</div>
<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>
<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>
</div>
<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>
<template id="voltro_shop_images" name="Voltro Shop Images"
inherit_id="website_sale.products_item">
<xpath expr="//div[hasclass('oe_product_image')]"
position="replace">
<div class="voltro_product_card">
<div class="o_wsale_product_information position-relative d-flex flex-column flex-grow-1 flex-shrink-1 pt-0">
<div class="o_wsale_product_information_text flex-grow-1">
<h6 class="o_wsale_products_item_title mb-2">
<a class="product_name"
itemprop="name" t-att-href="product_href"
t-att-content="product.name"
t-field="product.name"/>
<a t-if="not product.website_published"
role="button" t-att-href="product_href"
class="btn btn-sm btn-danger"
title="This product is unpublished.">
Unpublished
</a>
</h6>
</div>
</div>
<div class="card-body p-1 oe_product_image">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<a t-att-href="product_href" class="d-block h-100"
itemprop="url">
<t t-set="image_holder"
t-value="product._get_image_holder()"/>
<div class="fix_height">
<div class="img_wrapper">
<span t-field="image_holder.image_1920"
t-options="{'widget': 'image', 'preview_image': 'image_1920'}"
class=" h-100 "/>
</div>
</div>
<span class="o_ribbon"
t-attf-style="#{text_color and ('color: %s; ' % text_color)}#{bg_color and 'background-color:' + bg_color}"
t-field="product.website_ribbon_id.html"/>
</a>
</div>
</div>
</xpath>
</template>
<template id="voltro_shop_buttons" name="Voltro Shop Cart Buttons"
inherit_id="website_sale.products_item"
customize_show="True" priority="2" active="True">
<xpath expr="//div[hasclass('o_wsale_product_information')]/div[hasclass('o_wsale_product_information_text')]/h6[hasclass('o_wsale_products_item_title')]/a[1]"
position="replace">
</xpath>
<xpath expr="//div[hasclass('o_wsale_product_btn')]"
position="after">
<div class="voltro_price_icons">
<div class="voltro_icons">
<t t-set="in_wish"
t-value="product in products_in_wishlist"/>
<t t-set="product_variant_id"
t-value="in_wish or product._get_first_possible_variant_id()"/>
<button t-if="product_variant_id"
type="button"
role="button"
class="btn btn-link voltro_icon_link o_add_wishlist"
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">
<img src="/theme_voltro/static/src/images/product_card/heart (1).svg"
alt="Favorite" class="voltro_icon_img"/>
</button>
<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 voltro_icon_link o_add_compare"
title="Compare" aria-label="Compare"
t-att-data-product-product-id="product_variant_id"
data-action="o_comparelist">
<img src="/theme_voltro/static/src/images/product_card/left-and-right-arrows (1).svg"
alt="Compare" class="voltro_icon_img"/>
</button>
</div>
</div>
</xpath>
</template>
<template id="product_add_to_compare"
name='Add to comparison in product page'
inherit_id="website_sale.product" priority="8">
<xpath expr="//div[@id='o_wsale_cta_wrapper']" position="after">
<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>
</xpath>
</template>
</odoo>