$name =
$this->cartOrderNumberProvider->
get(CartOrderNumberProviderInterface::SURCHARGE
);
// Delete previous inserted discounts
$this->connection->
createQueryBuilder() ->
where('sessionID = :sessionId'
) ->
andWhere('ordernumber IN (:names)'
) ->
setParameter('names',
$this->cartOrderNumberProvider->
getAll(CartOrderNumberProviderInterface::SURCHARGE
), Connection::PARAM_STR_ARRAY
) ->
setParameter('sessionId',
$this->session->
get('sessionId'
)) ->
delete('s_order_basket'
) ->
execute();
if (!
$this->
sCountBasket()) { return false;
} $minimumOrder =
$this->sSYSTEM->sUSERGROUPDATA
['minimumorder'
];
$minimumOrderSurcharge =
$this->sSYSTEM->sUSERGROUPDATA
['minimumordersurcharge'
];
if (!
$minimumOrder || !
$minimumOrderSurcharge) { return null;
} $amount =
$this->
sGetAmount();