An addition to my previous email:
when I run just this code:
PHP Code:
<?php
namespace XLite\Module\Astur\SirtoliSkin\View\Custom;
/**
*
* @ListChild (list="center.bottom", zone="customer", weight="300")
*/
class ProductsOnHomePage extends \XLite\View\ItemsList\Product\Customer\Category\ACategory
{
protected $allProducts = null;
protected function getHead()
{
'My products';
}
// this method defines that products will be displayed only in the main page
public static function getAllowedTargets()
{
$return = array('main');
return $return;
}
// this method defines that you do not need pagination
protected function getPagerClass()
{
return '\XLite\View\Pager\Infinity';
}
// this method defines that all products must be displayed in this section
protected function getData(\XLite\Core\CommonCell $cnd, $countOnly = false)
{
if (!isset($this->allProducts)) {
$this->allProducts = \XLite\Core\Database::getRepo('XLite\Model\Product')->findAll();
}
return true == $countOnly
? count($this->allProducts)
: $this->allProducts;
}
}
both, the display and sort menu are visible but when you try to use them by changing to a different option then no product at all is displayed.