Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add Sort Drop Down to Product Listing?

Add Sort Drop Down to Product Listing?

Locked

Views: 4,055

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
26 Nov 2006, 8:54 PM
#1
hanzj avatar

hanzj

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Add Sort Drop Down to Product Listing?

Hello all,

I have been trying to do this for some time and haven't had much luck. I have noticed a few other people would also like this functionality so I thought I'd try to get a definitive answer if one exists.

I would like to add a sort drop down box (like in the all products page) to the product listing page.

Sort drop down:
http://www.uniqueillumination.com/products_all.html

Added to this product listing page:
http://www.uniqueillumination.com/interior-lighting-chandeliers-c-1_16.html

Due to the layout of the product listing page, I cannot use the column heading to sort the products by name, price, etc., so the drop down is my only option to sort these products.

Any help would be greatly appreciated.

Thanks,

Hanz

26 Nov 2006, 9:00 PM
#2
hanzj avatar

hanzj

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Re: Add Sort Drop Down to Product Listing?

Nevermind...I got it.

You just need to add this code:

<?php require($template->get_template_dir('/tpl_modules_listing_display_order.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_listing_display_order.php'); ?> <br />

to the tpl_index_product_list.php file.

Hope this help someone.

Thanks,

Hanz

26 Nov 2006, 9:02 PM
#3
hanzj avatar

hanzj

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Re: Add Sort Drop Down to Product Listing?

Nevermind my nevermind.. :D

All that does is add the sort box....it doesn't sort the products.

-Hanz

26 Nov 2006, 10:02 PM
#4
hanzj avatar

hanzj

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Re: Add Sort Drop Down to Product Listing?

Looking at the source of each page, it appears that the page being loaded to do the sorting is incorrect on the product listing.

I can't find how to set the proper page info.

Source from products all:

<div id="sorter"> <label for="disp-order-sorter">Sort by: </label> <form name="sorter_form" action="http://www.uniqueillumination.com/products_all.html" method="get"><input type="hidden" name="main_page" value="products_all" /> <select name="disp_order" onchange="this.form.submit();" id="disp-order-sorter">

Source from Product Listing(chandeliers page in this example):

<div id="sorter"> <label for="disp-order-sorter">Sort by: </label> <form name="sorter_form" action="http://www.uniqueillumination.com/" method="get"><input type="hidden" name="main_page" value="index" /> <select name="disp_order" onchange="this.form.submit();" id="disp-order-sorter">

As you can see, the action and value in the chandeliers page point to the index page instead of the chandelier product page.

-Hanz

1 Apr 2007, 5:24 PM
#5
jedward avatar

jedward

New Zenner

Join Date:
Feb 2007
Posts:
24
Plugin Contributions:
0

Re: Add Sort Drop Down to Product Listing?

Hanz... I want to do the same thing... How did you make it work finaly?

12 Jun 2007, 6:26 PM
#6
yongkoom avatar

yongkoom

New Zenner

Join Date:
May 2007
Location:
California
Posts:
30
Plugin Contributions:
0

Re: Add Sort Drop Down to Product Listing?

Yes... please do tell...

I have the same exact issue...

Sort option works great on All products, Special products, and New Products,

....BUT, I cannot for the life of me get it to work on product listing page :-(

Can any of you super Zenners shed some light here?

Regards!

27 Jun 2007, 11:00 AM
#7
bearaman avatar

bearaman

New Zenner

Join Date:
Jun 2006
Posts:
57
Plugin Contributions:
0

Re: Add Sort Drop Down to Product Listing?

Adding my call for this change. I would like to add the "All Products" listing sort dropdown to my Product Listing. Does anybody know how to do this?
Thanks,
Bearaman

31 Jul 2007, 7:53 PM
#8
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Add Sort Drop Down to Product Listing?

I will third that call... anyone that can help with this??

2 Apr 2008, 11:15 PM
#9
dave_nextexit avatar

dave_nextexit

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: Add Sort Drop Down to Product Listing?

I'm trying to figure this out too...is this possible?