Add a service mode selector (pickup/delivery) to the website cart page.

This commit is contained in:
Alaguraj0361 2026-03-20 11:40:32 +05:30
parent 405dae06b5
commit b9e5119dfa

View File

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- More robust inheritance to ensure selector shows even if h3 is missing or changed -->
<template id="cart_service_mode" inherit_id="website_sale.cart" name="Service Mode Selector" priority="1000">
<!-- Targeting the main cart column more specifically -->
<xpath expr="//*[contains(@class, 'oe_cart')]//*[is-title or self::h3 or self::h4][1] | //div[@id='cart_products']" position="before">
<!-- Targeting the 'Order overview' title or the cart products table directly -->
<xpath expr="//div[contains(@class, 'oe_cart')]//h3[1] | //div[contains(@class, 'oe_cart')]//h4[1] | //div[@id='cart_products']" position="before">
<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;" t-if="website_sale_order">
<div class="d-flex align-items-center mb-3">
<div class="bg-warning-light p-2 rounded-circle me-3">