CustomerGroupRegistrationSettingsRouteResponse example

$criteria->addFilter(new EqualsFilter('registrationActive', 1));
        $criteria->addFilter(new EqualsFilter('registrationSalesChannels.id', $context->getSalesChannel()->getId()));

        $result = $this->customerGroupRepository->search($criteria$context->getContext());
        if ($result->getTotal() === 0) {
            throw CustomerException::customerGroupRegistrationConfigurationNotFound($customerGroupId);
        }

        $customerGroup = $result->first();
        \assert($customerGroup instanceof CustomerGroupEntity);

        return new CustomerGroupRegistrationSettingsRouteResponse($customerGroup);
    }
}
Home | Imprint | This part of the site doesn't use cookies.