Hi,
Does anyone know how I can remove the icon from the Magento 2 widget: "Catalog New Products List".
It is the icon in yellow:
Magento 2.3.5
Hello @callam_kidsaw ,
This icon is used to compare products, there are several places you'll find it. You can remove all icons at one time.
Create default.xml file in Vendor/Extension/view/frontend/layout and copy the below code:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="catalog.compare.link" remove="true" /> <referenceBlock name="catalog.compare.sidebar" remove="true"/> <referenceBlock name="catalogsearch.product.addto.compare" remove="true"/> <referenceBlock name="category.product.addto.compare" remove="true"/> <referenceBlock name="crosssell.product.addto.compare" remove="true" /> <referenceBlock name="related.product.addto.compare" remove="true" /> <referenceBlock name="upsell.product.addto.compare" remove="true" /> <referenceBlock name="view.addto.compare" remove="true" /> </body> </page>
Make sure you flush Magento cache after creating this file.
Thank you, I will try this as soon as I can and accept as solution if it works.
I managed to find something similar while Googling, but it only removed about half of the compare buttons / links etc.
Hi,
I have this code already in my default.xml file.
It has removed most of the compare icons, but the ones in the image I provided are still there.
Any ideas?
I think this came with your theme, so you can follow this process to remove this icon :
As there is no functionality in admin to disable this functionality so we have to do this way.
This feature is built into Magento by default and can be accessed here [If you want to try it].
Content > Pages > Edit any page > Content > Insert Widget > Catalog New Product List
I removed it with CSS in the end, using very simple code:
.action.tocompare { display: none !important; }
Not sure how much old technologies are used now, but it should be hidden for 99% of web users.
I think this will hide only particular page, and hiding by CSS is not a great idea as it will be hidden only in frontend. Rest depends on your requirement if you're fine with that, go that way.