0

I am working on an issue for a few days and can't make it working.

I have a custom theme and was able to fix possitions using catalog_product_view.xml (move method on the element).

The problem I had with review list. I can't move it anywhere. I would like to move it on the right column, next to the picture.

I know how to move it above the container with review.phtml file, but I don't know how to move it inside the container (right column). I was thinking of using Jquerry to hack the DOM, but I am sure there must be another solution.

enter image description here

2 Answers 2

0

Try this code Add this in catalog_product_view.xml file

<referenceContainer name="product.info.main">
    <container name="product.info.details" htmlTag="div" htmlClass="product info detailed" after="product.info.extrahint">
        <block class="Magento\Review\Block\Form" name="product.review.form" as="review_form" ifconfig="catalog/review/active">
            <container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before" htmlTag="div" htmlClass="rewards"/>
        </block>
        <block class="Magento\Review\Block\Product\View\ListView" name="product.info.product_additional_data" as="product_additional_data" template="Magento_Review::product/view/list.phtml" ifconfig="catalog/review/active"/>
        <block class="Magento\Theme\Block\Html\Pager" name="product_review_list.toolbar" ifconfig="catalog/review/active"/>
    </container>
</referenceContainer>

If after="product.info.extrahint" not work then try after=="extrahint"

1
  • It works! You are a genious!
    – XraySensei
    Commented Jun 29, 2023 at 13:40
0

You can change the destination like the below code

<?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="page.main.title" destination="product.info.main" before="-"/>
    <move element="product.price.final" destination="product.info.main" after="page.main.title"/>
    <move element="product.info.sku" destination="product.info.main" after="product.price.final"/>
    <referenceBlock name="product.info.review" remove="true" />
    <referenceBlock name="reviews.tab" remove="true" />
</body>
1
  • I've tried this and it doesn't work. Checked GOOGLE - chatGPT, everything and I did not find a solution. That's why I've decided to ask the community.
    – XraySensei
    Commented Jun 29, 2023 at 13:04

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.