Answer the question
In order to leave comments, you need to log in
How to add a product to the cart for a specific user in Bitrix?
there is an ID and product data and a user ID. You need to programmatically add the product to his cart.
I use CSaleBasket::Add(), in the field "FUSER_ID" I specify the ID of the required user. the code is working, the product is added incomprehensibly where. on the page Shop -> Customers -> Baskets the following picture:
if you log in on behalf of the desired user - the basket is empty.
chyadnt?
Answer the question
In order to leave comments, you need to log in
Perhaps you are specifying the wrong parameters. Please note that, for example, the id of the goods in the basket and the id of the goods in the catalog are different things. Perhaps the user id will be different, check through the admin panel.
If we are talking about a one-time addition - just log in as this user through the admin panel and manually add goods to the basket for him. If we are talking about scripts, then read the documentation for the functions used again and make sure that all parameters are correct.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question