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.
 
 
 
 
 

50 lines
3.0 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="watchhut_header" inherit_id="website.template_header_default">
<!-- The template modifies the header section of the WatchHut website. -->
<!-- It replaces a specific component responsible for the user dropdown menu -->
<!-- with a custom implementation that includes an icon and specific CSS -->
<!-- classes for the navigation item and link.-->
<xpath expr="//t[@t-call='portal.user_dropdown']" position="replace">
<t t-call="portal.user_dropdown">
<t t-set="_icon" t-value="true"/>
<t t-set="_item_class" t-value="'nav-item dropdown'"/>
<t t-set="_link_class" t-value="'nav-link'"/>
</t>
</xpath>
</template>
<template id="watchhut_cart" inherit_id="website_sale.header_cart_link">
<!-- The template customizes the cart link in the header section of the WatchHut website.-->
<!-- It replaces the existing cart link element with a modified version that includes a shopping -->
<!-- cart icon, the text "My Cart" (if specified), and a badge displaying the quantity of items -->
<!-- in the cart. The link directs users to the cart page ("/shop/cart").-->
<xpath expr="//li[contains(@t-attf-class, 'o_wsale_my_cart')]"
position="replace">
<li class="o_wsale_my_cart nav-item">
<a href="/shop/cart" t-attf-class="#{_link_class}">
<img src="/theme_watchhut/static/src/images/icon/shopping-cart.svg"/>
<span t-if="_text">My Cart</span>
<sup class="my_cart_quantity badge badge-primary"
t-esc="website_sale_order and website_sale_order.cart_quantity or '0'"
t-att-data-order-id="website_sale_order and website_sale_order.id or ''"/>
</a>
</li>
</xpath>
</template>
<template id="watchhut_toggler" inherit_id="website.navbar_toggler">
<!-- The template customizes the navbar toggler button on the WatchHut website. -->
<!-- It replaces the existing button element with a modified version that includes three -->
<!-- toggler icons and specific CSS classes. The button is used to collapse or expand -->
<!-- the top menu when clicked.-->
<xpath expr="//button[contains(@t-attf-class, 'navbar-toggler')]"
position="replace">
<button type="button"
t-attf-class="navbar-toggler collapsed border-0 #{_toggler_class}"
data-toggle="collapse" data-target="#top_menu_collapse">
<span class="navbar-toggler-icon o_not_editable"/>
<span class="navbar-toggler-icon o_not_editable"/>
<span class="navbar-toggler-icon o_not_editable"/>
</button>
</xpath>
</template>
</odoo>