Skip to content

Commit

Permalink
Improved compatibility for Symfony integration
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Apr 12, 2017
1 parent bb18b37 commit 6ca68b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Expand Up @@ -65,7 +65,7 @@ public function getItem( $id )
$search = $manager->createSearch( true );
$expr = [
$search->compare( '==', 'order.id', $id ),
$search->compare( '==', 'order.base.customerid', $context->getUserId() ),
$search->compare( '==', 'order.base.customerid', (string) $context->getUserId() ),
$search->getConditions(),
];
$search->setConditions( $search->combine( '&&', $expr ) );
Expand Down
Expand Up @@ -124,19 +124,18 @@ public function process( \Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId,
*/
public function updateSync( ServerRequestInterface $request, ResponseInterface $response, array $urls )
{
$queryParams = $request->getQueryParams();
$params = (array) $request->getAttributes() + (array) $request->getParsedBody() + (array) $request->getQueryParams();

if( !isset( $queryParams['code'] ) ) {
if( !isset( $params['code'] ) ) {
return;
}

$context = $this->getContext();
$manager = \Aimeos\MShop\Factory::createManager( $context, 'service' );

$provider = $manager->getProvider( $manager->findItem( $queryParams['code'] ) );
$provider = $manager->getProvider( $manager->findItem( $params['code'] ) );
$provider->injectGlobalConfigBE( $urls );

$params = array_merge( $queryParams, (array) $request->getParsedBody() );
$body = (string) $request->getBody();
$response = null;
$headers = [];
Expand Down

0 comments on commit 6ca68b1

Please sign in to comment.