A block with the product name, price, and the “add to cart” button is displayed to the right of the product photo and duplicated below the photo again. I cannot remove this block through the visual editor. How can I remove it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
A block with the product name, price, and the “add to cart” button is displayed to the right of the product photo and duplicated below the photo again. I cannot remove this block through the visual editor. How can I remove it?
Hii,
Option 1:
Reset the QWeb Template to Default (Directly in Odoo UI)
Go to Odoo backend
→ Activate Developer Mode
(Settings > Activate Developer Mode)
Navigate to
Website > Configuration > Templates
Search for the template
In the search bar, type:
website_sale.products_item
Custom override to remove duplicate block
Create a new XML file in your custom module (e.g. views/fix_product_template.xml) and add this:
<odoo>
<template id="fix_website_sale_products_item" inherit_id="website_sale.products_item">
<!-- Remove duplicated block below image -->
<xpath expr="//div[contains(@class, 'product_price')]" position="after">
<xpath expr="//div[contains(@class, 'oe_product_cart')]" position="replace"/>
</xpath>
</template>
</odoo>
Add it to your __manifest__.py:
'data': [
'views/fix_product_template.xml',
],
Then:
i hope it will work
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
3
thg 4 25
|
2087 | ||
|
2
thg 1 25
|
3184 | ||
|
0
thg 10 23
|
1525 | ||
|
1
thg 9 22
|
2278 | ||
|
0
thg 6 16
|
3122 |