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.
166 lines
10 KiB
166 lines
10 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- This XML template customizes the appearance and functionality of cart lines in the shopping cart page -->
|
|
<template id="coffee_cart_lines" inherit_id="website_sale.cart_lines"
|
|
name="Coffee Cart Lines">
|
|
<xpath expr="//table[@id='cart_products']" position="replace">
|
|
<table t-if="website_sale_order and website_sale_order.website_order_line"
|
|
class="mb16 table-striped table-sm js_cart_lines"
|
|
id="cart_products">
|
|
<t t-set="show_qty"
|
|
t-value="is_view_active('website_sale.product_quantity')"/>
|
|
<thead>
|
|
<tr>
|
|
<th class="td-img">Product</th>
|
|
<th/>
|
|
<th class="text-center td-qty">
|
|
<t t-if="show_qty">
|
|
Quantity
|
|
</t>
|
|
</th>
|
|
<th class="text-center td-price">Price</th>
|
|
<th class="text-center td-price">Total</th>
|
|
<th class="text-center td-action"/>
|
|
</tr>
|
|
<tr class="height_30"/>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="website_sale_order.website_order_line"
|
|
t-as="line">
|
|
<tr t-att-class="'optional_product info' if line.linked_line_id else None"
|
|
class="cstm_tbl">
|
|
<td t-if="not line.product_id" colspan="2"
|
|
class='td-img cstm_tbl'/>
|
|
<t t-else="">
|
|
<td align="center"
|
|
class='td-img cstm_tbl image_td'>
|
|
<span t-if="line._is_not_sellable_line() and line.product_id.image_128">
|
|
<img t-att-src="image_data_uri(line.product_id.image_128)"
|
|
class="sample"
|
|
t-att-alt="line.name_short"/>
|
|
</span>
|
|
<span t-else=""
|
|
t-field="line.product_id.image_128"
|
|
t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'sample'}"
|
|
/>
|
|
</td>
|
|
<td class='td-product_name cstm_tbl'>
|
|
<div>
|
|
<t t-call="website_sale.cart_line_product_link">
|
|
<p class="item-name">
|
|
<strong t-field="line.name_short"/>
|
|
</p>
|
|
</t>
|
|
</div>
|
|
<p class="item-about">
|
|
<t t-esc="line.product_id.categ_id.name"/>
|
|
</p>
|
|
<div class="product-indicate">
|
|
<div class="indicate-content"/>
|
|
</div>
|
|
</td>
|
|
</t>
|
|
<td class="text-center td-qty cstm_tbl">
|
|
<div class="css_quantity input-group mx-auto justify-content-center">
|
|
<t t-if="not line._is_not_sellable_line()">
|
|
<t t-if="show_qty">
|
|
<div class="counter">
|
|
<div class="box-container">
|
|
<a t-attf-href="#"
|
|
class="btn btn-link js_add_cart_json d-none d-md-inline-block border_link"
|
|
aria-label="Remove one"
|
|
title="Remove one">
|
|
<i class="fa fa-minus"/>
|
|
</a>
|
|
<input type="text"
|
|
class="js_quantity form-control quantity"
|
|
t-att-data-line-id="line.id"
|
|
t-att-data-product-id="line.product_id.id"
|
|
t-att-value="int(line.product_uom_qty) == line.product_uom_qty and int(line.product_uom_qty) or line.product_uom_qty"/>
|
|
<t t-if="line._get_shop_warning(clear=False)">
|
|
<a t-attf-href="#"
|
|
class="btn btn-link">
|
|
<i class='fa fa-warning text-warning'
|
|
t-att-title="line._get_shop_warning()"
|
|
role="img"
|
|
aria-label="Warning"/>
|
|
</a>
|
|
</t>
|
|
<a t-else=''
|
|
t-attf-href="#"
|
|
class="btn btn-link float_left js_add_cart_json d-none d-md-inline-block border_link"
|
|
aria-label="Add one"
|
|
title="Add one">
|
|
<i class="fa fa-plus"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
<t t-else="">
|
|
<input type="hidden"
|
|
class="js_quantity form-control quantity"
|
|
t-att-data-line-id="line.id"
|
|
t-att-data-product-id="line.product_id.id"
|
|
t-att-value="int(line.product_uom_qty) == line.product_uom_qty and int(line.product_uom_qty) or line.product_uom_qty"/>
|
|
</t>
|
|
</t>
|
|
<t t-else="">
|
|
<span class="text-muted w-100"
|
|
t-esc="int(line.product_uom_qty)"/>
|
|
<input type="hidden"
|
|
class="js_quantity form-control quantity"
|
|
t-att-data-line-id="line.id"
|
|
t-att-data-product-id="line.product_id.id"
|
|
t-att-value="line.product_uom_qty"/>
|
|
</t>
|
|
</div>
|
|
</td>
|
|
<td class="text-center td-price cstm_tbl"
|
|
name="price">
|
|
<t groups="account.group_show_line_subtotals_tax_excluded">
|
|
<span t-field="line.price_reduce_taxexcl"
|
|
class="text-nowrap"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
</t>
|
|
<t groups="account.group_show_line_subtotals_tax_included">
|
|
<span t-field="line.price_reduce_taxinc"
|
|
class="text-nowrap"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
</t>
|
|
<t t-if="line.discount">
|
|
<del t-attf-class="#{'text-danger mr8'} text-nowrap"
|
|
t-esc="line.price_unit"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
</t>
|
|
<small t-if="not line._is_not_sellable_line() and line.product_id.base_unit_price"
|
|
class="cart_product_base_unit_price d-block text-muted"
|
|
groups="website_sale.group_show_uom_price">
|
|
<t t-call='website_sale.base_unit_price'>
|
|
<t t-set='product'
|
|
t-value='line.product_id'/>
|
|
</t>
|
|
</small>
|
|
</td>
|
|
<td class="cstm_tbl" align="center">
|
|
<t t-esc="website_sale_order.currency_id.symbol"/>
|
|
<t t-esc="line.price_subtotal"/>
|
|
</td>
|
|
<td class="td-action cstm_tbl">
|
|
<a href='#' aria-label="Remove from cart"
|
|
title="Remove from cart"
|
|
class='js_delete_product no-decoration'>
|
|
<div class="col remove">
|
|
<div class="close-circle">
|
|
<i class="fa fa-times"
|
|
aria-hidden="false"/>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|
|
|