public function getInstockInfo($orderNumber,
$quantity) { if (empty($orderNumber)) { return Shopware()->
Snippets()->
getNamespace('frontend'
)->
get( 'CheckoutSelectVariant',
'Please select an option to place the required product in the cart',
true
);
} $quantity =
max(1,
(int) $quantity);
$inStock =
$this->
getAvailableStock($orderNumber);
$inStock['quantity'
] +=
$quantity;
if (empty($inStock['articleID'
])) { return Shopware()->
Snippets()->
getNamespace('frontend'
)->
get( 'CheckoutArticleNotFound',
'Product could not be found.',
true
);
} if (!
empty($inStock['laststock'
]) || !
empty(Shopware()->
Config()->
get('InstockInfo'
))) { if ($inStock['instock'
] <= 0 && !
empty($inStock['laststock'
])) {