Answer the question
In order to leave comments, you need to log in
How to take the number of products viewed by the user?
It is necessary to take the number (number) of viewed goods, I can’t figure out where to get it or calculate it. The catalog.products.viewed component is included. The page itself works, it is necessary to have a number of viewed goods on any page of the site.
As a result, the answer, as always, is in the comments, thanks to @s_panteleev
Still, it’s better not to make a selection with a direct query) but yes, from this table
\Bitrix\Catalog\CatalogViewedProductTable::getList(['filter' => ['FUSER_ID' => \Bitrix\Sale\Fuser::getId()]])->getSelectedRowsCount();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question