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.
 
 
 
 
 

230 lines
16 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Product item inherited to show quickview button -->
<template id="products_c_quick_view" inherit_id="website_sale.products_item"
active="active" name="Add to Cart">
<xpath expr="//div[hasclass('o_wsale_product_btn')]" position="inside">
<t t-set="product_variant_id"
t-value="product._get_first_possible_variant_id()"/>
<input name="product_id" t-att-value="product_variant_id"
type="hidden"/>
<t t-if="product_variant_id">
<a href="#" role="button"
class="btn btn-primary c-product-quick-view-action"
aria-label="Quick View" title="Quick View"
t-att-data-product-id="product.id">
<span class="fa fa-eye"/>
</a>
</t>
</xpath>
</template>
<!-- Product quick view template -->
<template id="c_product_quick_view" name="Product">
<div id="quick-view-modal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"/>
</div>
<div class="modal-body">
<t t-cache="pricelist,product">
<t t-set="combination"
t-value="product._get_first_possible_combination()"/>
<t t-set="combination_info"
t-value="product._get_combination_info(combination, add_qty=add_qty or 1, pricelist=pricelist)"/>
<t t-set="product_variant"
t-value="product.env['product.product'].browse(combination_info['product_id'])"/>
<t t-set="additional_title" t-value="product.name"/>
<div itemscope="itemscope"
itemtype="http://schema.org/Product" id="wrap"
class="js_sale">
<div class="oe_structure oe_empty oe_structure_not_nearest"
id="oe_structure_website_sale_product_1"
data-editor-message="DROP BUILDING BLOCKS HERE TO MAKE THEM AVAILABLE ACROSS ALL PRODUCTS"/>
<section
t-attf-class="container py-4 oe_website_sale #{'discount' if combination_info['has_discounted_price'] else ''}"
id="product_detail"
t-att-data-view-track="view_track and '1' or '0'"
t-att-data-product-tracking-info="json.dumps(request.env['product.template'].get_google_analytics_data(combination_info))">
<div class="row">
<div class="col-lg-6">
<ol class="breadcrumb mb-2">
<li class="breadcrumb-item o_not_editable">
<a t-att-href="keep(category=0)">
All Products
</a>
</li>
<li t-if="category"
class="breadcrumb-item">
<a t-att-href="keep('/shop/category/%s' % slug(category), category=0)"
t-field="category.name"/>
</li>
<li class="breadcrumb-item active">
<span t-field="product.name"/>
</li>
</ol>
</div>
<div class="col-lg-6">
<div class="d-sm-flex justify-content-between mb-2">
<t t-call="website_sale.search">
<t t-set="search"
t-value="False"/>
<t t-set="_classes"
t-value="'mb-2 mr-sm-2'"/>
</t>
<t t-call="website_sale.pricelist_list">
<t t-set="_classes"
t-valuef="ml-1 mb-2 float-right"/>
</t>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mt-md-4">
<t t-call="website_sale.shop_product_carousel"/>
</div>
<div class="col-md-6 mt-md-4"
id="product_details">
<t t-set="base_url"
t-value="product.get_base_url()"/>
<h1 itemprop="name"
t-field="product.name">Product
Name
</h1>
<span itemprop="url"
style="display:none;"
t-esc="base_url + product.website_url"/>
<span itemprop="image"
style="display:none;"
t-esc="base_url + website.image_url(product, 'image_1920')"/>
<t t-if="is_view_active('website_sale.product_comment')">
<a href="#o_product_page_reviews"
class="o_product_page_reviews_link text-decoration-none">
<t t-call="portal_rating.rating_widget_stars_static">
<t t-set="rating_avg"
t-value="product.rating_avg"/>
<t t-set="trans_text_plural">
%s reviews
</t>
<t t-set="trans_text_singular">
%s review
</t>
<t t-set="rating_count"
t-value="(trans_text_plural if product.rating_count > 1 else trans_text_singular) % product.rating_count"/>
</t>
</a>
</t>
<p t-field="product.description_sale"
class="text-muted my-2"
placeholder="A short description that will also appear on documents."/>
<form t-if="product._is_add_to_cart_possible()"
action="/shop/cart/update"
method="POST">
<input type="hidden"
name="csrf_token"
t-att-value="request.csrf_token()"/>
<div class="js_product js_main_product mb-3">
<div>
<t t-call="website_sale.product_price"/>
<small class="ml-1 text-muted o_base_unit_price_wrapper d-none"
groups="website_sale.group_show_uom_price">
<t t-call='website_sale.base_unit_price'/>
</small>
</div>
<t t-placeholder="select">
<input type="hidden"
class="product_id"
name="product_id"
t-att-value="product_variant.id"/>
<input type="hidden"
class="product_template_id"
name="product_template_id"
t-att-value="product.id"/>
<input t-if="product.public_categ_ids.ids"
type="hidden"
class="product_category_id"
name="product_category_id"
t-att-value="product.public_categ_ids.ids[0]"/>
<t t-if="combination"
t-call="sale.variants">
<t t-set="ul_class"
t-valuef="flex-column"/>
<t t-set="parent_combination"
t-value="None"/>
</t>
<t t-else="">
<ul class="d-none js_add_cart_variants"
t-att-data-attribute_exclusions="{'exclusions: []'}"/>
</t>
</t>
<p t-if="True"
class="css_not_available_msg alert alert-warning">
This combination does
not exist.
</p>
<div id="add_to_cart_wrap"
class="d-inline">
<a role="button"
id="add_to_cart"
class="btn btn-primary btn-lg js_check_product a-submit my-1 mr-1 px-5 font-weight-bold flex-grow-1"
href="#"><i
class="fa fa-shopping-cart mr-2"/>
ADD TO CART
</a>
<div id="product_option_block"
class="d-inline-block align-middle"/>
</div>
</div>
</form>
<p t-elif="not product.active"
class="alert alert-warning">This
product is no longer available.
</p>
<p t-else=""
class="alert alert-warning">This
product has no valid
combination.
</p>
<div id="product_attributes_simple">
<t t-set="single_value_attributes"
t-value="product.valid_product_template_attribute_line_ids._prepare_single_value_for_display()"/>
<table t-attf-class="table table-sm text-muted {{'' if single_value_attributes else 'd-none'}}">
<t t-foreach="single_value_attributes"
t-as="attribute">
<tr>
<td>
<span t-field="attribute.name"/>
:
<t t-foreach="single_value_attributes[attribute]"
t-as="ptal">
<span t-field="ptal.product_template_value_ids._only_active().name"/>
<t t-if="not ptal_last">
,
</t>
</t>
</td>
</tr>
</t>
</table>
</div>
<div id="o_product_terms_and_share">
</div>
</div>
</div>
</section>
<div itemprop="description"
t-field="product.website_description"
class="oe_structure oe_empty mt16"
id="product_full_description"/>
<div class="oe_structure oe_empty oe_structure_not_nearest mt16"
id="oe_structure_website_sale_product_2"
data-editor-message="DROP BUILDING BLOCKS HERE TO MAKE THEM AVAILABLE ACROSS ALL PRODUCTS"/>
</div>
</t>
</div>
</div>
</div>
</div>
</template>
</odoo>