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

Issue 25268 #25728

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a332b65
resolved issue#25268: order get customer returns null
rajeebkumar-sahoo Nov 23, 2019
bf31cb1
resolved issue#25268: order get customer returns null
rajeebkumar-sahoo Nov 23, 2019
a802cc4
resolved issue#25268: order get customer returns null
rajeebkumar-sahoo Nov 23, 2019
9b420c9
Fix issue #22240
vpashovski Nov 4, 2019
af139cd
Remove "|" when prefix is empty
vpashovski Nov 5, 2019
c2220d5
Remove Prefix name length check;
vpashovski Nov 11, 2019
8717bf7
Remove old logic to make search by operation status possible
nuzil Nov 12, 2019
a8aa664
REFACTORING: adjust commands to the common style in the MediaGallery …
coderimus Nov 15, 2019
5de1d6e
Fix exception in test
coderimus Nov 15, 2019
6f286d6
Adjustments according review
coderimus Nov 16, 2019
813cc09
Adjustments according review
coderimus Nov 16, 2019
7c41148
Uses > Used for Yes/No column
sta1r Nov 19, 2019
41f1e28
Resolve Wrong message in confirmation popup when delete customer grou…
edenduong Nov 20, 2019
f38b108
Update translation file
sta1r Nov 20, 2019
6da5408
magento/magento2#25658: MFTF coverage added.
engcom-Foxtrot Nov 20, 2019
052e9f7
[Downloadable Product] Cover Sample DataProvider by Unit Test
edenduong Nov 21, 2019
6de3c14
Add Tests for operation statuses endpoint
nuzil Nov 21, 2019
7bf7340
Remove UserLockedException catch.
drew7721 Nov 21, 2019
62c3d96
Fix tests
nuzil Nov 22, 2019
1444850
magento/magento2#25569: Static tests fix.
engcom-Foxtrot Nov 22, 2019
e96ada7
magento/magento2#25569: Static tests fix.
engcom-Foxtrot Nov 22, 2019
3e43f99
Merge branch '2.3-develop' into issue_25268
rajeebkumar-sahoo Nov 25, 2019
30e324f
fixed code sniffer validation issues
Nov 25, 2019
75d763e
Merge branch 'issue_25268' of https://github.com/rajeebkumar-sahoo/ma…
Nov 25, 2019
a923be2
Merge branch 'issue_25268' of https://github.com/rajeebkumar-sahoo/ma…
rajeebkumar-sahoo Nov 25, 2019
3ab0f50
static test: validation issues
rajeebkumar-sahoo Nov 25, 2019
829c62f
resolved issue#25268: order get customer returns null
rajeebkumar-sahoo Nov 23, 2019
6b64ec1
resolved issue#25268: order get customer returns null
rajeebkumar-sahoo Nov 23, 2019
bea491a
Fix issue #22240
vpashovski Nov 4, 2019
b6eee65
Remove "|" when prefix is empty
vpashovski Nov 5, 2019
1e441d3
REFACTORING: adjust commands to the common style in the MediaGallery …
coderimus Nov 15, 2019
8aebb98
Fix exception in test
coderimus Nov 15, 2019
5f51255
Adjustments according review
coderimus Nov 16, 2019
f3d9c58
Adjustments according review
coderimus Nov 16, 2019
ba01dc8
Update translation file
sta1r Nov 20, 2019
0fe7332
magento/magento2#25658: MFTF coverage added.
engcom-Foxtrot Nov 20, 2019
0c3b778
Add Tests for operation statuses endpoint
nuzil Nov 21, 2019
d9613b5
Fix tests
nuzil Nov 22, 2019
ec3cfe2
magento/magento2#25569: Static tests fix.
engcom-Foxtrot Nov 22, 2019
8a538c9
magento/magento2#25569: Static tests fix.
engcom-Foxtrot Nov 22, 2019
5a71c39
fixed code sniffer validation issues
Nov 25, 2019
e98671e
static test: validation issues
rajeebkumar-sahoo Nov 25, 2019
231059b
issue#25268: removed exception, causing api error
Nov 26, 2019
ff1179f
issue#25268: removed exception, merged remote
Nov 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion app/code/Magento/Sales/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
* @method bool hasCustomerNoteNotify()
* @method bool hasForcedCanCreditmemo()
* @method bool getIsInProcess()
* @method \Magento\Customer\Model\Customer getCustomer()
* @method \Magento\Sales\Model\Order setSendEmail(bool $value)
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
* @SuppressWarnings(PHPMD.TooManyFields)
Expand Down Expand Up @@ -201,6 +200,11 @@ class Order extends AbstractModel implements EntityInterface, OrderInterface
* @var \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory
*/
protected $productListFactory;

/**
* @var \Magento\Customer\Model\CustomerFactory
*/
protected $customerFactory;

/**
* @var \Magento\Sales\Model\ResourceModel\Order\Item\CollectionFactory
Expand Down Expand Up @@ -332,6 +336,7 @@ class Order extends AbstractModel implements EntityInterface, OrderInterface
* @param ResourceModel\Order\CollectionFactory $salesOrderCollectionFactory
* @param PriceCurrencyInterface $priceCurrency
* @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productListFactory
* @param \Magento\Customer\Model\CustomerFactory $customerFactory
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
Expand Down Expand Up @@ -367,6 +372,7 @@ public function __construct(
\Magento\Sales\Model\ResourceModel\Order\CollectionFactory $salesOrderCollectionFactory,
PriceCurrencyInterface $priceCurrency,
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productListFactory,
\Magento\Customer\Model\CustomerFactory $customerFactory,
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
array $data = [],
Expand All @@ -380,6 +386,7 @@ public function __construct(
$this->_orderConfig = $orderConfig;
$this->productRepository = $productRepository;
$this->productListFactory = $productListFactory;
$this->customerFactory = $customerFactory;
$this->timezone = $timezone;
$this->_orderItemCollectionFactory = $orderItemCollectionFactory;
$this->_productVisibility = $productVisibility;
Expand Down Expand Up @@ -440,6 +447,18 @@ public function unsetData($key = null)
return $this;
}

/**
* Get customer object
*
* @return \Magento\Customer\Model\Customer
*/
public function getCustomer()
{
$customerId = $this->getCustomerId();
$customer = $this->customerFactory->create()->load($customerId);
return $customer;
}

/**
* Retrieve can flag for action (edit, unhold, etc..)
*
Expand Down
Loading