Skip to content

Commit

Permalink
Streamlined retrieving address items
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Aug 11, 2017
1 parent f709ea8 commit d8837c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/custom/src/MShop/Customer/Manager/FosUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}

Expand Down
2 changes: 1 addition & 1 deletion lib/custom/tests/MShop/Customer/Manager/FosUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down

0 comments on commit d8837c0

Please sign in to comment.