42 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="cart_service_mode" inherit_id="website_sale.cart" name="Service Mode Selector" priority="1000">
<xpath expr="//div[hasclass('col')]/h3" position="before">
<div class="container container-fluid mt-4">
<div id="service_mode_selector" class="mb-4 bg-white p-3 p-md-4 rounded-4 shadow-sm border" style="border-left: 5px solid #FECD4F !important;">
<div class="d-flex align-items-center mb-3">
<div class="bg-warning-light p-2 rounded-circle me-3">
<i class="fa fa-shopping-basket text-warning fs-5"></i>
</div>
<h4 class="mb-0 fw-bold">How would you like your order?</h4>
</div>
<div class="d-flex flex-wrap gap-2 gap-md-3">
<label class="service-option position-relative flex-fill cursor-pointer m-0">
<input type="radio" name="fulfilment_type" value="pickup" class="d-none" t-att-checked="'checked' if website_sale_order and website_sale_order.fulfilment_type == 'pickup' else None"/>
<div class="service-card p-3 rounded-3 border text-center transition-all h-100 d-flex flex-column justify-content-center">
<i class="fa fa-shopping-bag mb-2 text-warning"></i>
<div class="fw-bold h6 mb-1">Pickup</div>
<div class="x-small text-muted">Ready in 15-20 mins</div>
</div>
</label>
<label class="service-option position-relative flex-fill cursor-pointer m-0">
<input type="radio" name="fulfilment_type" value="delivery" class="d-none" t-att-checked="'checked' if website_sale_order and website_sale_order.fulfilment_type == 'delivery' else None"/>
<div class="service-card p-3 rounded-3 border text-center transition-all h-100 d-flex flex-column justify-content-center">
<i class="fa fa-truck mb-2 text-primary"></i>
<div class="fw-bold h6 mb-1">Delivery</div>
<div class="x-small text-muted">Estimated 30-45 mins</div>
</div>
</label>
</div>
<div class="mt-3 small text-danger d-none" id="service_mode_error">
<i class="fa fa-exclamation-circle me-1"></i> Please select Pickup or Delivery to continue.
</div>
</div>
</div>
</xpath>
</template>
</odoo>