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 missing extension_attributes on checkout item #10328

Conversation

jalogut
Copy link
Contributor

@jalogut jalogut commented Jul 26, 2017

Do not remove extension attributes when converting the quote Item to dataObject. Otherwise it is not possible to display custom attributes on checkout.

…dataObject. Otherwise it is not possible to display custom attributes on checkout
@ishakhsuvarov ishakhsuvarov self-assigned this Jul 26, 2017
@ishakhsuvarov ishakhsuvarov added this to the July 2017 milestone Jul 26, 2017
@@ -79,7 +79,6 @@ public function modelToDataObject($item)
$this->eventManager->dispatch('items_additional_data', ['item' => $item]);
$items = $item->toArray();
$items['options'] = $this->getFormattedOptionValue($item);
unset($items[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are removed on purpose, as it causes a fatal error due to types mismatch on checkout when extension attribute is populated. There is more detailed explanation of what is happening in this comment to issue 3640.
We are currently looking into a solution which may be safely used in this case. I will update the ticket when we come up with one.

@ishakhsuvarov
Copy link
Contributor

ishakhsuvarov commented Jul 28, 2017

@jalogut Unfortunately, we can not accept this PR for now, since this change will cause fatal errors in some scenarios. You may also refer to the Travis CI build for this Pull Request and observe this error.

We are going to investigate this issue additionally and looks for possible solution, which would satisfy all cases. For now I would suggest same method as mentioned by @antonkril on twitter: add a plugin on ItemConverter

Thank you for collaboration.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jul 28, 2017

@ishakhsuvarov I think it would be good idea to add some comment there why it was done in this way and how we can make workaround. I think this issue already had not only @jalogut and it will happen for another people. What do you think?

@ishakhsuvarov
Copy link
Contributor

@ihor-sviziev Thank you for the feedback. We will consider adding this comment.

@jalogut jalogut deleted the fix-missing-extension-attributes-quote-item branch November 20, 2017 09:24
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