-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Join extension attributes are not added to Order and Order Items #14623
Comments
I've fixed this (for order items) for my project by adding the following patch to our project, until a permanent solution is found. This will only fix the problem for some requests, but might provide a starting point for someone looking for a better fix. --- Model/Order.php 2018-04-10 17:03:57.092710675 +0200
+++ Model/Order.php 2018-04-10 17:04:39.608326985 +0200
@@ -266,6 +266,10 @@
* @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface
*/
protected $timezone;
+ /**
+ * @var \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface
+ */
+ private $joinProcessor;
/**
* @param \Magento\Framework\Model\Context $context
@@ -322,6 +326,7 @@
\Magento\Sales\Model\ResourceModel\Order\CollectionFactory $salesOrderCollectionFactory,
PriceCurrencyInterface $priceCurrency,
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productListFactory,
+ \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor,
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
array $data = []
@@ -346,6 +351,7 @@
$this->_trackCollectionFactory = $trackCollectionFactory;
$this->salesOrderCollectionFactory = $salesOrderCollectionFactory;
$this->priceCurrency = $priceCurrency;
+ $this->joinProcessor = $joinProcessor;
parent::__construct(
$context,
$registry,
@@ -1248,6 +1254,7 @@
public function getItemsCollection($filterByTypes = [], $nonChildrenOnly = false)
{
$collection = $this->_orderItemCollectionFactory->create()->setOrderFilter($this);
+ $this->joinProcessor->process($collection);
if ($filterByTypes) {
$collection->filterByTypes($filterByTypes);
|
Hi @k4emic , thank you for your report. |
✅ Jira issue https://jira.corp.magento.com/browse/AC-996 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Lima. Thank you for verifying the issue. |
@magento I am working on this |
…rder Items - fixed issue associated with joining extension attributes for Order and Order items
…rder Items - completed the implementation of tests
@magento I am working on this |
Preconditions
Steps to reproduce
Expected result
Actual result
This was partially fixed in #8035, but only for order search results
The text was updated successfully, but these errors were encountered: