There is a minor bug in the Opencart when clicking the print invoice/shipping button on the order list page in the Opencart 3.x version. |
What is the issue?
The issue is it opens the invoice in the same tab and also in a new tab. So 2 tabs are open which is little frustrating.
How to fix?
The issue is related with the common.js file. There was a problem in the Internet explorer for which a fix was added in the common.js and this issue caused the issue with opening of multiple tabs. The fix added was:
$(‘button[type=\’submit\’]’).on(‘click’, function() {
Code added in the common.js file
$(“form[id*=’form-‘]”).submit();
});
Go to below path on your server and open common.js:
admin/view/javascript/common.js
The line no should be 27. Or you can find these lines below
$(‘button[type=\’submit\’]’).on(‘click’, function() {
$(“form[id*=’form-‘]”).submit();
});
You can remove these lines and save the file. Once done clear your browser cache or try in the new browser.
Kindly note if you are using IE then don’t remove this code. If you are using chrome or other browser it is safe to remove it.