I need to show related products block on configurable product page (as it is by deflault), but instead of related products of configurable product i need to show related products of simple products which are included in that configurable product.
Magento2 – Show Related Products of Simple Product in Configurable Product
blocksconfigurable-productmagento2related-products
Best Answer
If you want to display related products of child items instead of the related products of the parent item in a configurable product structure, then
Create a new module and override
_prepareData
function the main block fileSomething like
and then override the
items.phtml
fileunder
case 'related'
change the if conditionto