Remove product compare functionality from magento 2 frontend
default.xml layout file:
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="catalog.compare.link" remove="true"/>
Set $showCompare to false in the following templates:
- Magento/Catalog/view/frontend/templates/product/list/items.phtml
- Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml
- Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml
- Magento/Catalog/view/frontend/templates/product/widget/content/grid.phtml
Remove compare related staff from the following templates:
- Magento/Catalog/view/frontend/templates/product/list.phtml
- Magento/Catalog/view/frontend/templates/product/listing.phtml
- Magento/Wishslist/view/frontend/templates/item/configure/addto.phtml
Written by sivaschenko
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Magento 2
Authors
sivaschenko
19.23K
Related Tags
#magento 2
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#