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?
Thanks guys.
vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml
. Copied it, pasted intoapp/design/frontend/Magenio/aldo/Magento_Catalog/templates/product/list/items.phtml
. I've seen in this file that there's a switch to handle all the cases, tried to change the title for the "Related Products" block but the title stays the same, for example. So I need to figure out how to fix this. However thanks a lot for the quick response :)