added max allowd quantity for service products

This commit is contained in:
Shreesh Arora
2023-03-05 13:59:42 +05:30
parent 7f7122d602
commit 3645f2d9e8
10 changed files with 45 additions and 7 deletions

View File

@@ -5264,6 +5264,8 @@ class AdminOrdersControllerCore extends AdminController
if ($objProduct->allow_multiple_quantity) {
if (!Validate::isUnsignedInt($qty)) {
$this->errors[] = Tools::displayError('The quantity code you\'ve entered is invalid.');
// } elseif ($objProduct->max_quantity && $qty > $objProduct->max_quantity) {
// $this->errors[] = Tools::displayError(sprintf('cannot add more than %d quantity.', $objProduct->max_quantity));
}
} else {
$qty = 1;