View Single Post
Old 12-17-2014, 06:46 PM
juancho juancho is offline

Advanced Member
Join Date: Mar 2014
Posts: 47

Default Re: How eliminate the display options and sorting tabs in product pages

Hi Tony,
thanks, here I am again, trying to make this run.
ok this is my whole code. It crashes with this message: "Error (code: 1): Call to a member function setValue() on a non-object"

PHP Code:

namespace  XLite\Module\MyID\MyModule\View\Custom

 * @ListChild (list="center.bottom", zone="customer", weight="300") 

class ProductsOnHomePage extends \XLite\View\ItemsList\Product\Customer\Category\ACategory 

$allProducts null

    protected function 
'My products'

// this method defines that products will be displayed only in the main page 
public static function getAllowedTargets()  
$return = array('main'); 


// this method defines that you do not need pagination 
protected function getPagerClass() 

// 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(); 
//          $this->allProducts = \XLite\Core\Database::getRepo('XLite\Model\Product')->findAllActive(); 

true == $countOnly 

    public function 
setWidgetParams(array $params)

What I am trying to do is get rid of the display menu but maintaining the sort menu.
what it's wrong?
X-Cart Business 5.0.12
Reply With Quote