getCustomerGroupKey example

if (!empty($productTranslation['packUnit'])) {
                    $data['packUnit'] = $productTranslation['packUnit'];
                }
            }
        }

        return $data;
    }

    private function createShopContext(Order $order): ShopContextInterface
    {
        $customerGroupKey = $this->getCustomerGroupKey($order);
        $areaId = null;
        $countryId = null;
        $stateId = null;

        $currencyId = (int) $this->container->get(Connection::class)->fetchOne(
            'SELECT `id` FROM `s_core_currencies` WHERE `currency` = :currency',
            ['currency' => $order->getCurrency()]
        );

        $shippingAddress = $order->getShipping();
        if ($shippingAddress instanceof Shipping) {
            
private function getRegisterData(): array
    {
        $register = $this->View()->getAssign('register');
        if (!$register) {
            $register = [];
        }

        $session = $this->get('session');
        $register = array_replace_recursive([
            'personal' => [
                'sValidation' => $this->getCustomerGroupKey(),
            ],
            'billing' => [
                'country' => $session->offsetGet('sCountry'),
                'state' => $session->offsetGet('sState'),
            ],
        ]$register);

        return $register;
    }

    private function writeSession(array $data, Customer $customer): void
    {
Home | Imprint | This part of the site doesn't use cookies.