Skip to main content
some basic change as per requirement
Source Link
Rakesh Donga
  • 5.4k
  • 2
  • 25
  • 57

create below file and add below code after check it

app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="pagename="product.maininfo.title">main">
            <block class="Vendor\Module\Block\Product\View\RewardMesg" name="reward_frontend_msg" before="-"after="product.info.price" template="Vendor_Module::product/view/rewardMesg.phtml"/>
        </referenceContainer>
    </body>
</page>

Please don't forget to clear cache after change in xml files

create below file and add below code after check it

app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="page.main.title">
            <block class="Vendor\Module\Block\Product\View\RewardMesg" name="reward_frontend_msg" before="-" template="Vendor_Module::product/view/rewardMesg.phtml"/>
        </referenceContainer>
    </body>
</page>

Please don't forget to clear cache after change in xml files

create below file and add below code after check it

app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="product.info.main">
            <block class="Vendor\Module\Block\Product\View\RewardMesg" name="reward_frontend_msg" after="product.info.price" template="Vendor_Module::product/view/rewardMesg.phtml"/>
        </referenceContainer>
    </body>
</page>

Please don't forget to clear cache after change in xml files

Source Link
Rakesh Donga
  • 5.4k
  • 2
  • 25
  • 57

create below file and add below code after check it

app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="page.main.title">
            <block class="Vendor\Module\Block\Product\View\RewardMesg" name="reward_frontend_msg" before="-" template="Vendor_Module::product/view/rewardMesg.phtml"/>
        </referenceContainer>
    </body>
</page>

Please don't forget to clear cache after change in xml files