2

I have tried below code but unable to call my custom block below product title or product price in list page. file-name of my module: catalog_category_view.xml

    <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
               <block class="Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist"
                       name="category.product.mwishlist" as="mwishlist" after="-"
                       template="Magenest_MultipleWishlist::catalog/product/list/mwishlist.phtml"/>
        </referenceContainer>

        <move element="category.product.mwishlist" destination="product.info.main"  after="-" />
    </body>
</page>

Anyone have and idea how can show my custom block after product price/title in product list page?

1
  • can you place any image that where exactly you want it & currently where it is coming? Mar 27, 2019 at 8:46

1 Answer 1

3

Try this

Add the below code to your catalog_product_view.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <body>
    <referenceContainer name="content">
         <block class="Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist"  name="category.product.mwishlist" template="Magenest_MultipleWishlist::catalog/product/list/mwishlist.phtml" after="page.main.title">
         </block>
    </referenceContainer>
 </body>
</page>

Hope this will work out for you .

1
  • If that doesn't place you correctly then you can add like after="product.info.stock.sku" Mar 27, 2019 at 8:50

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.