Answer the question
In order to leave comments, you need to log in
How to get only 1 gift for a cart item?
How to get only 1 gift for a cart item? Gifts are configured for the item
using the cart rule . Depending on the number of items put in the basket, your gift.
Let's say for 10 units - Gift 1, for 15 units. - Gift 2
if you put more than 16 items in the basket, returns both gifts, how to get only 1 gift with the maximum number of items allowed
$collections = $ar->getCollectionsByBasket(
\Bitrix\Sale\Basket::loadItemsForFUser(\Bitrix\Sale \Fuser::getId(), SITE_ID)
);
foreach($collections as $collections)
{
Answer the question
In order to leave comments, you need to log in
In the settings of the rules for working with the basket, the checkbox
" Stop further application of the rules "
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question