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
  #61  
Old 01-26-2015, 02:18 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

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

I follow you, however do I just add that to the end of the existing php file above:
PHP Code:
Protected function setWidgetParams()
    {
        
parent::setWidgetParams();
 
        
$this->widgetParams[static::PARAM_GRID_COLUMNS]->setValue(static::DISPLAY_MODE_LIST);
    }

</span></span>
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #62  
Old 01-29-2015, 12:56 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

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

Any ideas or help on this?

Thank you
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #63  
Old 02-03-2015, 04:38 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

Hi Michael!

I have renewed my tutorial about showing all products on a page and it can be found here:
http://kb.x-cart.com/display/XDD/ItemsList+introduction+--+showing+products+on+a+page

Once you create the mod that will display all products, you should add the following methods into your ItemsList viewer class:
PHP Code:
protected function defineWidgetParams()
    {
        
parent::defineWidgetParams();

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

    protected function 
setWidgetParams()
    {
        
parent::setWidgetParams();
 
        
$this->widgetParams[static::PARAM_GRID_COLUMNS]->setValue(static::DISPLAY_MODE_LIST);
    } 

and it should do the trick. Please, let me know if it makes sense to you.

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
  #64  
Old 02-03-2015, 04:03 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

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

Tony,

I'm sorry I'm lost now. We went from something that was working to something that doesn't work anymore.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #65  
Old 02-09-2015, 06:43 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

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

Tony,

I went to the Link you posted, download you're demo and when I put that code into \Tony\ProductsDemo\View\ItemsList\Product\Customer \AllProducts.php it just messes up the front page of the site. Is that not right place to put it?
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #66  
Old 02-15-2015, 02:51 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

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

Tony,

This is the most recent code that I've been working with using your ProductsDemo download and all I'm getting is the image below. I've tried using the iDecorator in many different forms and I'm not getting any results. I feel like if I can get this part of the mod figured out I can make my original Mod work properly.
PHP Code:
<?php 

namespace XLite\Module\Tony\ProductsDemo\View\ItemsList\Product\Customer

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

class AllProducts extends \XLite\View\ItemsList\Product\Customer\ACustomer

    protected function 
defineWidgetParams()
    {
        
parent::defineWidgetParams();

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

    protected function 
setWidgetParams()
    {
        
parent::setWidgetParams();
 
        
$this->widgetParams[static::PARAM_GRID_COLUMNS]->setValue(static::DISPLAY_MODE_LIST);
    }
http://i21.photobucket.com/albums/b298/fasterthanyours/All%20Products%20List%20via%20Tonys%20Mod.jpg
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #67  
Old 02-16-2015, 03:32 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

Hi Michael!

Could you please send me the latest version of your module, so I could have have a look at what you have at the moment?

Then, I will be able to suggest where to go from 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
  #68  
Old 02-16-2015, 04:45 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,

In my previous post I was talking about trying to get it to work in your module, which was only important so I could try to figure out how to get it to work in the original module.

Here's is my version of your module
https://www.dropbox.com/s/f0ewzahwy0gqjem/Tony-ProductsDemo-v5_1_2%20-%202015_0216.tar?dl=0

This is my module. Honestly I don't recall if it has the same php in it or not. I'm at work at the moment and I can't check.
https://www.dropbox.com/s/zzad6v9dunmcg78/FasterThanYours-ProductsOnHomePage-v5_1_3%20-%202015_0216.tar?dl=0

EDIT: Really just help me fix my module so it works properly.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #69  
Old 02-16-2015, 06:19 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

As a first step, do the following:
1) Remove the <X-Cart>/classes/XLite/Module/Tony/ProductsDemo/View/ItemsList/Product/Customer/ACustomer.php file as it does not do anything and it has Parse errors
2) Inside the \XLite\Module\Tony\ProductsDemo\View\ItemsList\Pro duct\Customer\AllProducts class replace this piece of code:
PHP Code:
protected static function getWidgetTarget()
    {
        return 
'all_products';
    } 
with the next one:
PHP Code:
protected static function getWidgetTarget()
    {
        return 
'main';
    } 

After that your products will be displayed on home page, while they will still have pagination and sorting options.

Please, let me know if it works as expected to you.

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
  #70  
Old 02-16-2015, 07:12 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,

Great, now it's working. I could not figure out that target to save my life.

However, my client wants the Frontpage view to be in List Mode only, no other options and no Sorting.

Then we want the rest of the Site in List View by default.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



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 09:23 PM.

   

 
X-Cart forums © 2001-2020