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.
100 lines
6.4 KiB
100 lines
6.4 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<data>
|
|
<template id="watchhut_product_view" name="WatchHut Product View" inherit_id="website_sale.product">
|
|
<xpath expr="//div[hasclass('justify-content-end')]" position="replace"/>
|
|
<xpath expr="//div[hasclass('row')]" position="before">
|
|
<section class="banner">
|
|
<div class="container">
|
|
<div class="row">
|
|
<h3 class="banner_head">
|
|
Preview
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('col-xl-8')]" position="replace">
|
|
<section class="preview col-lg-6 col-12">
|
|
<div class="pre_wrapper">
|
|
<div class="row">
|
|
<div class="col-12 mb-4">
|
|
<div class="preview_img">
|
|
<t t-set="product_images" t-value="product_variant._get_images() if product_variant else product._get_images()"/>
|
|
<t t-foreach="product_images" t-as="product_image">
|
|
<span t-if="product_image" t-field="product_image.image_1920" t-options="{'widget': 'image'}"/>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</xpath>
|
|
<xpath expr="//div[@id='product_details']" position="replace">
|
|
<section class="preview col-lg-6 col-12">
|
|
<div class="preview_left">
|
|
<h2 itemprop="name" t-field="product.name">Product Name</h2>
|
|
<span itemprop="url" style="display:none;" t-esc="product.website_url"/>
|
|
<p class="price">
|
|
<t t-call="website_sale.product_price" />
|
|
</p>
|
|
<p t-field="product.description_sale" class="details" placeholder="A short description that will also appear on documents." />
|
|
<div id="product_attributes_simple">
|
|
<hr t-if="sum([(1 if len(l.value_ids)==1 else 0) for l in product.attribute_line_ids])"/>
|
|
<p class="text-muted">
|
|
<t t-set="single_value_attributes" t-value="product.valid_product_template_attribute_line_ids._prepare_single_value_for_display()"/>
|
|
<t t-foreach="single_value_attributes" t-as="attribute">
|
|
<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>
|
|
<br/>
|
|
</t>
|
|
</p>
|
|
</div>
|
|
<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">
|
|
<div class="quantity">
|
|
<label for="">Quantity</label>
|
|
<div class="css_quantity input-group" contenteditable="false">
|
|
<div class="input-group-prepend">
|
|
<a t-attf-href="#" class="btn btn-minus js_add_cart_json" aria-label="Remove one" title="Remove one">
|
|
<i class="fa fa-minus"/>
|
|
</a>
|
|
</div>
|
|
<input type="text" class="form-control input-number" data-min="1" name="add_qty" t-att-value="add_qty or 1"/>
|
|
<div class="input-group-append">
|
|
<a t-attf-href="#" class="btn btn-minus float_left js_add_cart_json" aria-label="Add one" title="Add one">
|
|
<i class="fa fa-plus"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</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" />
|
|
<t t-if="combination" t-call="sale.variants">
|
|
<t t-set="ul_class" t-value="'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>
|
|
<a role="button" id="add_to_cart" class="btn btn-add js_check_product a-submit" href="#">Add to Cart</a>
|
|
<div id="product_option_block"/>
|
|
</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>
|
|
</section>
|
|
</xpath>
|
|
<xpath expr="//a[@t-att-href='keep(category=0)']" position="replace">
|
|
<a t-att-href="keep(category=0)">Shop</a>
|
|
</xpath>
|
|
</template>
|
|
</data>
|
|
</odoo>
|