Hello,
I added in admin some codes for the head section. This is working.
But I need at the success page, after checkout, another code in the head .. and only on this site.
How can I add this?
maybe edit the page:
vendor/magento/module-checkout/view/frontend/layout/checkout_onepage_success.xml?
Thank you!
Solved! Go to Solution.
Hello @hanhoe ,
Please add following code in your your theme's Magento_Checkout/layout/checkout_onepage_success.xml
<?xml version="1.0"?> <body> <referenceContainer name="order.success.additional.info"> <block name="order.success.extra.info" template="order/info.phtml" after="-"> </block> </referenceContainer> </body>
And then in your theme's Magento_Checkout/templates/order/info.phtml add your own code.
If you don't want to add the code in your custom theme than you can do it by creating a custom module. For that please refer the link https://magento.stackexchange.com/questions/136730/call-custom-phtml-on-success-page-without-overrid...
I hope this will works for you, if still you face any issue please let me know.
If it helps you, please accept it as solution.
Regards.
Hello @hanhoe ,
Please add following code in your your theme's Magento_Checkout/layout/checkout_onepage_success.xml
<?xml version="1.0"?> <body> <referenceContainer name="order.success.additional.info"> <block name="order.success.extra.info" template="order/info.phtml" after="-"> </block> </referenceContainer> </body>
And then in your theme's Magento_Checkout/templates/order/info.phtml add your own code.
If you don't want to add the code in your custom theme than you can do it by creating a custom module. For that please refer the link https://magento.stackexchange.com/questions/136730/call-custom-phtml-on-success-page-without-overrid...
I hope this will works for you, if still you face any issue please let me know.
If it helps you, please accept it as solution.
Regards.