0

Magento2 How can I display product Added to cart success message under Add to cart button on product details page?

3
  • you can move default page message to below add to cart button only for catalog_product_view.xml
    – Pawan
    Oct 16, 2020 at 6:55
  • Thanks for advice..
    – Arjun
    Oct 16, 2020 at 7:11
  • welcome..... :)
    – Pawan
    Oct 16, 2020 at 7:21

1 Answer 1

1

Posting answer might be helpful for some one.

<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.messages" destination="product.info.form.content" after="product.info.addtocart" />
    </body>
</page>

In catalog_product_view.xml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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