Block code issue on magento 2 Product description page
-
29-12-2020 - |
Question
I added magento review form like this
<referenceContainer name="content">
<container name="product.info.breviews" htmlTag="div" htmlClass="product info detailed" after="-">
<block class="Magento\Review\Block\Form" name="product.review.form" as="review_form">
<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="product/view/list.phtml"/>
<block class="Magento\Theme\Block\Html\Pager" name="product_review_list.toolbar"></block>
</container>
</referenceContainer>
But its disturbing functionality of that green bar notification on product add on product description page. Is there anything wrong in code ?
UPDATE
I tried to run by commenting lines issue is in this portion
<block class="Magento\Review\Block\Form" name="product.review.form" as="review_form">
<container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before" htmlTag="div" htmlClass="rewards"/>
</block>
what I am doing in these 2 lines wrong ?Any help would be highly appericiated
La solution
Finally got answer issue was in this block
<block class="Magento\Review\Block\Form" name="product.review.form" as="review_form">
<container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before" htmlTag="div" htmlClass="rewards"/>
</block>
As it is already defined in some place so I was redefining . I just did that
<move element="product.review.form" destination="content" as="review_form" before="product.info.jbreviews" />
I just used now rather then again defining . moved on place where I want that and solved my problem.
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange