MinOrderQuantityError example

$cart->addErrors(
                new ProductStockReachedError((string) $item->getReferencedId()(string) $item->getLabel()$maxAvailable)
            );

            return;
        }

        if ($item->getQuantity() < $minPurchase) {
            $item->setQuantity($minPurchase);

            $cart->addErrors(
                new MinOrderQuantityError((string) $item->getReferencedId()(string) $item->getLabel()$minPurchase)
            );

            return;
        }

        $fixedQuantity = $this->fixQuantity($minPurchase$item->getQuantity()$steps);
        if ($item->getQuantity() !== $fixedQuantity) {
            $item->setQuantity($fixedQuantity);

            $cart->addErrors(
                new PurchaseStepsError((string) $item->getReferencedId()(string) $item->getLabel()$fixedQuantity)
            );
Home | Imprint | This part of the site doesn't use cookies.