Removed Add to Cart function in magento 2 product detail page, but this function still exists at the bottom of page, in related products list section.
Change phtml code to hide it!
Search File
> cd vendor/magento
> grep "related_products" -r .
./module-catalog/view/frontend/templates/product/list/items.phtml:
$image = 'related_products_list';
./module-catalog/view/frontend/templates/product/list/items.phtml:
$image = 'related_products_list';
./module-catalog/view/frontend/templates/product/list/items.phtml:
name="related_products[]"
Change Code
vim ./module-catalog/view/frontend/templates/product/list/items.phtml
commend Add to Cart codes in this phtml file using:
<!--
-->
Flush cache to make changes take effect
> php bin/magento cache:flush
微信关注我哦 👍
我是来自山东烟台的一名开发者,有感兴趣的话题,或者软件开发需求,欢迎加微信 zhongwei 聊聊, 查看更多联系方式