Documentation

getCollectionsByBasket

array public
\Bitrix\Sale\Discount\Gift\Manager::getCollectionsByBasket(
 \Bitrix\Sale\Basket $basket,
 array|null $discounts = null,
 array|null $appliedDiscounts = null
);

Method returns list of gift collections in shopping cart. Non-static method.

To increase performance you can specify arguments $discounts and $appliedDiscounts, passed to shopping cart.

Parameters

ParameterDescriptionVersion
$basketShopping cart.
$discountsList of discounts, suitable to be applied to shopping cart.
$appliedDiscounts List of discounts, successfully applied in the shopping cart.

Example



© «Bitrix24», 2001-2024
Up