1

Please check the Screenshot below. I want to remove Print receipt title from thank you purchase page, this page appears after placing a successful order.

Print Receipt

2 Answers 2

4

Create this layout file in your theme here

app/design/frontend/Vendor/Theme/Magento_Checkout/layout/checkout_onepage_success.xml

Content for this file is..

<?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>
        <referenceBlock name="checkout.success.print.button" remove="true" />
    </body>
</page>

Then please run below commands once

php bin/magento cache:clean
php bin/magento cache:flush

Hope this will help you!

1
  • 1
    will try this and update you. Thanks
    – Patrik
    Feb 9, 2020 at 4:57
0

Yo need to extend the below template in your custom theme.

From vendor/magento/module-checkout/view/frontend/templates/button.phtml to app/design/frontend/vendor/theme/Magento_Checkout/templates/button.phtml

And comment below code.

<a href="<?= /* @escapeNotVerified */ $block->getPrintUrl() ?>" target="_blank" class="print">
        <?= /* @escapeNotVerified */ __('Print receipt') ?>
    </a>
4
  • I check both the file location, vendor/magento/module-checkout/view/frontend/templates/button.phtml - this was already the same code as you mentioned. app/design/frontend/vendor/theme/Magento_Checkout/templates/button.phtml - this is not found should I create folder and add the file ?
    – Patrik
    Feb 2, 2020 at 9:28
  • Yes you need to add that's why i mentioned path.... Feb 2, 2020 at 9:51
  • didn't work....
    – Patrik
    Feb 2, 2020 at 14:06
  • tell me what you did? Feb 2, 2020 at 14:07

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.