How to move related product block before product review block on product details page. i will try some code but no luck with this. i want to move related product block in to tab panel or review block at the last of the content in magento 2.
-
product reviews ? where these are occurring in page now ?– LearnerDec 22, 2017 at 8:11
-
try this <move element="reviews.tab" destination="main.content" after="-"/> in after name of block after which you want to place them. currently they are at the end of page.– LearnerDec 22, 2017 at 8:13
-
can I post as answer ?– LearnerDec 22, 2017 at 11:14
Add a comment
|
2 Answers
Go To you theme Directory
app/design/frontend///Magento_Catalog/layout/catalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="catalog.product.related" destination="product-info-main" before="product.info.review"/>
</body>
</page>
If you want to move review block after related product on product detail page. Go to catalog_product_view.xml file
<move element="reviews.tab" destination="content.aside" after="catalog.product.related"/>
This will move review block after related product.