Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / adding a sort order drop down on my site

adding a sort order drop down on my site

Views: 1,384

Results 1 to 8 of 8
5 Jan 2011, 12:55 PM
#1
mrtwelvevolts avatar

mrtwelvevolts

New Zenner

Join Date:
Jan 2011
Posts:
24
Plugin Contributions:
0

adding a sort order drop down on my site

I am new to Zencart and PHP and thanks to these forums i have managed to build a great looking site.

My question is i want to add a drop down sorter to all my product pages to sort by price hi to low and low to hi and i have no clue what to do ....I have searched the web for hours trying to do this with no answer..

Thanks in advance

6 Jan 2011, 2:23 PM
#2
mrtwelvevolts avatar

mrtwelvevolts

New Zenner

Join Date:
Jan 2011
Posts:
24
Plugin Contributions:
0

Re: adding a sort order drop down on my site

Never mind I got it. Thanks anyways

6 Jan 2011, 2:30 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: adding a sort order drop down on my site

What was the solution that worked for you? :smile:

6 Jan 2011, 7:34 PM
#4
mrtwelvevolts avatar

mrtwelvevolts

New Zenner

Join Date:
Jan 2011
Posts:
24
Plugin Contributions:
0

Re: adding a sort order drop down on my site

I added this to line 16 of template/includes/tpl_products_all_dafault

<?php /** * display the product order dropdown */ require($template->get_template_dir('/tpl_modules_listing_display_order.php' ,DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_listing_display_order.php'); ?>
6 Jan 2011, 10:16 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: adding a sort order drop down on my site

I see ... you added in code to fix something that perhaps your template has broken as that drop down is already in the Products All on the default Zen Cart ...

I thought you meant you added that drop down on the Product Listings ...

Thanks for the update ... that will help others who need it too ... :smile:

7 Jan 2011, 1:01 PM
#6
mrtwelvevolts avatar

mrtwelvevolts

New Zenner

Join Date:
Jan 2011
Posts:
24
Plugin Contributions:
0

Re: adding a sort order drop down on my site

ya it was some crap monster template! waste of money! I have to use a template for now just to learn the basics. I switched back to the oem Zen cart template this morning for the hell of it and WOW everything i was having problems with worked. I am going to continue modifying the default template and use it as my store until i fully understand the basics of PHP then convert/rebuild my site when i am more comfortable.

I found this on here and don't quite understand the instructions that well, ya think you could explain to a noob?

"If you run an upgrade, changes to the classic template will automatically be wiped out. The way to preserve your changes would be to copy all /classic/ folders with their files to /your_template/ folders in parallel with the classic ones. Then follow the template instructions in the FAQ, including editing the template_info.php and turning the template on in admin. Now your changes are safe."

Thanks

7 Jan 2011, 11:46 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: adding a sort order drop down on my site

The templates and overrides are designed to save you from having your customizations overwritten by an upgrade, in the bulk of the files that get changed ...

This also allows you to switch back to the Classic Template, as it is the default that comes with Zen Cart, to see if the site works in a "normal" state or not ...

While there are some files that do not have templates and overrides, the bulk of all files do ...

There is more information in the Tutorials/FAQs, Wiki and on the Forums about templates and overrides ...

8 Jan 2011, 7:04 PM
#8
mrtwelvevolts avatar

mrtwelvevolts

New Zenner

Join Date:
Jan 2011
Posts:
24
Plugin Contributions:
0

Re: adding a sort order drop down on my site

Default Re: I want my website of full screen width
That's great, but now you're modifying the 'classic' template, and those files (and your changes) will be overwritten the next time you upgarde Zencart to a new version.

You really want to do this:

https://www.zen-cart.com/tutorials/index.php?article=142

then study this:

https://www.zen-cart.com/tutorials/index.php?article=36