string
$baseUrl,
int
$shopId,
?int
$currencyId = null,
?string
$currentCustomerGroupKey = null,
?int
$areaId = null,
?int
$countryId = null,
?int
$stateId = null,
array
$streamIds =
[] ): ShopContextInterface
{ $shop =
$this->shopGateway->
get($shopId);
if (!
$shop instanceof Shop
) { throw new StructNotFoundException(Shop::
class,
$shopId);
} $fallbackCustomerGroupKey = self::FALLBACK_CUSTOMER_GROUP;
if ($currentCustomerGroupKey === null
) { $currentCustomerGroupKey =
$fallbackCustomerGroupKey;
} $groups =
$this->customerGroupGateway->
getList([$currentCustomerGroupKey,
$fallbackCustomerGroupKey]);
$currentCustomerGroup =
$groups[$currentCustomerGroupKey];
$fallbackCustomerGroup =
$groups[$fallbackCustomerGroupKey];