From d8837c0c4a48a7ae4c90feb36ac46a57646dff15 Mon Sep 17 00:00:00 2001 From: Aimeos Date: Fri, 11 Aug 2017 18:17:52 +0200 Subject: [PATCH] Streamlined retrieving address items --- lib/custom/src/MShop/Customer/Manager/FosUser.php | 2 +- lib/custom/tests/MShop/Customer/Manager/FosUserTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/custom/src/MShop/Customer/Manager/FosUser.php b/lib/custom/src/MShop/Customer/Manager/FosUser.php index cf33563..d190a03 100644 --- a/lib/custom/src/MShop/Customer/Manager/FosUser.php +++ b/lib/custom/src/MShop/Customer/Manager/FosUser.php @@ -512,7 +512,7 @@ public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], } $addrItems = []; - if( in_array( 'address', $ref, true ) ) { + if( in_array( 'customer/address', $ref, true ) ) { $addrItems = $this->getAddressItems( array_keys( $map ) ); } diff --git a/lib/custom/tests/MShop/Customer/Manager/FosUserTest.php b/lib/custom/tests/MShop/Customer/Manager/FosUserTest.php index f71a830..aaeeb6d 100644 --- a/lib/custom/tests/MShop/Customer/Manager/FosUserTest.php +++ b/lib/custom/tests/MShop/Customer/Manager/FosUserTest.php @@ -250,7 +250,7 @@ public function testSearchItemsRef() $search = $this->object->createSearch(); $search->setConditions( $search->compare( '==', 'customer.code', 'UTC001' ) ); - $results = $this->object->searchItems( $search, ['address', 'text'] ); + $results = $this->object->searchItems( $search, ['customer/address', 'text'] ); if( ( $item = reset( $results ) ) === false ) { throw new \Exception( 'No customer item for "UTC001" available' );