- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2021
04:30 AM
12-03-2021
04:30 AM
I am getting almost blank page on magento print order
When I try to print an order from frontend customer account, the print layout is almost empty without any data. then I click on cancel and choose to print again and it shows fine.
I am using Magento 2.2.2 Open Source
Steps to reproduce:
- Log in as a customer
- Go to "My account" page on frontend
- Click on your order
- Click "Print Order"
Has someone else encountered this problem and fixed it?
I have found a solution on google, but not sure how to implement it since could not find where to write the code fix.
the suggestion was to call the print option after the page is loaded, with this code:
<script> require( [ 'jquery' ], function($) { $(function() { window.print(); }); } ); </script>
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2021
09:54 PM
12-05-2021
09:54 PM
Re: I am getting almost blank page on magento print order
You can use the below location to place a code:
vendor\magento\module-theme\view\frontend\templates\html\print.phtml
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.
200+ Magento 2 Extensions for Enhanced Shopping Experience.