A
A
ArrayPop2020-09-24 11:58:13
1C-Bitrix
ArrayPop, 2020-09-24 11:58:13

Why doesn't $basket->getExistsItem('catalog', $productId) work in bitrix?

I try to check the existence of a product in the cart using the product id, it does not work.
$basket->getExistsItem('catalog', $productId)
How to extract an item from the basket by product id? Does $basket have a method for doing this, without having to manually iterate through all the elements of the basket and compare.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2020-09-24
@ArrayPop

Here I explained in detail what and how in this method (read the comments too) link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question