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
Create an account today to enjoy exclusive features and engage with our awesome community!
РегистрацияRelated Posts | Ответы | Просмотры | Активность | |
---|---|---|---|---|
|
3
апр. 25
|
2018 | ||
|
2
янв. 25
|
3131 | ||
|
0
окт. 23
|
1501 | ||
|
1
сент. 22
|
2212 | ||
|
0
июн. 16
|
3106 |