A
A
Alexander2021-07-14 11:54:28
1C-Bitrix
Alexander, 2021-07-14 11:54:28

How to clear b_sale_viewed_product?

There is a table b_sale_viewed_product, weighing many GB, data from 19 years old, needs to be cleaned.
Cron doesn't work.

I want to clean my hands.
I found a method

I create a typical page, I place the code there

\Bitrix\Main\Loader::includeModule('catalog');
\Bitrix\Catalog\CatalogViewedProductTable::clear(10);


those. that would leave only the goods for the last 10 days, but does not roll.
Similarly, when changing days, it does not help, I can not understand why.

I also read it here , but either I'm doing something wrong (calling the CSaleViewedProduct::ClearViewed() function), it doesn't help.

Who cleans up? Or where to dig?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question