I have override product.info.review block and now I want to display my output before quantity field . This is the code of catalog_product_view file for move this but it is not working


1 Answer 1


Please use below code, it will move review block just before the product.info block and product.info block contains quantity and addtocart button

<move element="product.info.review" destination="product.info.main" before="product.info"/>

Please make sure, you are editing in correct layout xml, sometimes same element is already moving by any other theme. For example product.info.review is already move by luma theme

Hope this will help you!

  • Basically i have over-right review block and attached a template to it and in template file i display numeric values which i want to display before quantity .above solution is not working
    – usman
    Aug 7, 2019 at 13:12
  • Could you please write here the code of your xml and phtml file, along with their location? Aug 7, 2019 at 13:52
  • <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="product.info.review"> <action method="setTemplate"> <argument name="template" xsi:type="string">Extension_Newmodule::counter.phtml</argument> </action> </referenceBlock> <move element="product.info.review" destination="product.info.main" after="product.price.final"/> </body> </page>
    – usman
    Aug 8, 2019 at 4:38
  • and my file named catalog product view with location /maentoroot/app/code/Extension/Newmodule/view/frontend/layout/catalog_product_view.xml
    – usman
    Aug 8, 2019 at 4:41
  • 1
    Thanks a lot,i got your point .But i have also found another solution .i am providing the code below by which other can also get benefited form it. <referenceBlock name="product.info.review" remove="true" /> <referenceContainer name="content"> <container name="product.custom" htmlTag="div" htmlClass="product-info-main" before="-"><block class="Magento\Catalog\Block\Product\View" name="product.custom.reivew" template="Extension_Newmodule::counter.phtml" /> </container></referenceContainer><move element="product.custom.reivew" destination="product.info.main" before="product.info"/>
    – usman
    Aug 8, 2019 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.