View Single Post
  #2  
Old 12-11-2014, 03:34 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

Hi juancho!

1) You should decorate the \XLite\View\ItemsList\Product\Customer\Category\AC ategory class instead of \XLite\View\ItemsList\Product\Customer\ACustomer, because \XLite\View\ItemsList\Product\Customer\ACustomer class is for more widgets than just displaying products in central area.

2)
PHP Code:
protected function getPagerClass() 
    { 
        return 
'\XLite\View\Pager\Infinity'
    } 

This code is correct in order to disable pagination.

3)
PHP Code:
protected function defineWidgetParams()
    {
      
parent::defineWidgetParams(); 

        unset(
$this->widgetParams[self::PARAM_SHOW_DISPLAY_MODE_SELECTOR]); 
        unset(
$this->widgetParams[self::PARAM_SHOW_SORT_BY_SELECTOR]); 
    } 

This code is almost correct. Instead of
PHP Code:
unset($this->widgetParams[self::PARAM_SHOW_DISPLAY_MODE_SELECTOR]); 
construction you should use this one:

PHP Code:
$this->widgetParams[self::PARAM_SHOW_SORT_BY_SELECTOR]->setValue(false); 

And it will work out.

The corrected mod is here https://dl.dropboxusercontent.com/u/23858825/MyID-MyModule-v5_1_0.tar
__________________
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