Skip to content

Conversation

amol2jcommerce
Copy link
Contributor

Original Pull Request

#20043

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 the frontend 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 to app/code/Magento/Payment/view/base/templates/info/pdf/default.phtml. I'll leave the adminhtml and frontend templates in place for backward compatibility.

Fixed Issues (if relevant)

  1. none

Manual testing scenarios (*)

  1. Create an API endpoint which generates an invoice PDF
  2. Calling that endpoint should not result in an error

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @amol2jcommerce. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

Hi @rogyar, thank you for the review.
ENGCOM-4368 has been created to process this Pull Request

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@ghost
Copy link

ghost commented Mar 20, 2019

Hi @amol2jcommerce, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants