Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
calculateAmount example
// move data from previous calculation into new cart
$cart
->
setData
(
$original
->
getData
(
)
)
;
$this
->
runProcessors
(
$original
,
$cart
,
$context
,
$behavior
)
;
if
(
$behavior
->
hookAware
(
)
)
{
$this
->executor->
execute
(
new
CartHook
(
$cart
,
$context
)
)
;
}
$this
->
calculateAmount
(
$context
,
$cart
)
;
$cart
->
addErrors
(
...
$this
->validator->
validate
(
$cart
,
$context
)
)
;
$cart
->
setTransactions
(
$this
->transactionProcessor->
process
(
$cart
,
$context
)
)
;
$cart
->
setRuleIds
(
$context
->
getRuleIds
(
)
)
;