Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

All Products on front page, similar to featured products

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #81  
Old 02-20-2015, 02:50 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

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

Default Re: All Products on front page, similar to featured products

Quote:
Originally Posted by minfinger
Tony,

No I want it to be List mode by default on the whole site.

In this case, you need to decorate the setWidgetParams() method of
Code:
\XLite\View\ItemsList\Product\Customer\Category\ACategory
class and add this line to this decorated function:

PHP Code:
$this->widgetParams[static::PARAM_DISPLAY_MODE]->setValue(static::DISPLAY_MODE_LIST); 

More info about decoration is here: http://kb.x-cart.com/display/XDD/Step+3+-+applying+logic+changes
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!

Last edited by tony_sologubov : 03-10-2015 at 03:54 AM.
Reply With Quote
  #82  
Old 02-21-2015, 07:02 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: All Products on front page, similar to featured products

Tony,

There is no ACategory in \XLite\View\ItemsList\Product\Customer\, it's in \XLite\View\ItemsList\Product\Customer\Category\

I made this module with this code. However, in the Category view I can't change to Grid View, but I can change to Table View.

PHP Code:
<?php
namespace XLite\Module\FasterThanYours\ChangeDefaultProductView\View\ItemsList\Product\Customer\Category;

abstract class 
ACategory extends \XLite\View\ItemsList\Product\Customer\Category\ACategory implements \XLite\Base\IDecorator
{
    public function 
setWidgetParams (array $params)
    {
        
parent::setWidgetParams($params);
 
        
$this->widgetParams[static::PARAM_DISPLAY_MODE]->setValue(static::DISPLAY_MODE_LIST);
    }
}
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #83  
Old 03-06-2015, 04:40 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

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

Default Re: All Products on front page, similar to featured products

Not sure, why it is not working for you as I have created the mod as you described and it works for me perfectly:
https://dl.dropboxusercontent.com/u/23858825/FasterThanYours-ChangeDefaultProductView-v5_1_0.tar

Note: are you cleaning your browser's cookies after module activation? The problem might be is that current mode selection is saved into session, so you might not notice the change even though it is there.

Tony.
__________________
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
  #84  
Old 03-07-2015, 07:05 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: All Products on front page, similar to featured products

No I wasn't, but I turned off the option to change the view anyway.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #85  
Old 03-10-2015, 03:55 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

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

Default Re: All Products on front page, similar to featured products

Quote:
Originally Posted by minfinger
No I wasn't, but I turned off the option to change the view anyway.

Does it mean that all problems are resolved with the mod at the moment?
__________________
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
  #86  
Old 03-10-2015, 09:27 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: All Products on front page, similar to featured products

I would consider this done.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #87  
Old 11-05-2015, 06:32 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: All Products on front page, similar to featured products

Tony,

Sorry to bother again, but after updating 5.2.6 to 5.2.9 the front page is only showing 100 products and then asking to go to a 2nd page. We want it to list all products no mater the count.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #88  
Old 11-07-2015, 09:09 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: All Products on front page, similar to featured products

Also,

We've now add other Products to the site that are only visible to Admins when they're logged onto the customer side to do POS transactions. I make it so the code that does the front end of the site only shows the products in Male and Female categories or perhaps just Puppies For Sale.

Here's the code:
https://www.dropbox.com/s/79539p8m9d5uhse/Tony-ProductsDemo-v5_2_0.tar?dl=0
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #89  
Old 11-17-2015, 03:33 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: All Products on front page, similar to featured products

Quote:
Originally Posted by minfinger
Tony,

Sorry to bother again, but after updating 5.2.6 to 5.2.9 the front page is only showing 100 products and then asking to go to a 2nd page. We want it to list all products no mater the count.
Hi.
The setting you are looking for is 'Maximum products per category listing page' under the 'Store setup' > 'Cart & checkout' section.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #90  
Old 11-21-2015, 06:58 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: All Products on front page, similar to featured products

Yup,

That's where I thought as well. Either my module is not reading that and Tony hard coded it to 100 (Doubtful sense it used to work) or the reference to that field has changed.
http://i21.photobucket.com/albums/b298/fasterthanyours/maximum%20products.jpg
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:08 AM.

   

 
X-Cart forums © 2001-2020