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.
476 lines
28 KiB
476 lines
28 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- Cart template customization-->
|
|
<template id="boec_cart" name="Boec Cart"
|
|
inherit_id="website_sale.cart">
|
|
<xpath expr="//div[hasclass('col')]" position="before">
|
|
<Section class="banner_sub">
|
|
<div class="wrapper">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="sub_page">
|
|
<div class="name">
|
|
Cart
|
|
</div>
|
|
<nav aria-label="breadcrumb " class="brd">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/">Home</a>
|
|
</li>
|
|
<i class="material-icons">
|
|
</i>
|
|
<li class="breadcrumb-item">
|
|
<a href="/shop">Shop</a>
|
|
</li>
|
|
<i class="material-icons">
|
|
</i>
|
|
<li class="breadcrumb-item active"
|
|
aria-current="page">Cart
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Section>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('col')]" position="replace">
|
|
<div class="col-12 col-xl-12 oe_cart">
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6 container mt-5">
|
|
<div t-if="abandoned_proceed or access_token"
|
|
class="mt8 mb8 alert alert-info"
|
|
role="alert"> <!-- abandoned cart choices -->
|
|
<t t-if="abandoned_proceed">
|
|
<p>Your previous cart has already been
|
|
completed.
|
|
</p>
|
|
<p t-if="website_sale_order">Please proceed
|
|
your current cart.
|
|
</p>
|
|
</t>
|
|
<t t-if="access_token">
|
|
<p>This is your current cart.</p>
|
|
<p>
|
|
<strong>
|
|
<a t-attf-href="/shop/cart/?access_token=#{access_token}&revive=squash">
|
|
Click here
|
|
</a>
|
|
</strong>
|
|
if you want to restore your previous
|
|
cart. Your current cart will be replaced
|
|
with your previous cart.
|
|
</p>
|
|
<p>
|
|
<strong>
|
|
<a t-attf-href="/shop/cart/?access_token=#{access_token}&revive=merge">
|
|
Click here
|
|
</a>
|
|
</strong>
|
|
if you want to merge your previous cart
|
|
into current cart.
|
|
</p>
|
|
</t>
|
|
</div>
|
|
<t t-call="website_sale.cart_lines"/>
|
|
<div class="clearfix"/>
|
|
<a role="button" href="/shop"
|
|
class="btn btn-update mb32 d-none d-xl-inline-block">
|
|
<span class="fa fa-chevron-left"/>
|
|
<span class="">Continue Shopping</span>
|
|
</a>
|
|
<a role="button"
|
|
t-if="website_sale_order and website_sale_order.website_order_line"
|
|
class="btn btn-cartd float-right d-none d-xl-inline-block"
|
|
href="/shop/checkout?express=1">
|
|
<span class="">Process Checkout</span>
|
|
<span class="fa fa-chevron-right"/>
|
|
</a>
|
|
<div class="oe_structure"
|
|
id="oe_structure_website_sale_cart_1"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('oe_cart')]" position="after">
|
|
<div class="oe_cart col-12 col-lg-12"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="theme_boec.checkout_layout" name="Boec Cart Button"
|
|
inherit_id="website_sale.checkout_layout">
|
|
<xpath expr="//div[@id='wrap']" position="replace">
|
|
<div class="oe_website_sale o_website_sale_checkout py-2">
|
|
<div t-attf-class="row #{show_navigation_button and 'position-relative'} #{not show_wizard_checkout and 'mt32'} mb32">
|
|
<div t-if="show_wizard_checkout" class="col-12 ml-5">
|
|
<t t-call="website_sale.wizard_checkout"/>
|
|
</div>
|
|
<div t-if="show_shorter_cart_summary"
|
|
class="offset-xl-1 col-lg-5 col-xl-4 order-2"
|
|
id="o_cart_summary"
|
|
style="display: flex;justify-content: flex-end;width: 100%;min-width: 70vw;">
|
|
<div class="o_total_card card sticky-lg-top"
|
|
t-if="website_sale_order and website_sale_order.website_order_line">
|
|
<div class="card-body p-0 p-lg-4">
|
|
<t t-call="website_sale.total"/>
|
|
<t t-call="payment.express_checkout"/>
|
|
<t t-call="website_sale.navigation_buttons"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div t-else=""
|
|
class="o_wsale_accordion accordion sticky-lg-top offset-xl-1 col-12 col-lg-5 col-xl-4 order-lg-2 rounded"
|
|
id="o_wsale_total_accordion">
|
|
<div class="o_total_card card sticky-lg-top">
|
|
<div class="accordion-item p-lg-4 border-0">
|
|
<div class="accordion-header d-block d-lg-none align-items-center mb-4">
|
|
<button class="accordion-button px-0 collapsed"
|
|
data-bs-toggle="collapse"
|
|
data-bs-target="#o_wsale_total_accordion_item"
|
|
aria-expanded="false"
|
|
aria-controls="o_wsale_total_accordion_item">
|
|
<div class="d-flex flex-wrap">
|
|
<b class="w-100">Order
|
|
summary
|
|
</b>
|
|
<span t-out="str(website_sale_order.cart_quantity)"/>
|
|
&nbsp;item(s)&nbsp;-&nbsp;
|
|
<span id="amount_total_summary"
|
|
class="monetary_field ms-1"
|
|
t-field="website_sale_order.amount_total"
|
|
t-options='{"widget": "monetary", "display_currency": website_sale_order.currency_id}'/>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
<div name="cart_summary_info"
|
|
t-if="not website_sale_order or not website_sale_order.website_order_line"
|
|
class="alert alert-info">
|
|
Your cart is empty!
|
|
</div>
|
|
<!-- Cart lines are showed in desktop but are in an hidden accordion in mobile -->
|
|
<div id="o_wsale_total_accordion_item"
|
|
class="accordion-collapse collapse mb-4 mb-lg-0"
|
|
data-bs-parent="#o_wsale_total_accordion">
|
|
<div t-att-class="len(website_sale_order.website_order_line) > 4 and 'o_wsale_scrollable_table mt-n4 me-n4 pt-4 pe-4'">
|
|
<table t-if="website_sale_order and website_sale_order.website_order_line"
|
|
class="table accordion-body mb-0"
|
|
id="cart_products">
|
|
<tbody>
|
|
<tr t-foreach="website_sale_order.website_order_line"
|
|
t-as="line"
|
|
t-att-class="line_last and 'border-transparent'">
|
|
<t t-set="o_cart_sum_padding_top"
|
|
t-value="'pt-3' if line_size > 1 and not line_first else 'pt-0'"/>
|
|
<td t-if="not line.product_id"
|
|
colspan="2"/>
|
|
<t t-else="">
|
|
<td t-attf-class="td-img ps-0 #{o_cart_sum_padding_top}">
|
|
<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="o_image_64_max img rounded"
|
|
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': 'o_image_64_max rounded'}"
|
|
/>
|
|
</td>
|
|
<td t-attf-class="#{o_cart_sum_padding_top} td-product_name td-qty w-100"
|
|
name='website_sale_cart_summary_product_name'>
|
|
<h6>
|
|
<t t-out="int(line.product_uom_qty)"/>
|
|
<t t-if="line._get_shop_warning(clear=False)">
|
|
<i class="fa fa-warning text-warning"
|
|
role="img"
|
|
t-att-title="line._get_shop_warning()"
|
|
aria-label="Warning"/>
|
|
</t>
|
|
x
|
|
<t t-out="line.name_short"/>
|
|
</h6>
|
|
</td>
|
|
</t>
|
|
<td t-attf-class="#{o_cart_sum_padding_top} td-price pe-0 text-end"
|
|
name="website_sale_cart_summary_line_price">
|
|
<span t-if="website.show_line_subtotals_tax_selection == 'tax_excluded'"
|
|
t-field="line.price_subtotal"
|
|
style="white-space: nowrap;"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
<span t-else=""
|
|
t-field="line.price_total"
|
|
style="white-space: nowrap;"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<t t-if='website_sale_order'>
|
|
<t t-set='warning'
|
|
t-value='website_sale_order._get_shop_warning(clear=False)'/>
|
|
<div t-if='warning'
|
|
class="alert alert-warning"
|
|
role="alert">
|
|
<strong>Warning!
|
|
</strong>
|
|
<t t-esc='website_sale_order._get_shop_warning()'/>
|
|
</div>
|
|
</t>
|
|
<t t-call="website_sale.total">
|
|
<t t-set="_cart_total_classes"
|
|
t-valuef="border-top pt-3"/>
|
|
</t>
|
|
</div>
|
|
<div t-if="show_navigation_button"
|
|
class="o_cta_navigation_container position-absolute position-lg-static start-0 bottom-0 col-12">
|
|
<t t-call="website_sale.navigation_buttons"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div t-attf-class="container oe_cart">
|
|
<t t-out="0"/>
|
|
</div>
|
|
|
|
<!-- This div serves as an anchor for the navigation buttons on the mobile
|
|
view. -->
|
|
<div t-if="not show_shorter_cart_summary and show_navigation_button"
|
|
class="o_cta_navigation_placeholder d-block d-lg-none order-lg-4"/>
|
|
</div>
|
|
</div>
|
|
<!-- This is the drag-and-drop area for website building blocs at the end of each
|
|
checkout page. The templates created in the database to store blocs are hooked
|
|
using XPath on the `oe_struture` element ID. Therefore, we can't use dynamic
|
|
IDs (like with t-att-id) and each template needs to define a div element. -->
|
|
<t t-out="oe_structure"/>
|
|
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="theme_boec.payment_delivery" name="Delivery Costs"
|
|
inherit_id="website_sale.payment">
|
|
<xpath expr="//div[@id='delivery_carrier']" position="replace">
|
|
<div t-if="deliveries" id="delivery_carrier" class="container">
|
|
<t t-set="delivery_nb" t-value="len(deliveries)"/>
|
|
<h4>Choose a delivery method</h4>
|
|
<div class="card border-0" id="delivery_method">
|
|
<ul class="list-group">
|
|
<t t-foreach="deliveries" t-as="delivery">
|
|
<li class="list-group-item o_delivery_carrier_select">
|
|
<t t-call="website_sale.payment_delivery_methods"/>
|
|
</li>
|
|
</t>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<!-- Payment page customizations-->
|
|
<template id="theme_boec.payment" name="Delivery Costs"
|
|
inherit_id="website_sale.payment">
|
|
<xpath expr="//div[@id='address_on_payment']" position="replace">
|
|
<div id="address_on_payment" class="container mb-4">
|
|
<t t-call="website_sale.address_on_payment"/>
|
|
</div>
|
|
</xpath>
|
|
<xpath expr="//h3[hasclass('mb-4')]" position="replace">
|
|
<h3 class="mb-4 container">Confirm order</h3>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('alert-warning')]"
|
|
position="attributes">
|
|
<attribute name="class">container alert alert-warning
|
|
</attribute>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('mt-4')]" position="replace">
|
|
<div class="container mt-4">
|
|
<h3>Pay with</h3>
|
|
</div>
|
|
</xpath>
|
|
<xpath expr="//div[@id='payment_method']" position="replace">
|
|
<div t-if="payment_methods_sudo or tokens_sudo"
|
|
id="payment_method"
|
|
class="container mt-4">
|
|
<t t-call="payment.form"/>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<template id="boec_cart_line" name="Boec Cart Line"
|
|
inherit_id="website_sale.cart_lines">
|
|
<xpath expr="//div[@id='cart_products']" position="replace">
|
|
<t t-set="show_qty"
|
|
t-value="is_view_active('website_sale.product_quantity')"/>
|
|
<table t-if="website_sale_order and website_sale_order.website_order_line"
|
|
class="o_cart_product mb16 table 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-action"/>
|
|
</tr>
|
|
</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">
|
|
<td t-if="not line.product_id" colspan="2"
|
|
class='td-img'/>
|
|
<t t-else="">
|
|
<td align="center" class='td-img'>
|
|
<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="img o_image_64_max rounded"
|
|
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': 'rounded o_image_64_max'}"
|
|
/>
|
|
</td>
|
|
<td class='td-product_name'>
|
|
<div>
|
|
<t t-call="website_sale.cart_line_product_link">
|
|
<strong t-field="line.name_short"/>
|
|
</t>
|
|
</div>
|
|
<t t-call="website_sale.cart_line_description_following_lines">
|
|
<t t-set="div_class"
|
|
t-value="'d-none d-md-block'"/>
|
|
</t>
|
|
</td>
|
|
</t>
|
|
<td class="text-center td-qty">
|
|
<div class="css_quantity input-group justify-content-center"
|
|
style="display: flex;flex-wrap: nowrap;align-items: center;">
|
|
<t t-if="not line._is_not_sellable_line()">
|
|
<t t-if="show_qty">
|
|
<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>
|
|
<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) == 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"
|
|
aria-label="Add one"
|
|
title="Add one">
|
|
<i class="fa fa-plus"/>
|
|
</a>
|
|
</t>
|
|
<t t-else="">
|
|
<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) == 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"
|
|
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" name="price">
|
|
<t t-if="line.discount">
|
|
<del t-attf-class="#{'text-danger mr8'}"
|
|
style="white-space: nowrap;"
|
|
t-out="line.price_unit * line.product_uom_qty"
|
|
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
|
</t>
|
|
<t t-if="website.show_line_subtotals_tax_selection == 'tax_excluded'"
|
|
t-set='product_price'
|
|
t-value='line.price_subtotal'/>
|
|
<t t-else=""
|
|
t-set='product_price'
|
|
t-value='line.price_total'/>
|
|
<span t-out="product_price"
|
|
style="white-space: nowrap;"
|
|
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
|
|
<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 t-set='combination_info'
|
|
t-value="{'base_unit_price':product._get_base_unit_price(product_price)}"/>
|
|
</t>
|
|
</small>
|
|
</td>
|
|
<td>
|
|
<a href='#'
|
|
class="js_delete_product d-none d-md-inline-block small"
|
|
title="Remove from cart">
|
|
<button class="js_delete_product btn btn-light"
|
|
title="remove">
|
|
<i class="fa fa-trash-o"/>
|
|
</button>
|
|
</a>
|
|
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
|
|
</tbody>
|
|
</table>
|
|
</xpath>
|
|
</template>
|
|
<template id="boec_cart_coupon" name="Boec Cart Coupon"
|
|
inherit_id="website_sale.coupon_form">
|
|
<xpath expr="//div[hasclass('input-group')]" position="replace">
|
|
<div class="input-group md-form form-sm form-2">
|
|
<input name="promo" class="form-control red-border"
|
|
type="text" placeholder="Coupon code"
|
|
t-att-value="website_sale_order.pricelist_id.code or None"/>
|
|
<div class="input-group-append">
|
|
<a href="#" role="button"
|
|
class="input-group-text a-submit">APPLY
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<!-- Button style for payment-->
|
|
<template id="theme_boec.submit_button" inherit_id="payment.submit_button"
|
|
name="Submit Button">
|
|
<xpath expr="//button[@name='o_payment_submit_button']"
|
|
position="replace">
|
|
<button name="o_payment_submit_button"
|
|
type="submit"
|
|
t-out="submit_button_label"
|
|
class="btn btn-primary w-md-auto ms-auto px-5"
|
|
disabled="true"
|
|
/>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|
|
|