createGrossCustomerGroup example

bool $groupNet,
        array $possibleTaxes,
        array $creditPrices,
        \Closure $successCallback
    ): void {
        $this->setSalesChannelContext($groupNet);
        static::assertNotNull($this->salesChannelContext->getCustomer());

        $this->getContainer()->get('customer.repository')->update([
            [
                'id' => $this->salesChannelContext->getCustomer()->getId(),
                'groupId' => $groupNet ? $this->createNetCustomerGroup() : $this->createGrossCustomerGroup(),
            ],
        ]$this->salesChannelContext->getContext());

        $cart = $this->generateDemoCart($possibleTaxes);
        $cart = $this->generateCreditItems($cart$creditPrices);

        $orderId = $this->cartService->order($cart$this->salesChannelContext, new RequestDataBag());

        $invoiceConfig = new DocumentConfiguration();
        $invoiceConfig->setDocumentNumber('1001');

        
Home | Imprint | This part of the site doesn't use cookies.