View Single Post
Old 12-18-2014, 03:58 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline

X-Cart team
Join Date: Jan 2009
Posts: 2,431

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

Not sure why it does not work for you, because it work perfectly for me:

What I have done is I enabled Custom Skin module and then put View/ProductsOnHomePage.php file inside it with this code:

PHP Code:

namespace XLite\Module\XC\CustomSkin\View;  

 * @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

In order to debug the problem, you need to check that you have not decorated the \XLite\View\ItemsList\Product\Customer\Category\AC ategory class anywhere else. If you did, you might have unsetted $this->widgetParams[self::PARAM_SHOW_DISPLAY_MODE_SELECTOR] param there and it causes the fatal error.
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote