$criteria->
setTitle('context-factory::customer-group'
);
/** @var CustomerGroupEntity $customerGroup */
$customerGroup =
$this->customerGroupRepository->
search($criteria,
$base->
getContext())->
first() ??
$customerGroup;
} // loads tax rules based on active customer and delivery address
$taxRules =
$this->
getTaxRules($base,
$customer,
$shippingLocation);
// detect active payment method, first check if checkout defined other payment method, otherwise validate if customer logged in, at least use shop default
$payment =
$this->
getPaymentMethod($options,
$base,
$customer);
[$itemRounding,
$totalRounding] =
$this->
getCashRounding($base,
$shippingLocation);
$context =
new Context( $base->
getContext()->
getSource(),
[],
$base->
getCurrencyId(),
$base->
getContext()->
getLanguageIdChain(),
$base->
getContext()->
getVersionId(),
$base->
getCurrency()->
getFactor(),
true,
CartPrice::TAX_STATE_GROSS,
$itemRounding );