Magento2 how to edit the item.phtml template for Related Products and Upsell Porducts?
In Magento2 I’ve enabled the Related Products and Upsell Products blocks. Everything’s fine except for the template of the single item. I want to change that to another custom one.
Here in app/design/frontend/Vendor/theme/Magento_Catalog/templates/product/slider/product-slider.phtml
The template for the items in the file above is declared here: $itemTemplate = $block->getData(‘item_template’) ?? ‘Magento_Catalog::product/list/item.phtml’;
And this template is the same used for the catalog_category_view.xml
If I try to change that item.phtml file with another custom one in the same directory it doesn’t work. Is there any way to override this?