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.
265 lines
16 KiB
265 lines
16 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<template id="cart_view" inherit_id="website_sale.cart" active="True"
|
|
name="Cart Page">
|
|
<!-- Adding breadcrumbs-->
|
|
<xpath expr="//div[hasclass('container')]" position="before">
|
|
<section class="cart">
|
|
<div class="wrapper">
|
|
<div class="container">
|
|
<div class="abt_top">
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/">Home</a>
|
|
</li>
|
|
<li class="breadcrumb-item active"
|
|
aria-current="page">Shopping Cart
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
<div class="abt_heading">
|
|
<h3>Shopping Cart</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</xpath>
|
|
<xpath expr="//t[@t-call='website_sale.cart_lines']"
|
|
position="replace">
|
|
<!-- Removed the cart lines and added the cart lines with new styles-->
|
|
<div t-if="not website_sale_order or not website_sale_order.website_order_line"
|
|
class="js_cart_lines alert alert-info">
|
|
Your cart is empty!
|
|
</div>
|
|
<div class="table_wrapper clearfix">
|
|
<table class="mb16 table table-striped table-sm js_cart_lines table-responsive table-borderless"
|
|
id="cart_products" style="display: inline-table;"
|
|
t-if="website_sale_order and website_sale_order.website_order_line">
|
|
<thead style="border: 1px solid;
|
|
border-color: transparent;
|
|
border-bottom-color: #c3c1cca6 !important;
|
|
border-top-color: #c3c1cca6 !important;">
|
|
<tr>
|
|
<th scope="col" class="td-img"
|
|
style="text-align:center;">Product
|
|
</th>
|
|
<th/>
|
|
<th scope="col" class="text-center td-qty">
|
|
Price
|
|
</th>
|
|
<th scope="col" class="text-center td-price">
|
|
Quantity
|
|
</th>
|
|
<th scope="col" class="text-center td-action"/>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="website_sale_order.website_order_line"
|
|
t-as="line">
|
|
<tr style="background-color: white !important;"
|
|
t-att-class="'optional_product info' if line.linked_line_id else None">
|
|
<td colspan="2"
|
|
t-if="not line.product_id.product_tmpl_id"
|
|
class='td-img col-lg-5 col-md-5 col-6'/>
|
|
<td align="center"
|
|
t-if="line.product_id.product_tmpl_id"
|
|
class='td-img col-lg-5 col-md-5 col-6'>
|
|
<div class="wrapper">
|
|
<span t-field="line.product_id.image_128"
|
|
t-options="{'widget': 'image',
|
|
'qweb_img_responsive': False,
|
|
'class': 'rounded o_image_64_max'}"/>
|
|
</div>
|
|
</td>
|
|
<td t-if="line.product_id.product_tmpl_id"
|
|
class='td-product_name'>
|
|
<div>
|
|
<t t-call="website_sale.cart_line_product_link">
|
|
<span style="font-size:14px; color:black;"
|
|
t-field="line.name_short"/>
|
|
</t>
|
|
</div>
|
|
</td>
|
|
<td class="text-center td-price col-2"
|
|
name="price">
|
|
<t t-set="combination"
|
|
t-value="line.product_id.product_template_attribute_value_ids + line.product_no_variant_attribute_value_ids"/>
|
|
<t t-set="combination_info"
|
|
t-value="line.product_id.product_tmpl_id._get_combination_info(combination, pricelist=website_sale_order.pricelist_id)"/>
|
|
|
|
<t t-set="list_price_converted"
|
|
t-value="website.currency_id._convert(combination_info['list_price'], website_sale_order.currency_id, website_sale_order.company_id, date)"/>
|
|
<t groups="account.group_show_line_subtotals_tax_excluded"
|
|
t-if="(website_sale_order.pricelist_id.discount_policy == 'without_discount' and website_sale_order.currency_id.compare_amounts(list_price_converted, line.price_reduce_taxexcl) == 1) or website_sale_order.currency_id.compare_amounts(line.price_unit, line.price_reduce) == 1"
|
|
name="order_line_discount">
|
|
<del t-attf-class="#{'text-danger mr8'}"
|
|
style="white-space: nowrap;"
|
|
t-esc="list_price_converted"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
</t>
|
|
<span t-field="line.price_reduce_taxexcl"
|
|
style="white-space: nowrap;"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"
|
|
groups="account.group_show_line_subtotals_tax_excluded"/>
|
|
<t groups="account.group_show_line_subtotals_tax_included"
|
|
t-if="(website_sale_order.pricelist_id.discount_policy == 'without_discount' and website_sale_order.currency_id.compare_amounts(list_price_converted, line.price_reduce_taxinc) == 1) or website_sale_order.currency_id.compare_amounts(line.price_unit, line.price_reduce) == 1"
|
|
name="order_line_discount">
|
|
<del t-attf-class="#{'text-danger mr8'}"
|
|
style="white-space: nowrap;"
|
|
t-esc="list_price_converted"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
</t>
|
|
<span t-field="line.price_reduce_taxinc"
|
|
style="white-space: nowrap;"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"
|
|
groups="account.group_show_line_subtotals_tax_included"/>
|
|
</td>
|
|
<td class="text-center td-qty col-lg-3 col-md-3 col-2">
|
|
<div class="css_quantity input-group mx-auto">
|
|
<div class="input-group-prepend">
|
|
<a t-attf-href="#"
|
|
class="btn btn-link js_add_cart_json d-none d-md-inline-block"
|
|
aria-label="Remove one"
|
|
title="Remove one">
|
|
<i class="fa fa-minus"/>
|
|
</a>
|
|
</div>
|
|
<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"/>
|
|
<div class="input-group-append">
|
|
<a t-attf-href="#"
|
|
class="btn btn-link float_left js_add_cart_json d-none d-md-inline-block"
|
|
aria-label="Add one"
|
|
title="Add one">
|
|
<i class="fa fa-plus"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td class="td-action">
|
|
<a href='#'
|
|
aria-label="Remove from cart"
|
|
title="Remove from cart"
|
|
class='js_delete_product no-decoration'>
|
|
<small>
|
|
<i class='fa fa-trash-o'/>
|
|
</small>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</xpath>
|
|
<xpath expr="//t[@t-call='website_sale.short_cart_summary']"
|
|
position="replace">
|
|
<!-- Removed the cart summary and added it with new styles-->
|
|
<div class="card js_cart_summary"
|
|
t-if="website_sale_order and website_sale_order.website_order_line">
|
|
<div class="card-body">
|
|
<h4 style="color:#0f0e0e; font-weight:700;"
|
|
class="d-none d-xl-block">Order Summery
|
|
</h4>
|
|
<hr class="d-none d-xl-block"/>
|
|
<div class="sub"
|
|
style="display: flex;justify-content: space-between;padding: 15px 0;color: #6c6a74;">
|
|
<div class="total_rate">
|
|
Subtotal
|
|
</div>
|
|
<span t-field="website_sale_order.amount_untaxed"
|
|
class="monetary_field"
|
|
style="white-space: nowrap;"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
</div>
|
|
<div class="total"
|
|
style="display: flex;justify-content: space-between;font-weight: 700;color: #0f0e0e;">
|
|
<div class="main">Total
|
|
</div>
|
|
<strong t-field="website_sale_order.amount_total"
|
|
class="monetary_field"
|
|
t-options='{"widget": "monetary", "display_currency": website_sale_order.pricelist_id.currency_id}'/>
|
|
</div>
|
|
<a role="button"
|
|
t-if="website_sale_order and website_sale_order.website_order_line"
|
|
href="/shop/checkout?express=1"
|
|
class=" btn btn-checkout">PROCEED
|
|
TO CHECKOUT
|
|
</a>
|
|
<div class="coupon">
|
|
<div class="wrapper">
|
|
<p class="qt_heading active">
|
|
<a class="btn btn-collapse "
|
|
data-toggle="collapse"
|
|
href="#collapseExample1"
|
|
role="button" aria-expanded="false"
|
|
aria-controls="collapseExample">
|
|
Apply Coupon
|
|
<i class="bi bi-arrow-down-short"/>
|
|
</a>
|
|
<!-- <i class="bi bi-arrow-down-short"></i> -->
|
|
</p>
|
|
<div class="collapse" id="collapseExample1">
|
|
<div class="content">
|
|
<p>
|
|
If you have a promotion code
|
|
enter
|
|
it
|
|
here.
|
|
</p>
|
|
<div class="c_wrapper">
|
|
<form t-att-action="'/shop/pricelist%s' % (redirect and '?r=' + redirect or '')"
|
|
method="post"
|
|
name="coupon_code">
|
|
<input type="hidden"
|
|
name="csrf_token"
|
|
t-att-value="request.csrf_token()"/>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<input name="promo"
|
|
t-att-value="website_sale_order.pricelist_id.code or None"
|
|
type="text"
|
|
class="form-control"
|
|
placeholder=""/>
|
|
</div>
|
|
<div class="col-12">
|
|
<a href="#"
|
|
role="button"
|
|
class="btn btn-checkout a-submit">
|
|
APPLY
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<t t-if="request.params.get('code_not_available')"
|
|
name="code_not_available">
|
|
<div class="alert alert-danger text-left"
|
|
role="alert">This promo
|
|
code is not available.
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="continue"
|
|
style="margin-bottom: 60px;text-align: end;">
|
|
<a href="/shop"
|
|
style="color: #3ec1b6;text-transform: uppercase;">
|
|
<i class="bi bi-arrow-left-short"/>
|
|
Continue
|
|
Shopping
|
|
</a>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|
|
|