getTechnicalNameOfOrderNumber example

private function loadBasketPlugins(BasketStruct $basket, array $positions): void
    {
        $context = new PluginsByTechnicalNameRequest(
            $this->getLocale(),
            $this->getVersion(),
            array_column($positions, 'technicalName')
        );

        $plugins = $this->get(PluginStoreService::class)->getPlugins($context);

        foreach ($basket->getPositions() as $position) {
            $name = $this->getTechnicalNameOfOrderNumber($position->getOrderNumber()$positions);

            if ($name === null) {
                continue;
            }

            $key = strtolower($name);
            $position->setPlugin($plugins[$key]);
        }
    }

    /** * @param array<array> $positions */
Home | Imprint | This part of the site doesn't use cookies.