|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<templates xml:space="preserve"> |
| 3 | + <!--Inheriting ProductPage and defining our changes--> |
| 4 | + <t t-inherit="pos_self_order.ProductPage" t-inherit-mode="extension"> |
| 5 | + <!--'options' string after product name only when Product is Configurable --> |
| 6 | + <xpath expr="//h1[@class='mb-0 text-nowrap']" position="replace"> |
| 7 | + <h1 class="mb-0 text-nowrap"><strong t-out="product.name"/> <span t-if="product.isConfigurable()">options</span></h1> |
| 8 | + </xpath> |
| 9 | + <!-- changes in product details section to have a new layout with a large image and description --> |
| 10 | + <xpath expr="//div[hasclass('o-so-product-details')]" position="replace"> |
| 11 | + <div class="o-so-product-details d-flex flex-column align-items-center p-3 gap-3"> |
| 12 | + <!-- Large Product Image --> |
| 13 | + <div class="o-so-product-details-image text-center mb-3" style="max-width: 300px;"> |
| 14 | + <img |
| 15 | + class="img-fluid rounded shadow-sm" |
| 16 | + t-attf-src="/web/image/product.product/{{ product.id }}/image_512" |
| 17 | + alt="Product image" |
| 18 | + loading="lazy"/> |
| 19 | + </div> |
| 20 | + |
| 21 | + <!-- Product related Information --> |
| 22 | + <div class="o-so-product-details-description text-center w-100"> |
| 23 | + <h2 t-out="product.name"/> |
| 24 | + <span class="fs-3 d-block my-3" t-out="selfOrder.formatMonetary(selfOrder.getProductDisplayPrice(product))"/> |
| 25 | + </div> |
| 26 | + |
| 27 | + <!-- Product Description --> |
| 28 | + <div class="o-so-product-details-description text-center w-100"> |
| 29 | + <t t-if="product.self_order_description"> |
| 30 | + <div t-out="product.self_order_description"/> |
| 31 | + </t> |
| 32 | + </div> |
| 33 | + </div> |
| 34 | + </xpath> |
| 35 | + |
| 36 | + <!--Cancel button next to the Add to cart button --> |
| 37 | + <xpath expr="//div[hasclass('page-buttons')]/button[hasclass('btn-primary')]" position="before"> |
| 38 | + <button class="btn btn-secondary btn-lg" t-on-click="() => router.back()"> |
| 39 | + Cancel |
| 40 | + </button> |
| 41 | + </xpath> |
| 42 | + </t> |
| 43 | +</templates> |
0 commit comments