Displaying sort drop down box only on product pages
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jul 21, 2008 3:45 pm
Displaying sort drop down box only on product pages
It is possible to have the "sort" drop down box only display on product pages where it can be most effective, instead of on each category/subcategory page as well?
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Displaying sort drop down box only on product pages
Are you meaning each individual product page or a category page that displays products only? I have done that by using different display pages, but you could probably code some logic in on one display page for all similar to what mazhar posted for your question about using different display setup for categories as opposed to products.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Displaying sort drop down box only on product pages
Yes that code will help you with this situation as well. Let suppose we say that if a category contains at least one sub category then on the display page the sort drop down will not be shown. Then you can hide the sort options by checking that the child items contains a category or not something like.
Code: Select all
SortDropDown.Visible = !(catalogNode.CatalogNodeType == CatalogNodeType.Category);
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jul 21, 2008 3:45 pm
Re: Displaying sort drop down box only on product pages
Thank you, where in the code should I put that piece?
Re: Displaying sort drop down box only on product pages
In CategoryGridPage4 there is already a CatalogNodeList_ItemDataBound function available and already checking the item type so you just need to add only a single statement to done the this hide job in the else part of following if statement
Code: Select all
if (catalogNode.CatalogNodeType == CatalogNodeType.Product)
{
....
....
}
else
{
...
...
YourSortDropdown.Visible = false;
...
...
}
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jul 21, 2008 3:45 pm
Re: Displaying sort drop down box only on product pages
Thank you, worked perfect!