$voucherDetails['value'
] *=
$factor;
} $basketValue =
($amount['totalAmount'
] ?? 0
) /
$factor;
// Check if the basket's value is above the voucher's
if ($basketValue <
$voucherDetails['minimumcharge'
]) { $snippet =
$this->snippetManager->
getNamespace('frontend/basket/internalMessages'
)->
get( 'VoucherFailureMinimumCharge',
'The minimum charge for this voucher is {$sMinimumCharge|currency}'
);
$smarty =
Shopware()->
Container()->
get(\Enlight_Template_Manager::
class);
$template =
$smarty->
createTemplate(sprintf('string:%s',
$snippet));
$template->
assign('sMinimumCharge',
$voucherDetails['minimumcharge'
]);
$sErrorMessages[] =
$template->
fetch();
return ['sErrorFlag' => true, 'sErrorMessages' =>
$sErrorMessages];
} $timeInsert =
date('Y-m-d H:i:s'
);
$voucherName =
$this->snippetManager
->
getNamespace('backend/static/discounts_surcharges'
)