Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog-inventory
Model
System
Config
Backend
Qtyincrements.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\CatalogInventory\Model\System\Config\Backend
;
8
9
use
Magento\Framework\Exception\LocalizedException
;
10
14
class
Qtyincrements
extends
\Magento\Framework\App\Config\Value
15
{
22
public
function
beforeSave
()
23
{
24
$value
= $this->getValue();
25
if
(floor(
$value
) !=
$value
) {
26
throw
new
LocalizedException
(
27
__
(
"Quantity increments can't use decimals. Enter a new increment and try again."
)
28
);
29
}
30
}
31
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\CatalogInventory\Model\System\Config\Backend\Qtyincrements
Definition:
Qtyincrements.php:14
__
__()
Definition:
__.php:13
Magento\CatalogInventory\Model\System\Config\Backend
Definition:
MinsaleqtyTest.php:7
$value
$value
Definition:
gender.phtml:16
Magento\CatalogInventory\Model\System\Config\Backend\Qtyincrements\beforeSave
beforeSave()
Definition:
Qtyincrements.php:22