Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isNetPrice example
public
function
addProportionalDiscount
(
DiscountContext
$discountContext
)
{
$prices
=
$this
->
getPositionPrices
(
$discountContext
)
;
$hasMultipleTaxes
=
$this
->calculator->
hasDifferentTaxes
(
$prices
)
;
if
(
$discountContext
->
getDiscountType
(
)
=== self::DISCOUNT_ABSOLUTE
)
{
$discounts
=
$this
->calculator->
calculate
(
$discountContext
->
getDiscountValue
(
)
,
$prices
,
$discountContext
->
isNetPrice
(
)
)
;
}
else
{
$discounts
=
$this
->calculator->
recalculatePercentageDiscount
(
$discountContext
->
getDiscountValue
(
)
,
$prices
,
$discountContext
->
isNetPrice
(
)
)
;
}
$discountBaseName
=
$discountContext
->
getDiscountName
(
)
;
/** @var Price $discount */