-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Make it possible to generate sales PDF's using the API #20043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to generate sales PDF's using the API #20043
Conversation
Hi @AntonEvers. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @aleron75, thank you for the review. |
Hello @AntonEvers thanks for your contribution. Once merged, don't forget you can easily port this PR to other branches with the Porting Tool, read more here. |
Thanks @aleron75! Great advice |
Hi @aleron75, thank you for the review. |
Hi @AntonEvers Could you help us with "Manual testing scenarios" for this issue? Thank you for contribution and collaboration! |
@sdzhepa this is my testing scenario:
Check out my changes and run |
Hi @AntonEvers, thank you for your contribution! |
Description (*)
Currently if you try to generate an invoice PDF using a custom API endpoint, you will get the exception: Invalid template file: 'Magento_Payment::info/pdf/default.phtml' because you are not in the
adminhtml
scope or thefrontend
scope which is the only place where this template lives.Because
app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml
===app/code/Magento/Payment/view/frontend/templates/info/pdf/default.phtml
it is safe to move that file toapp/code/Magento/Payment/view/base/templates/info/pdf/default.phtml
. I'll leave theadminhtml
andfrontend
templates in place for backward compatibility.Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)