Forums / Built-in Shipping and Payment Modules / New products shows newest first - how?

New products shows newest first - how?

Started by aditya369 on 8 Dec 2011, 9:20 AM · Views: 1,023

Results 1 to 2 of 2
8 Dec 2011, 9:20 AM
#1
aditya369 avatar

aditya369

New Zenner

Join Date:
Oct 2011
Posts:
36
Plugin Contributions:
0

New products shows newest first - how?

Hello all,

I would like to display products in all the categories and sub categories from newest first to oldest... and this should be by default. Can anyone help me how to do this?

Many Thanks,
Aditya

8 Dec 2011, 2:19 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: New products shows newest first - how?

You could customize the file:
/includes/index_filters/default_filters.php

and find this section of code around line 102:

// sort by products_sort_order when PRODUCT_LISTING_DEFAULT_SORT_ORDER is left blank
// for reverse, descending order use:
//       $listing_sql .= " order by p.products_sort_order desc, pd.products_name";
          $listing_sql .= " order by p.products_sort_order, pd.products_name";

customize the way you want the order by to be when it has been set to blank ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!