Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getCalculatedMaxPurchase example
$this
->
getPriceDefinition
(
$product
,
$context
,
$lineItem
->
getQuantity
(
)
)
)
;
}
$quantityInformation
=
new
QuantityInformation
(
)
;
$quantityInformation
->
setMinPurchase
(
$product
->
getMinPurchase
(
)
?? 1
)
;
$quantityInformation
->
setMaxPurchase
(
$product
->
getCalculatedMaxPurchase
(
)
)
;
$quantityInformation
->
setPurchaseSteps
(
$product
->
getPurchaseSteps
(
)
?? 1
)
;
$lineItem
->
setQuantityInformation
(
$quantityInformation
)
;
$purchasePrices
= null;
$purchasePricesCollection
=
$product
->
getPurchasePrices
(
)
;
if
(
$purchasePricesCollection
!== null
)
{