Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
markModifiedByApp example
if
(
$context
->
getTaxState
(
)
=== CartPrice::TAX_STATE_GROSS
)
{
return
$currency
->
getGross
(
)
;
}
return
$currency
->
getNet
(
)
;
}
private
function
overwrite
(
QuantityPriceDefinition
$definition
)
: void
{
if
(
$this
->item instanceof LineItem
)
{
$this
->item->
markModifiedByApp
(
)
;
$this
->item->
setPriceDefinition
(
$definition
)
;
}
$new
=
$this
->priceStubs->
calculateQuantity
(
$definition
,
$this
->context
)
;
$this
->price->
overwrite
(
$new
->
getUnitPrice
(
)
,
$new
->
getTotalPrice
(
)
,
$new
->
getCalculatedTaxes
(
)
,
)
;
}