30 lines
2.0 KiB
XML
30 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="cart_service_mode" inherit_id="website_sale.cart" name="Service Mode Selector">
|
|
<xpath expr="//t[@t-call='website_sale.cart_lines']" position="before">
|
|
<div id="service_mode_selector" class="mb-4 bg-white p-4 rounded-4 shadow-sm border" style="border-left: 5px solid #FECD4F !important;">
|
|
<h4 class="mb-3 fw-bold">How would you like your order?</h4>
|
|
<div class="d-flex gap-3">
|
|
<label class="service-option position-relative flex-fill cursor-pointer">
|
|
<input type="radio" name="fulfilment_type" value="pickup" class="d-none" t-att-checked="'checked' if website_sale_order.fulfilment_type == 'pickup' else None"/>
|
|
<div class="service-card p-3 rounded-3 border text-center transition-all">
|
|
<i class="fa fa-shopping-basket fs-3 mb-2 text-primary"></i>
|
|
<h6 class="mb-1 fw-bold">Pickup</h6>
|
|
<small class="text-muted">Pick up at store</small>
|
|
</div>
|
|
</label>
|
|
<label class="service-option position-relative flex-fill cursor-pointer">
|
|
<input type="radio" name="fulfilment_type" value="delivery" class="d-none" t-att-checked="'checked' if website_sale_order.fulfilment_type == 'delivery' else None"/>
|
|
<div class="service-card p-3 rounded-3 border text-center transition-all">
|
|
<i class="fa fa-truck fs-3 mb-2 text-info"></i>
|
|
<h6 class="mb-1 fw-bold">Delivery</h6>
|
|
<small class="text-muted">Delivered to you</small>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
<div class="mt-3 small text-danger d-none" id="service_mode_error">Please select Pickup or Delivery to continue.</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|