Rewrite Checkout Success
i want to rewrite checkout success.phtml
file in my moudule currently success.phtml file coming from my theme folder like
app/design/frontend/mytheme/Magento_Checkout/templates/success.phtml
now i want this file in my module i done this but not wroking for me
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Mymodule_Module::success.phtml</argument>
</action>
</referenceBlock>
</page>
magento2 checkout
add a comment |
i want to rewrite checkout success.phtml
file in my moudule currently success.phtml file coming from my theme folder like
app/design/frontend/mytheme/Magento_Checkout/templates/success.phtml
now i want this file in my module i done this but not wroking for me
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Mymodule_Module::success.phtml</argument>
</action>
</referenceBlock>
</page>
magento2 checkout
Answered try this and let us know
– G Prathap
42 mins ago
add a comment |
i want to rewrite checkout success.phtml
file in my moudule currently success.phtml file coming from my theme folder like
app/design/frontend/mytheme/Magento_Checkout/templates/success.phtml
now i want this file in my module i done this but not wroking for me
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Mymodule_Module::success.phtml</argument>
</action>
</referenceBlock>
</page>
magento2 checkout
i want to rewrite checkout success.phtml
file in my moudule currently success.phtml file coming from my theme folder like
app/design/frontend/mytheme/Magento_Checkout/templates/success.phtml
now i want this file in my module i done this but not wroking for me
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Mymodule_Module::success.phtml</argument>
</action>
</referenceBlock>
</page>
magento2 checkout
magento2 checkout
edited 47 mins ago
Rakesh Donga
1,323313
1,323313
asked 52 mins ago
34343434
597
597
Answered try this and let us know
– G Prathap
42 mins ago
add a comment |
Answered try this and let us know
– G Prathap
42 mins ago
Answered try this and let us know
– G Prathap
42 mins ago
Answered try this and let us know
– G Prathap
42 mins ago
add a comment |
2 Answers
2
active
oldest
votes
Try this,
Add Vendor/Module/view/frontend/layout/checkout_onepage_success.xml
checkout_onepage_success.xml inside this add the following code in it.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::success.phtml</argument>
</action>
</referenceBlock>
</body>
NOTE : If your theme file still has success.phtml in the sense it will override your module file. So remove the success.phtml from theme and try this.
Hope this helps :)
hmm ok you mean if its in theme then cant override?
– 3434
33 mins ago
Go to your theme folder and remove Magento_Checkout folder and try this. Thanks
– G Prathap
31 mins ago
i understand i cant remove this folder i make change there
– 3434
30 mins ago
It's fallback methodology first magento look for such existence in theme then after in our custom module and finally in vendor module i.e., Magento_Checkout
– G Prathap
30 mins ago
So just delete the success.phtml from it then it will workf out.
– G Prathap
29 mins ago
add a comment |
Create the file
app/code/Mymodule/Module/view/frontend/layout/checkout_onepage_success.xml
and add the following:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success" template="Mymodule_Module::checkout/success.phtml"/>
</body>
</page>
not working i treid but still file coming same folder
– 3434
34 mins ago
hmmm then i make change in theme file
– 3434
33 mins ago
you can Magento_Checkout layout file removed it and Please don't forget to clear cache after change in layout xml files
– Rakesh Donga
30 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f263393%2frewrite-checkout-success%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try this,
Add Vendor/Module/view/frontend/layout/checkout_onepage_success.xml
checkout_onepage_success.xml inside this add the following code in it.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::success.phtml</argument>
</action>
</referenceBlock>
</body>
NOTE : If your theme file still has success.phtml in the sense it will override your module file. So remove the success.phtml from theme and try this.
Hope this helps :)
hmm ok you mean if its in theme then cant override?
– 3434
33 mins ago
Go to your theme folder and remove Magento_Checkout folder and try this. Thanks
– G Prathap
31 mins ago
i understand i cant remove this folder i make change there
– 3434
30 mins ago
It's fallback methodology first magento look for such existence in theme then after in our custom module and finally in vendor module i.e., Magento_Checkout
– G Prathap
30 mins ago
So just delete the success.phtml from it then it will workf out.
– G Prathap
29 mins ago
add a comment |
Try this,
Add Vendor/Module/view/frontend/layout/checkout_onepage_success.xml
checkout_onepage_success.xml inside this add the following code in it.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::success.phtml</argument>
</action>
</referenceBlock>
</body>
NOTE : If your theme file still has success.phtml in the sense it will override your module file. So remove the success.phtml from theme and try this.
Hope this helps :)
hmm ok you mean if its in theme then cant override?
– 3434
33 mins ago
Go to your theme folder and remove Magento_Checkout folder and try this. Thanks
– G Prathap
31 mins ago
i understand i cant remove this folder i make change there
– 3434
30 mins ago
It's fallback methodology first magento look for such existence in theme then after in our custom module and finally in vendor module i.e., Magento_Checkout
– G Prathap
30 mins ago
So just delete the success.phtml from it then it will workf out.
– G Prathap
29 mins ago
add a comment |
Try this,
Add Vendor/Module/view/frontend/layout/checkout_onepage_success.xml
checkout_onepage_success.xml inside this add the following code in it.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::success.phtml</argument>
</action>
</referenceBlock>
</body>
NOTE : If your theme file still has success.phtml in the sense it will override your module file. So remove the success.phtml from theme and try this.
Hope this helps :)
Try this,
Add Vendor/Module/view/frontend/layout/checkout_onepage_success.xml
checkout_onepage_success.xml inside this add the following code in it.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::success.phtml</argument>
</action>
</referenceBlock>
</body>
NOTE : If your theme file still has success.phtml in the sense it will override your module file. So remove the success.phtml from theme and try this.
Hope this helps :)
answered 45 mins ago
G PrathapG Prathap
541213
541213
hmm ok you mean if its in theme then cant override?
– 3434
33 mins ago
Go to your theme folder and remove Magento_Checkout folder and try this. Thanks
– G Prathap
31 mins ago
i understand i cant remove this folder i make change there
– 3434
30 mins ago
It's fallback methodology first magento look for such existence in theme then after in our custom module and finally in vendor module i.e., Magento_Checkout
– G Prathap
30 mins ago
So just delete the success.phtml from it then it will workf out.
– G Prathap
29 mins ago
add a comment |
hmm ok you mean if its in theme then cant override?
– 3434
33 mins ago
Go to your theme folder and remove Magento_Checkout folder and try this. Thanks
– G Prathap
31 mins ago
i understand i cant remove this folder i make change there
– 3434
30 mins ago
It's fallback methodology first magento look for such existence in theme then after in our custom module and finally in vendor module i.e., Magento_Checkout
– G Prathap
30 mins ago
So just delete the success.phtml from it then it will workf out.
– G Prathap
29 mins ago
hmm ok you mean if its in theme then cant override?
– 3434
33 mins ago
hmm ok you mean if its in theme then cant override?
– 3434
33 mins ago
Go to your theme folder and remove Magento_Checkout folder and try this. Thanks
– G Prathap
31 mins ago
Go to your theme folder and remove Magento_Checkout folder and try this. Thanks
– G Prathap
31 mins ago
i understand i cant remove this folder i make change there
– 3434
30 mins ago
i understand i cant remove this folder i make change there
– 3434
30 mins ago
It's fallback methodology first magento look for such existence in theme then after in our custom module and finally in vendor module i.e., Magento_Checkout
– G Prathap
30 mins ago
It's fallback methodology first magento look for such existence in theme then after in our custom module and finally in vendor module i.e., Magento_Checkout
– G Prathap
30 mins ago
So just delete the success.phtml from it then it will workf out.
– G Prathap
29 mins ago
So just delete the success.phtml from it then it will workf out.
– G Prathap
29 mins ago
add a comment |
Create the file
app/code/Mymodule/Module/view/frontend/layout/checkout_onepage_success.xml
and add the following:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success" template="Mymodule_Module::checkout/success.phtml"/>
</body>
</page>
not working i treid but still file coming same folder
– 3434
34 mins ago
hmmm then i make change in theme file
– 3434
33 mins ago
you can Magento_Checkout layout file removed it and Please don't forget to clear cache after change in layout xml files
– Rakesh Donga
30 mins ago
add a comment |
Create the file
app/code/Mymodule/Module/view/frontend/layout/checkout_onepage_success.xml
and add the following:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success" template="Mymodule_Module::checkout/success.phtml"/>
</body>
</page>
not working i treid but still file coming same folder
– 3434
34 mins ago
hmmm then i make change in theme file
– 3434
33 mins ago
you can Magento_Checkout layout file removed it and Please don't forget to clear cache after change in layout xml files
– Rakesh Donga
30 mins ago
add a comment |
Create the file
app/code/Mymodule/Module/view/frontend/layout/checkout_onepage_success.xml
and add the following:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success" template="Mymodule_Module::checkout/success.phtml"/>
</body>
</page>
Create the file
app/code/Mymodule/Module/view/frontend/layout/checkout_onepage_success.xml
and add the following:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.success" template="Mymodule_Module::checkout/success.phtml"/>
</body>
</page>
answered 42 mins ago
Rakesh DongaRakesh Donga
1,323313
1,323313
not working i treid but still file coming same folder
– 3434
34 mins ago
hmmm then i make change in theme file
– 3434
33 mins ago
you can Magento_Checkout layout file removed it and Please don't forget to clear cache after change in layout xml files
– Rakesh Donga
30 mins ago
add a comment |
not working i treid but still file coming same folder
– 3434
34 mins ago
hmmm then i make change in theme file
– 3434
33 mins ago
you can Magento_Checkout layout file removed it and Please don't forget to clear cache after change in layout xml files
– Rakesh Donga
30 mins ago
not working i treid but still file coming same folder
– 3434
34 mins ago
not working i treid but still file coming same folder
– 3434
34 mins ago
hmmm then i make change in theme file
– 3434
33 mins ago
hmmm then i make change in theme file
– 3434
33 mins ago
you can Magento_Checkout layout file removed it and Please don't forget to clear cache after change in layout xml files
– Rakesh Donga
30 mins ago
you can Magento_Checkout layout file removed it and Please don't forget to clear cache after change in layout xml files
– Rakesh Donga
30 mins ago
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f263393%2frewrite-checkout-success%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Answered try this and let us know
– G Prathap
42 mins ago