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.
64 lines
4.3 KiB
64 lines
4.3 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<template id="watchhut_header"
|
|
inherit_id="website.template_header_default">
|
|
<!-- The "watchhut_header" template is a customized version of the default-->
|
|
<!-- website header template ("website.template_header_default") that is -->
|
|
<!-- used in the context of the Watch Hut website. The template overrides -->
|
|
<!-- a specific section of the default header template using XPath manipulation. -->
|
|
<!-- It replaces the user dropdown menu section with a modified version that -->
|
|
<!-- includes specific settings for the icon, item class, and link class.-->
|
|
<!-- This customization allows for a tailored user dropdown menu in the Watch-->
|
|
<!-- Hut website's header, providing a unique user experience.-->
|
|
<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 "watchhut_cart" template is a customized version of the default header -->
|
|
<!-- cart link template ("website_sale.header_cart_link") specifically designed -->
|
|
<!-- for the Watch Hut website. It overrides a specific section of the default-->
|
|
<!-- template using XPath manipulation. The modified section replaces the HTML-->
|
|
<!-- markup for the cart link in the header. It includes an image of a shopping cart,-->
|
|
<!-- the text "My Cart" (if specified), and a badge displaying the quantity of items in-->
|
|
<!-- the cart. This customization provides a visually enhanced and personalized cart -->
|
|
<!-- link in the Watch Hut website's header, tailored to their branding and user experience.-->
|
|
<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 "watchhut_toggler" template is a customized version of the default navbar-->
|
|
<!-- toggler template ("website.navbar_toggler") for the Watch Hut website. It overrides-->
|
|
<!-- a specific section of the default template using XPath manipulation. The modified section -->
|
|
<!-- replaces the HTML markup for the navbar toggler button. The new button includes three -->
|
|
<!-- instances of the "navbar-toggler-icon" span element, which typically represent the -->
|
|
<!-- collapsed state of the navigation menu. This customization provides a visually enhanced-->
|
|
<!-- and personalized navbar toggler button for the Watch Hut website's navigation menu, -->
|
|
<!-- tailored to their branding and user experience.-->
|
|
<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>
|
|
|