0

In my custom Block I am trying this code: which is not working:

<referenceBlock name="product.info.main">
      <block class="Magento\Catalog\Block\Product\View"
        name="product.view.extra"
        template="Ced_CsMarketplace::vendor.phtml" after="product.info.name">
         </block>
 </referenceBlock>

but when I am trying:

<referenceBlock name="product.info.price">
      <block class="Magento\Catalog\Block\Product\View"
        name="product.view.extra"
        template="Ced_CsMarketplace::vendor.phtml" before="-">
         </block>
 </referenceBlock>

It is working fine.

How I can show the block below Product Name and before product review.

I tried many alternative, but nothing seems to work

3 Answers 3

0

Have you tried making use of the move element like this:

<move element="product.view.extra" destination="product.info.main" after="page.main.title"/>
1
  • Yes. If I try that it goes before the product name, I want it after product name.
    – Joshi
    Mar 25, 2018 at 17:24
0

I am not sure if that is the right way to achieve that, but I am able to achieve what I was looking for with the below code:

<referenceBlock name="product.info.price">
 <block class="Magento\Catalog\Block\Product\View"
    name="product.view.extra"
    template="Ced_CsMarketplace::vendor.phtml" before="-">
   </block>
</referenceBlock>
<move element="product.info.review" destination="product.info.price" before="-"/>
<move element="product.view.extra" destination="product.info.price" before="-"/>
    </body>
0

You can try below code to move after product name

<move element="custom.block" destination="product.info.main" after="page.main.title" />
1
  • No that didn't work, I already mentioned as comment in other answer.
    – Joshi
    Mar 26, 2018 at 17:25

Your Answer

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

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