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.
87 lines
3.9 KiB
87 lines
3.9 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<template id="voucher_code" inherit_id="website_sale.cart"
|
|
active="False" customize_show="True"
|
|
name="Voucher Code">
|
|
<xpath expr="//div[hasclass('o_website_sale_rightfit')]"
|
|
position="after">
|
|
<h4>Voucher Code</h4>
|
|
<p>
|
|
Have a voucher code? Fill this field and apply.
|
|
</p>
|
|
<t t-if="coupon_not_available">
|
|
<t t-if="coupon_not_available=='1'">
|
|
<p class="bg-warning">This gift code is not available</p>
|
|
</t>
|
|
<t t-if="coupon_not_available=='2'">
|
|
<p class="bg-warning">This gift code is not available</p>
|
|
</t>
|
|
<t t-if="coupon_not_available=='3'">
|
|
<p class="bg-warning">The discount amount is too large</p>
|
|
</t>
|
|
</t>
|
|
<form t-if="website_sale_order and website_sale_order.website_order_line"
|
|
action="/shop/gift_coupon" method="post"
|
|
class="mb32">
|
|
<input type="hidden" name="csrf_token"
|
|
t-att-value="request.csrf_token()" />
|
|
<div class="input-group">
|
|
<input name="promo_voucher" class="form-control"
|
|
type="text" placeholder="code..."
|
|
t-att-value="website_sale_order.pricelist_id.code or None" />
|
|
<div class="input-group-btn">
|
|
<a class="btn btn-default a-submit">Apply</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="cart_lines_extended" inherit_id="website_sale.cart_lines">
|
|
<xpath expr="//table[@id='cart_products']/thead/tr/th[1]" position="attributes">
|
|
<attribute name="width">100</attribute>
|
|
</xpath>
|
|
<xpath expr="//table[@id='cart_products']/thead/tr/th[3]" position="attributes">
|
|
<attribute name="width">130</attribute>
|
|
</xpath>
|
|
<xpath expr="//table[@id='cart_products']/thead/tr/th[4]" position="attributes">
|
|
<attribute name="width">100</attribute>
|
|
</xpath>
|
|
|
|
<xpath expr="//table[@id='cart_products']/tbody//td[hasclass('td-qty')]/div"
|
|
position="replace">
|
|
<div class="css_quantity input-group oe_website_spinner">
|
|
<t t-if="line.product_id.display_name == 'Gift Coupon'">
|
|
<a href='#' class='js_delete_product no-decoration'>
|
|
<small>
|
|
<i class='fa fa-trash-o'></i>
|
|
Remove
|
|
</small>
|
|
</a>
|
|
<input type="hidden" class="js_quantity form-control"
|
|
t-att-data-line-id="line.id"
|
|
t-att-data-product-id="line.product_id.id"
|
|
t-att-value="int(line.product_uom_qty)"
|
|
/>
|
|
</t>
|
|
|
|
<t t-if="line.product_id.display_name != 'Gift Coupon'">
|
|
<a t-attf-href="#"
|
|
class="mb8 input-group-addon js_add_cart_json"
|
|
data-no-instant="">
|
|
<i class="fa fa-minus"></i>
|
|
</a>
|
|
<input type="text" class="js_quantity form-control"
|
|
t-att-data-line-id="line.id"
|
|
t-att-data-product-id="line.product_id.id"
|
|
t-att-value="int(line.product_uom_qty)" />
|
|
<a t-attf-href="#"
|
|
class="mb8 input-group-addon float_left js_add_cart_json"
|
|
data-no-instant="">
|
|
<i class="fa fa-plus"></i>
|
|
</a>
|
|
</t>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|