Page 1 of 1
Show all products button
Posted: Mon Feb 11, 2008 4:07 pm
by ogledesign1
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>
Posted: Mon Feb 11, 2008 8:41 pm
by AbleMods
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.
RE:
Posted: Tue Feb 12, 2008 1:37 pm
by ogledesign1
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!
Posted: Tue Feb 12, 2008 1:43 pm
by AbleMods
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.
Re: Show all products button
Posted: Tue Sep 30, 2008 12:53 pm
by blackstonemedia
I'm bumping this thread to see if anyone has figured out a way to do this?
Re: Show all products button
Posted: Mon Oct 06, 2008 12:03 pm
by mazhar
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
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"]]
Re: Show all products button
Posted: Tue Sep 13, 2011 3:37 pm
by crazyjoe
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?
Re: Show all products button
Posted: Fri Oct 07, 2011 2:58 pm
by crazyjoe
Bump!
Re: Show all products button
Posted: Mon Oct 24, 2011 5:50 pm
by david-ebt
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.