07-24-2018, 05:29 AM
|
|
|
|
eXpert
|
|
Join Date: Jul 2004
Location: UK
Posts: 263
|
|
|
Re: Extending Tags Module without Breaking Search
Like this?
PHP Code:
/**
* Return number of items in products list
*
* @return integer
*/
protected function getItemsCount()
{
\XLite\Logger::logCustom('andrew', 'getItemsCount: ', false);
\XLite\Logger::logCustom('andrew', $this->getSearchCondition(), false);
return $this->getData($this->getSearchCondition(), true);
}
PHP Code:
protected function getPageData()
{
return $this->executeCachedRuntime(function () {
if ($this->isExportable()) {
\XLite\Core\Session::getInstance()->{static::getConditionCellName()}
= $this->getExportSearchCondition();
}
\XLite\Logger::logCustom('andrew', 'getPageData: ', false);
\XLite\Logger::logCustom('andrew', $this->getLimitCondition(), false);
return $this->getData($this->getLimitCondition());
});
}
I get this in the log:...
Quote:
[14:16:13.000000] getItemsCount:
Runtime id: 7d87957dbe53358871b03163711464dc
SAPI: fpm-fcgi; IP: xx.xx.xx.xx
URI: /x5-tags-test/w/flowmeter/approvals/wras-atex-mcerts/
Method: GET
[14:16:13.000000] stdClass::__set_state(array(
'__CLASS__' => 'XLite\\Core\\CommonCell',
'properties' =>
array (
'substring' => 'approvals/wras-atex-mcerts',
'including' => 'any',
'byTag' => NULL,
'orderBy' => 'Array(2)',
'hasTags' => true,
),
))
|
Quote:
[14:16:13.000000] getPageData:
Runtime id: 7d87957dbe53358871b03163711464dc
SAPI: fpm-fcgi; IP: xx.xx.xx.xx
URI: /x5-tags-test/w/flowmeter/approvals/wras-atex-mcerts/
Method: GET
[14:16:13.000000] stdClass::__set_state(array(
'__CLASS__' => 'XLite\\Core\\CommonCell',
'properties' =>
array (
'substring' => 'approvals/wras-atex-mcerts',
'including' => 'any',
'byTag' => NULL,
'orderBy' => 'Array(2)',
'hasTags' => true,
'limit' => 'Array(2)',
),
))
|
Full log if it helps: https://pastebin.com/NyyFdhyK
__________________
Core version: 5.5.xx
|
|