I am working with the Magento2, in that, I like to add a custom block on product detailed page, next to add to cart button. for that, i wrote the below code on
catalog_product_view.xml
<body>
<referenceBlock name="product.info.addtocart">
<block class="Learn\Share\Block\Share" name="share.otherproducts" as="shareother" after="-" template="catalog/product/view/share.phtml" >
</block>
</referenceBlock>
<!-- for config products -->
<referenceBlock name="product.info.addtocart.additional">
<block class="XXXX\YYYY\Block\Share" name="share.configproducts" as="share_config" after="-" template="catalog/product/view/share.phtml" >
</block>
</referenceBlock>
</body>
I got the custom block values on simple, download product. but in bundle product detailed page I don't get any custom block values.
Then, the custom block not only for simple, download and bundle product. I want this custom block on all the Magento product types, so give me your solution for support all product type
Then why we need to add the same custom block on product.info.addtocart.additional
section.
Thanks in advance for your thoughts and ideas.
product.info.addtocart.bundle
.