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.
 
 
 
 
 

165 lines
8.3 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="diva_product_view" name="Diva Product View"
inherit_id="website_sale.product">
<xpath expr="//a[@id='add_to_cart']" position="replace">
<!-- Replaced add to cart with new one-->
<a role="button" id="add_to_cart" style="margin-right:-30px;"
class="btn btn-add btn-primary btn-lg mt16 js_check_product
a-submit d-block d-sm-inline-block" href="#">
<i class="bi bi-cart2"/> Add to Cart</a>
</xpath>
<xpath expr="//h1[@t-field='product.name']" position="replace">
<h1 itemprop="name" t-field="product.name"
style="margin-right:155px;">Product Name</h1>
</xpath>
<xpath expr="//h1[@t-field='product.name']" position="after">
<!-- Review and rating section-->
<div class="rate row" style="padding-bottom:20px;">
<div class="o_shop_discussion_rating">
<t t-set="val_decimal"
t-value="round(product.rating_count % 1, 1)"/>
<t t-set="val_integer"
t-value="int(product.rating_count)"/>
<t t-set="empty_star"
t-value="5 - (val_integer+1) if val_decimal else 5 - val_integer"/>
<div class="o_website_rating_static"
t-att-style="inline_mode and 'display:inline'">
<t t-foreach="range(0, val_integer)"
t-as="num">
<i class="fa fa-star"
style="color:#50449c;"
role="img"/>
</t>
<t t-if="val_decimal">
<i class="fa fa-star-half-o"
style="color:#50449c;"
role="img"/>
</t>
<t t-foreach="range(0, empty_star)"
t-as="num">
<i class="fa fa-star text-black-25"
style="color:#50449c;"
role="img"/>
</t>
</div>
</div>
&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp
<div class="review" style="color: #3ec1b6">
<t t-esc="product.rating_total"/>
reviews(s)
</div>
&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp
<div class="review">
<a href="#home-tab">
Write a review
</a>
</div>
</div>
</xpath>
<xpath expr="//div[@id='product_full_description']" position="after">
<div class="row">
<div class="tab_section"
style="padding-left:100px; padding-right:100px;">
<div class="wrapp">
<ul class="nav nav-tabs" id="myTab"
role="tablist">
<li class="nav-item"
role="presentation">
<button class="nav-link active"
id="home-tab"
data-bs-toggle="tab"
data-bs-target="#home"
type="button" role="tab"
aria-controls="home"
aria-selected="false">
Description
</button>
</li>
<li class="nav-item"
role="presentation">
<button class="nav-link"
id="profile-tab"
data-bs-toggle="tab"
data-bs-target="#profile"
type="button" role="tab"
aria-controls="profile"
aria-selected="true">
Customer Review
</button>
</li>
</ul>
<div class="tab-content"
id="myTabContent">
<div class="tab-pane fade show active"
id="home" role="tabpanel"
aria-labelledby="home-tab">
<div class="wrapp">
<p t-field="product.description_sale"
class="abt"
placeholder="A short description that
will also appear on documents."/>
</div>
</div>
<div class="tab-pane fade"
id="profile" role="tabpanel"
aria-labelledby="profile-tab">
<div class="o_shop_discussion_rating">
<section class="container mt16 mb16">
<div class="row">
<div class="col-lg-8 offset-lg-2">
<t t-call="portal.message_thread">
<t t-set="object"
t-value="product"/>
<t t-set="display_rating"
t-value="True"/>
</t>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</template>
<template id="product_rating" inherit_id="website_sale.product_comment">
<xpath expr="//div[@t-field='product.website_description']"
position="replace">
<!-- Replaced the website description-->
</xpath>
</template>
<template id="diva_product_price" inherit_id="website_sale.product_price">
<xpath expr="//div[@itemprop='offers']"
position="replace">
<!-- Setting up the product price-->
<div itemprop="offers" itemscope="itemscope"
itemtype="http://schema.org/Offer" class="product_price mt16">
<h4 class="oe_price_h4 css_editable_mode_hidden">
<span t-attf-class="text-danger oe_default_price {{'' if combination_info['has_discounted_price'] else 'd-none'}}"
style="text-decoration: line-through; white-space: nowrap;"
t-esc="combination_info['list_price']"
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"
/>
<b class="oe_price" style="white-space: nowrap; margin-right:250px;"
t-esc="combination_info['price']"
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
<span itemprop="price" style="display:none;"
t-esc="combination_info['price']"/>
<span itemprop="priceCurrency" style="display:none;"
t-esc="website.currency_id.name"/>
</h4>
<h4 class="css_non_editable_mode_hidden decimal_precision"
t-att-data-precision="str(website.currency_id.decimal_places)">
<span t-field="product.list_price"
t-options='{
"widget": "monetary",
"display_currency": product.currency_id,
}'/>
</h4>
</div>
</xpath>
</template>
</odoo>