Answer the question
In order to leave comments, you need to log in
Is it possible to create a custom property for a user's cart?
Is it possible to create a custom property for the user's cart, for example, some parameter, and this parameter will be available through the method?
there is a basket that we receive
$basket = Sale\Basket::loadItemsForFUser(Sale\Fuser::getId(), 'Bitrix\Main\Context::getCurrent()->getSite()');
$basketItems = $basket->getBasketItems(); // массив объектов
$price = $basket->getPrice(); // Цена с учетом скидок
$weight = $basket->getWeight(); // Общий вес корзины
Answer the question
In order to leave comments, you need to log in
As an option, create an HL table in which to store FUSER_ID and all the attributes that you need for the basket object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question