Displaying sort drop down box only on product pages

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
evanb@firefold.com
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 36
Joined: Mon Jul 21, 2008 3:45 pm

Displaying sort drop down box only on product pages

Post by evanb@firefold.com » Thu Sep 04, 2008 2:30 pm

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?

User avatar
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

Post by jmestep » Thu Sep 04, 2008 3:46 pm

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

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

Re: Displaying sort drop down box only on product pages

Post by mazhar » Thu Sep 04, 2008 10:46 pm

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);

evanb@firefold.com
Lieutenant, Jr. Grade (LT JG)
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

Post by evanb@firefold.com » Mon Sep 08, 2008 8:28 am

Thank you, where in the code should I put that piece?

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

Re: Displaying sort drop down box only on product pages

Post by mazhar » Mon Sep 08, 2008 8:20 pm

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;
...
...
}

evanb@firefold.com
Lieutenant, Jr. Grade (LT JG)
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

Post by evanb@firefold.com » Tue Sep 09, 2008 9:14 am

Thank you, worked perfect!

Post Reply