getNumberBySelection example

if ($productId === 0) {
            throw new RuntimeException(sprintf('No valid product id found for product with number "%s"', $number));
        }

        if (!$this->isProductAvailableInShop($productId$context->getShop())) {
            throw new RuntimeException(sprintf('Product with number "%s" is not available in current shop', $number));
        }

        $selected = '';
        if (!empty($selection)) {
            $selected = $this->getNumberBySelection($productId$selection);
        }

        if ($selected !== '') {
            return $selected;
        }

        if ($this->isNumberAvailable($number)) {
            return $number;
        }

        if ($this->hasNotificationsActive($productId)) {
            
Home | Imprint | This part of the site doesn't use cookies.