Show all products button

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
ogledesign1
Ensign (ENS)
Ensign (ENS)
Posts: 6
Joined: Thu Feb 07, 2008 10:42 am

Show all products button

Post by ogledesign1 » Mon Feb 11, 2008 4:07 pm

Is there a way to add a button which would allow the customer to view all available products within a category on a page, without having to go to page 2, 3, etc....this is a request of a client of mine who doesn't understand that 'paging' is good for browsers who don't have a very fast connection.

We want to keep the 'paging', however add an option with the "Show All". i just don't know how to override the rol/col settings in CategoryGridPage.aspx.cs.

The code I have implemented in CategoryGridPage.aspx and am awaiting further instruction is:

<asp>
<div>
<asp>
<ItemTemplate>
<a><Eval></a>
</ItemTemplate>
</asp><a>Show All</a>
</div>
</asp>
<div>
<asp></asp>
</div>

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Mon Feb 11, 2008 8:41 pm

The paging is somewhat "integrated" into the product user controls. It would be a bit of a challenge to pull it the paging completely.

I believe some of the other controls allow you to specify the number of items to display. Controls like RelatedProducts, FeaturedProducts etc have a parameter to tell how many to display. You could use one on a page, with the parameter set to a number higher than the total products in the store. Might just be an easy workaround for your situation.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

ogledesign1
Ensign (ENS)
Ensign (ENS)
Posts: 6
Joined: Thu Feb 07, 2008 10:42 am

RE:

Post by ogledesign1 » Tue Feb 12, 2008 1:37 pm

Thanks for your reply...I'm all about workarounds....i'm about at my wit's end in trying to hard-code this myself.

IF i was to implement something such as the FeaturedProducts...would this have to be additionally selected for each product within the Admin? I haven't messed with that specific feature yet so I'm not sure myself.

Thanks again!

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Tue Feb 12, 2008 1:43 pm

FeaturedProducts yes. It only displays products with the "featured Product" checkbox checked.

SimiliarProducts, no. It just pulls other products from the same category. I believe it has a display count parameter which you could set really high.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

blackstonemedia
Ensign (ENS)
Ensign (ENS)
Posts: 11
Joined: Tue Sep 30, 2008 12:52 pm
Contact:

Re: Show all products button

Post by blackstonemedia » Tue Sep 30, 2008 12:53 pm

I'm bumping this thread to see if anyone has figured out a way to do this?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Show all products button

Post by mazhar » Mon Oct 06, 2008 12:03 pm

I tried a workaround on the CategoryGridPage control. Edit the ConLib/CategoryCridPage.ascx and following property to the control

Code: Select all

private bool _enablePaging = true;

    public bool EnablePaging 
    {
        get { return _enablePaging; }
        set { _enablePaging = value; }
    }
Now locate the following line of code in BindProductList() method

Code: Select all

ProductList.DataSource = ProductDataSource.NarrowSearch(_Keywords, this.CategoryId, _ManufacturerId, 0, 0, _PageSize, (_HiddenPageIndex * _PageSize), SortResults.SelectedValue);
and make it look like

Code: Select all

if(EnablePaging)
            ProductList.DataSource = ProductDataSource.NarrowSearch(_Keywords, this.CategoryId, _ManufacturerId, 0, 0, _PageSize, (_HiddenPageIndex * _PageSize), SortResults.SelectedValue);
        else
            ProductList.DataSource = ProductDataSource.NarrowSearch(_Keywords, this.CategoryId, _ManufacturerId, 0, 0, SortResults.SelectedValue);
Now locate the following line of code in BindSearchResultsPanel() method

Code: Select all

BindPagingControls()
and make it look like

Code: Select all

if (EnablePaging)
            BindPagingControls();
        else
            PagerPanel.Visible = false;
After making these changes test the page. In order to disable the paging the scriptlet entry must like

Code: Select all

[[ConLib:CategoryGridPage EnablePaging="false"]]

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: Show all products button

Post by crazyjoe » Tue Sep 13, 2011 3:37 pm

Hi Mazhar, I'm trying to get this to work and it's just not happening. I'm up to 7.0.7 now, can you tell me if this code should work for that? I am looking for my paging to have an option that says "View All" after the list of page numbers so a customer could click that and it would show all products in the category. Any ideas?
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: Show all products button

Post by crazyjoe » Fri Oct 07, 2011 2:58 pm

Bump!
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
david-ebt
Captain (CAPT)
Captain (CAPT)
Posts: 253
Joined: Fri Dec 31, 2010 10:12 am

Re: Show all products button

Post by david-ebt » Mon Oct 24, 2011 5:50 pm

This same question came up more recently on another post. Here's the link:
viewtopic.php?f=45&t=15813
The solution isn't the most elegant, but it works.
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

Post Reply