Magento 2 – Customize Related Products Template

addtocartcustommagento2related-productstemplate

How do you change the related products template output. Instead select all I would like to add a "add to cart" button to all related products and remove checkboxes.

Best Answer

By default, Magento uses the same template for product related, upsell, crosssel and new products content widget. This template comes from vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml.

If we want to custom this template, we should copy it to our current theme: app/design/frontend/{Vendor Theme}/{Theme name}/Magento_Catalog/templates/product/list/items.phtml.

Related Topic