Hello,
I'm using odoo 13.0. I want to remove the Product Price and the add to cart buttons from my recently viewed carousel in the website module. How can i do this ?
Thanks in advance!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I'm using odoo 13.0. I want to remove the Product Price and the add to cart buttons from my recently viewed carousel in the website module. How can i do this ?
Thanks in advance!
You can set the style="visibility:hidden; for that block.
Hello, Snippets are load from JS and XML and i want to hide price for public user
Hi,
You have to change the xmlDependencies
option in js where the template is defined and also need to extend the qweb template.
In your .js file :
odoo.define('module_name.recently_viewed', function (require) {
var publicWidget = require('web.public.widget');
publicWidget.registry.productsRecentlyViewedSnippet.include({
xmlDependencies: (publicWidget.registry.productsRecentlyViewedSnippet.prototype.xmlDependencies || []).concat(
['/module_name/static/src/xml/website_sale_recently_viewed.xml']
),
});
});
in qweb xml file:
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-extend="website_sale.productsRecentlyViewed">
<t t-jquery="div.d-block" t-operation="replace"></t>
<t t-jquery="button.js_add_cart" t-operation="replace"></t>
</t>
</templates>
Hope it helps
I am trying this, but stuck on it ... somehow the changes on my template are not applied ..
I made an isolated test module:
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Have you found any solution?