isNumberAvailable example



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

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

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

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

        $selected = $this->findFallbackById($productId);
        if ($selected === '') {
            throw new RuntimeException(sprintf('No active product variant found for product with number "%s" and id "%s"', $number$productId));
        }

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