5 changed files with 226 additions and 170 deletions
@ -1,172 +1,218 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<odoo> |
<odoo> |
||||
<!-- Template for hiding product price when 'price_call' is set --> |
<!-- Template for hiding product price when 'price_call' is set --> |
||||
<template id="shop_hide_price_call" inherit_id="website_sale.products_item"> |
<template id="shop_hide_price_call" inherit_id="website_sale.products_item"> |
||||
<xpath expr="//div[hasclass('product_price')]" position="replace"> |
<xpath expr="//div[hasclass('product_price')]" position="replace"> |
||||
<t t-foreach="product.product_variant_ids" t-as="variant"> |
<t t-foreach="product.product_variant_ids" t-as="variant"> |
||||
<t t-if="variant.price_call"> |
<t t-if="variant.price_call"> |
||||
<t t-set="has_price_call" t-value="True"/> |
<t t-set="has_price_call" t-value="True"/> |
||||
<t t-break="1"/></t> |
<t t-break="1"/> |
||||
</t> |
</t> |
||||
<t t-if="has_price_call"></t> |
</t> |
||||
<t t-else=""> |
<t t-if="has_price_call"></t> |
||||
<div class="product_price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer"> |
<t t-else=""> |
||||
<t t-if="'base_price' in template_price_vals"> |
<div class="product_price" itemprop="offers" |
||||
<del t-attf-class="text-muted me-1 h6 mb-0" style="white-space: nowrap;"> |
itemscope="itemscope" |
||||
<em class="small" t-esc="template_price_vals['base_price']" |
itemtype="http://schema.org/Offer"> |
||||
|
<t t-if="'base_price' in template_price_vals"> |
||||
|
<del t-attf-class="text-muted me-1 h6 mb-0" |
||||
|
style="white-space: nowrap;"> |
||||
|
<em class="small" |
||||
|
t-esc="template_price_vals['base_price']" |
||||
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> |
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> |
||||
</del> |
</del> |
||||
</t> |
</t> |
||||
<span class="h6 mb-0" |
<span class="h6 mb-0" |
||||
t-if="template_price_vals['price_reduce'] or not website.prevent_zero_price_sale" |
t-if="template_price_vals['price_reduce'] or not website.prevent_zero_price_sale" |
||||
t-esc="template_price_vals['price_reduce']" |
t-esc="template_price_vals['price_reduce']" |
||||
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> |
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> |
||||
<span class="h6 mb-0" t-else="" t-field="website.prevent_zero_price_sale_text"/> |
<span class="h6 mb-0" t-else="" |
||||
<span itemprop="price" style="display:none;" t-esc="template_price_vals['price_reduce']"/> |
t-field="website.prevent_zero_price_sale_text"/> |
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name"/> |
<span itemprop="price" style="display:none;" |
||||
</div> |
t-esc="template_price_vals['price_reduce']"/> |
||||
</t> |
<span itemprop="priceCurrency" style="display:none;" |
||||
</xpath> |
t-esc="website.currency_id.name"/> |
||||
</template> |
</div> |
||||
<!-- Template for hiding search details --> |
</t> |
||||
<template id="hide_search" inherit_id="website_sale.search"> |
</xpath> |
||||
<xpath expr="//t[@t-set='display_detail']" position="replace"> |
</template> |
||||
<t t-set="display_detail" t-valuef="false"/> |
<!-- Template for hiding search details --> |
||||
</xpath> |
<template id="hide_search" inherit_id="website_sale.search"> |
||||
</template> |
<xpath expr="//t[@t-set='display_detail']" position="replace"> |
||||
<!-- Template for product price display --> |
<t t-set="display_detail" t-valuef="false"/> |
||||
<template id="product_price" inherit_id="website_sale.product_price"> |
</xpath> |
||||
<xpath expr="//div[@itemprop='offers']" position="replace"> |
</template> |
||||
<div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" t-attf-class="product_price mt-2 mb-3 {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-block'}}"> |
<!-- Template for product price display --> |
||||
<h3 class="css_editable_mode_hidden" id="price_of_product"> |
<template id="product_price" inherit_id="website_sale.product_price"> |
||||
<span class="oe_price" style="white-space: nowrap;" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> |
<xpath expr="//div[@itemprop='offers']" position="replace"> |
||||
<span itemprop="price" style="display:none;" t-esc="combination_info['price']"/> |
<div itemprop="offers" itemscope="itemscope" |
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name"/> |
itemtype="http://schema.org/Offer" |
||||
<span t-attf-class="text-danger oe_default_price ms-1 h5 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="text-decoration: line-through; white-space: nowrap;" |
t-attf-class="product_price mt-2 mb-3 {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-block'}}"> |
||||
t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" |
<h3 class="css_editable_mode_hidden" id="price_of_product"> |
||||
itemprop="listPrice" |
<span class="oe_price" style="white-space: nowrap;" |
||||
/> |
t-esc="combination_info['price']" |
||||
<t t-esc="product_id"/> |
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> |
||||
<t t-if="is_view_active('website_sale.tax_indication')" t-call="website_sale.tax_indication"/> |
<span itemprop="price" style="display:none;" |
||||
<del t-if="product.compare_list_price"> |
t-esc="combination_info['price']"/> |
||||
<bdi dir="inherit"> |
<span itemprop="priceCurrency" style="display:none;" |
||||
<span t-field="product.compare_list_price" |
t-esc="website.currency_id.name"/> |
||||
groups="website_sale.group_product_price_comparison" |
<span t-attf-class="text-danger oe_default_price ms-1 h5 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" |
||||
t-options='{"widget": "monetary", |
style="text-decoration: line-through; white-space: nowrap;" |
||||
|
t-esc="combination_info['list_price']" |
||||
|
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" |
||||
|
itemprop="listPrice" |
||||
|
/> |
||||
|
<t t-esc="product_id"/> |
||||
|
<t t-if="is_view_active('website_sale.tax_indication')" |
||||
|
t-call="website_sale.tax_indication"/> |
||||
|
<del t-if="product.compare_list_price"> |
||||
|
<bdi dir="inherit"> |
||||
|
<span t-field="product.compare_list_price" |
||||
|
groups="website_sale.group_product_price_comparison" |
||||
|
t-options='{"widget": "monetary", |
||||
"display_currency": product.currency_id, |
"display_currency": product.currency_id, |
||||
}'/> |
}'/> |
||||
</bdi> |
</bdi> |
||||
</del> |
</del> |
||||
</h3> |
</h3> |
||||
<h3 id="price_of_products" class="css_non_editable_mode_hidden decimal_precision" t-att-data-precision="str(website.currency_id.decimal_places)" style="display:none"> |
<h3 id="price_of_products" |
||||
<span t-field="product.list_price" |
class="css_non_editable_mode_hidden decimal_precision" |
||||
t-options='{"widget": "monetary", |
t-att-data-precision="str(website.currency_id.decimal_places)" |
||||
|
style="display:none"> |
||||
|
<span t-field="product.list_price" |
||||
|
t-options='{"widget": "monetary", |
||||
"display_currency": product.currency_id, |
"display_currency": product.currency_id, |
||||
}'/> |
}'/> |
||||
<t t-if="is_view_active('website_sale.tax_indication')" t-call="website_sale.tax_indication"/> |
<t t-if="is_view_active('website_sale.tax_indication')" |
||||
<del t-if="product.compare_list_price"> |
t-call="website_sale.tax_indication"/> |
||||
<bdi dir="inherit"> |
<del t-if="product.compare_list_price"> |
||||
<span t-field="product.compare_list_price" |
<bdi dir="inherit"> |
||||
groups="website_sale.group_product_price_comparison" |
<span t-field="product.compare_list_price" |
||||
t-options='{"widget": "monetary", |
groups="website_sale.group_product_price_comparison" |
||||
|
t-options='{"widget": "monetary", |
||||
"display_currency": product.currency_id, |
"display_currency": product.currency_id, |
||||
}'/> |
}'/> |
||||
</bdi> |
</bdi> |
||||
</del> |
</del> |
||||
</h3> |
</h3> |
||||
</div> |
</div> |
||||
<div id="product_unavailable" t-attf-class="{{'d-flex' if combination_info['prevent_zero_price_sale'] else 'd-none'}}"> |
<div id="product_unavailable" |
||||
<h3 class="fst-italic" t-field="website.prevent_zero_price_sale_text"/> |
t-attf-class="{{'d-flex' if combination_info['prevent_zero_price_sale'] else 'd-none'}}"> |
||||
</div> |
<h3 class="fst-italic" |
||||
<div id="price_call_hide" style="display:none"> |
t-field="website.prevent_zero_price_sale_text"/> |
||||
<div> |
</div> |
||||
<div class="alert alert-success" id="alert_message" |
<div id="price_call_hide" style="display:none"> |
||||
style="display:none"> |
<div> |
||||
Thank you for information, we will get back to you asap. |
<div class="alert alert-success" id="alert_message" |
||||
|
style="display:none"> |
||||
|
Thank you for information, we will get back to you |
||||
|
asap. |
||||
|
</div> |
||||
|
<a role="button" class="btn btn-primary" |
||||
|
href="#call_for_price" |
||||
|
data-bs-toggle="modal" |
||||
|
id="button_call_for_price"> |
||||
|
Call for Price |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
<!-- Template for 'Call for Price' modal --> |
||||
|
<template id="shop_product_hide_price" inherit_id="website_sale.product"> |
||||
|
<xpath expr="//div[@id='o_product_terms_and_share']" |
||||
|
position="before"> |
||||
|
<div id="call_for_price" class="modal fade"> |
||||
|
<div class="modal-dialog modal-content" style="height:auto"> |
||||
|
<div class="page"> |
||||
|
<h3> |
||||
|
<center>Call For Price</center> |
||||
|
</h3> |
||||
|
</div> |
||||
|
<input type="hidden" name="product_id" id="product_id" |
||||
|
t-att-value="product.id"/> |
||||
|
<hr/> |
||||
|
<center> |
||||
|
<table style="width:500px"> |
||||
|
<tr style="height:60px"> |
||||
|
<td style="width:100px"> |
||||
|
<label for="first_name" |
||||
|
class="control-label">First |
||||
|
Name:* |
||||
|
</label> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="form-control" |
||||
|
name="first_name" |
||||
|
id="first_name" |
||||
|
required="required"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr style="height:60px"> |
||||
|
<td> |
||||
|
<label for="last_name" |
||||
|
class="control-label">Last Name: |
||||
|
</label> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="form-control" |
||||
|
name="last_name" |
||||
|
id="last_name"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr style="height:60px"> |
||||
|
<td> |
||||
|
<label for="email">Email</label> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="form-control" |
||||
|
name="email" |
||||
|
id="email" required="required"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr style="height:60px"> |
||||
|
<td> |
||||
|
<label for="phone">Contact No.*</label> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="form-control" |
||||
|
id="phone" name="phone"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr style="height:60px"> |
||||
|
<td> |
||||
|
<label>Quantity</label> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="number" |
||||
|
class="form-control" |
||||
|
name="quantity" id="quantity"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr style="height:60px"> |
||||
|
<td> |
||||
|
<label>Message</label> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="form-control" |
||||
|
name="message" id="message"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
<hr/> |
||||
|
<button id="send_btn" type="button" |
||||
|
data-bs-dismiss="modal" |
||||
|
class="btn btn-primary">Send |
||||
|
</button> |
||||
|
<button type="button" |
||||
|
class="btn btn-outline-secondary" |
||||
|
data-bs-dismiss="modal" |
||||
|
id="call_modal_close"> |
||||
|
Close |
||||
|
</button> |
||||
|
</center> |
||||
</div> |
</div> |
||||
<a role="button" class="btn btn-primary" href="#call_for_price" |
</div> |
||||
data-bs-toggle="modal" |
</xpath> |
||||
id="button_call_for_price"> |
</template> |
||||
Call for Price |
|
||||
</a> |
|
||||
</div> |
|
||||
</div> |
|
||||
</xpath> |
|
||||
</template> |
|
||||
<!-- Template for 'Call for Price' modal --> |
|
||||
<template id="shop_product_hide_price" inherit_id="website_sale.product"> |
|
||||
<xpath expr="//div[@id='o_product_terms_and_share']" position="before"> |
|
||||
<div id="call_for_price" class="modal fade"> |
|
||||
<div class="modal-dialog modal-content" style="height:auto"> |
|
||||
<div class="page"> |
|
||||
<h3> |
|
||||
<center>Call For Price</center> |
|
||||
</h3> |
|
||||
</div> |
|
||||
<input type="hidden" name="product_id" id="product_id" t-att-value="product.id"/> |
|
||||
<hr/> |
|
||||
<center> |
|
||||
<table style="width:500px"> |
|
||||
<tr style="height:60px"> |
|
||||
<td style="width:100px"> |
|
||||
<label for="first_name" class="control-label">First Name:*</label> |
|
||||
</td> |
|
||||
<td> |
|
||||
<input type="text" class="form-control" name="first_name" |
|
||||
id="first_name" required="required"/> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr style="height:60px"> |
|
||||
<td> |
|
||||
<label for="last_name" class="control-label">Last Name:</label> |
|
||||
</td> |
|
||||
<td> |
|
||||
<input type="text" class="form-control" name="last_name" |
|
||||
id="last_name"/> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr style="height:60px"> |
|
||||
<td> |
|
||||
<label for="email">Email </label> |
|
||||
</td> |
|
||||
<td> |
|
||||
<input type="text" class="form-control" name="email" |
|
||||
id="email" required="required"/> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr style="height:60px"> |
|
||||
<td> |
|
||||
<label for="phone">Contact No.*</label> |
|
||||
</td> |
|
||||
<td> |
|
||||
<input type="text" class="form-control" id="phone" name="phone"/> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr style="height:60px"> |
|
||||
<td> |
|
||||
<label>Quantity</label> |
|
||||
</td> |
|
||||
<td> |
|
||||
<input type="number" class="form-control" name="quantity" id="quantity"/> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr style="height:60px"> |
|
||||
<td> |
|
||||
<label>Message</label> |
|
||||
</td> |
|
||||
<td> |
|
||||
<input type="text" class="form-control" name="message" id="message"/> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<hr/> |
|
||||
<button id="send_btn" type="button" data-bs-dismiss="modal" class="btn btn-primary">Send</button> |
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal" id="call_modal_close"> |
|
||||
Close |
|
||||
</button> |
|
||||
</center> |
|
||||
</div> |
|
||||
</div> |
|
||||
</xpath> |
|
||||
</template> |
|
||||
</odoo> |
</odoo> |
||||
|
Loading…
Reference in new issue