Documentation

buildFromBasket

mixed|null public static
\Bitrix\Sale\Discount::buildFromBasket(
 \Bitrix\Sale\Basket $basket,
 \Bitrix\Sale\Discount\Context\BaseContext $context
);

Method returns discount object with arbitrary (not current) user context. Static method.

Parameters

ParameterDescriptionVersion
$basketShopping cart object.
$contextUser context object.

Exception

  • \Bitrix\Main\InvalidOperationException


© «Bitrix24», 2001-2024
Up