Skip to content
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

Fix for issue #5105 - Error While send Invoice with Grouped Products #11297

Merged
merged 1 commit into from
Oct 11, 2017
Merged

Fix for issue #5105 - Error While send Invoice with Grouped Products #11297

merged 1 commit into from
Oct 11, 2017

Conversation

michielgerritsen
Copy link
Member

@michielgerritsen michielgerritsen commented Oct 8, 2017

This is a fix for issue #5105.

Description

When the merchant tried to send the invoice to the customer, it could get an fatal error. This only happend when the order contained grouped products. This was caused by the fact that DefaultOrder::getItemPrice has an type hint for the OrderItem, but the InvoiceItem was passed. I fixed this by requesting the OrderItem from the InvoiceItem.

Fixed Issues (if relevant)

  1. Error While send Invoice with Grouped Products #5105: Error While send Invoice with Grouped Products

Manual testing scenarios

  1. Install the sample data.
  2. Order the Set of Sprite Yoga Straps.
  3. Create an invoice.
  4. Open the invoice and click Send e-mail.

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)

Pass the orderItem to getItemPrice instead of the invoiceItem.
@michielgerritsen
Copy link
Member Author

The Travis tests are failing, but i've check the mark:

  • The unit test fails no matter if i add my code or not. It is a test for the ObjectManager, it seems unrelated.
  • The acceptance test fails due to not having output for too long.

@okorshenko
Copy link
Contributor

Hi @michielgerritsen Could you please accept the invitation on GitHub?

@michielgerritsen
Copy link
Member Author

Hi @okorshenko Check, done. Thanks for the invitation :-)

@okorshenko okorshenko self-assigned this Oct 9, 2017
@okorshenko okorshenko added this to the October 2017 milestone Oct 9, 2017
@okorshenko okorshenko merged commit 60d6628 into magento:2.2-develop Oct 11, 2017
okorshenko pushed a commit that referenced this pull request Oct 11, 2017
@michielgerritsen michielgerritsen deleted the 5105_email_invoice branch October 12, 2017 07:00
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.

3 participants