getMaxRedemptionsGlobal example

/** * Gets if the promotion has at least 1 discount. */
    public function hasDiscount(): bool
    {
        return $this->discounts instanceof PromotionDiscountCollection && $this->discounts->count() > 0;
    }

    public function isOrderCountValid(): bool
    {
        return $this->getMaxRedemptionsGlobal() === null
            || $this->getMaxRedemptionsGlobal() <= 0
            || $this->getOrderCount() < $this->getMaxRedemptionsGlobal();
    }

    public function isOrderCountPerCustomerCountValid(string $customerId): bool
    {
        $customerId = mb_strtolower($customerId);

        return $this->getMaxRedemptionsPerCustomer() === null
            || $this->getMaxRedemptionsPerCustomer() <= 0
            || $this->getOrdersPerCustomerCount() === null
            
Home | Imprint | This part of the site doesn't use cookies.