Answer the question
In order to leave comments, you need to log in
How to find the Bitrix\Main\Analytics\CounterDataTable class file?
I've already broken my head.
How to find the file where this Bitrix\Main\Analytics\CounterDataTable method is located?
bitrix/components/bitrix/?
Help me please.
---
In general, I fixed the problem with this class by adding the missing file (it is not clear why it was not there):
<?php
// /bitrix/modules/catalog/lib/catalogviewedproduct.php
namespace Bitrix\Catalog;
use Bitrix\Main\Config\Option;
use Bitrix\Main\Application;
class CatalogViewedProductTable{
public static function clearAgent()
{
self::clear((int)Option::get('catalog', 'viewed_time'));
return '\Bitrix\Catalog\CatalogViewedProductTable::clearAgent();';
}
public static function clear($liveTime = 10)
{
$connection = Application::getConnection();
$helper = $connection->getSqlHelper();
$liveTime = (int)$liveTime;
$liveTo = $helper->addSecondsToDateTime($liveTime * 24 * 3600, "DATE_VISIT");
$now = $helper->getCurrentDateTimeFunction();
$deleteSql = "delete from b_catalog_viewed_product where ".$now." > ".$liveTo;
$connection->query($deleteSql);
}
}
?>
Thanks to DevMan for the help.
https://bxapi.ru - the resource helped a lot. If you have something missing - look at this site for information about this class and in which file it is declared.
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