http://www.gottagreatgift.com/
How can I get my whats new page or my whats new category to list the products by the date it was added not by alphabetically.
http://www.gottagreatgift.com/
How can I get my whats new page or my whats new category to list the products by the date it was added not by alphabetically.
Configuration/New Listing/Display Product Display - Default Sort Order
You appear to be using a Category for your New Products so it is using the setting for the Product Listing ...
However, you are trying to make 1 Category use a different default sort order than all of the others ...
The Product Listing is not designed for a sort order by date, without customizing the code ...
To then make it so 1 Category sorts one way, and all other categories sort another way would require further customization ...
There is a New Products page that you could use where you can set the Sort Order separate from the Categories in the Product Listing ...
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: v1.5.5]
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!
One thing you could do is if you are sorting, for example, your Product Listing by Product Name, you could customize the file:
/includes/index_filters/default_filter.php
and change the code around line 120 to read:
and that would make that one category for category 210, where that is the products master_categories_id sort first by date then by name ...Code:case 'PRODUCT_LIST_NAME': if ($current_category_id == 210) { $listing_sql .= " order by p.products_date_added, pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); } else { $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); }
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: v1.5.5]
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!
this is what I have added but nothing has changed
// if set to nothing use products_sort_order and PRODUCTS_LIST_NAME is off
if (PRODUCT_LISTING_DEFAULT_SORT_ORDER == '') {
$_GET['sort'] = '20a';
}
} else {
$sort_col = substr($_GET['sort'], 0 , 1);
$sort_order = substr($_GET['sort'], 1);
$listing_sql .= ' order by ';
switch ($column_list[$sort_col-1]) {
case 'PRODUCT_LIST_MODEL':
$listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_NAME':
if ($current_category_id == 210) {
$listing_sql .= " order by p.products_date_added, pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
} else {
$listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
}
break;
case 'PRODUCT_LIST_MANUFACTURER':
$listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_QUANTITY':
$listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_IMAGE':
$listing_sql .= "pd.products_name";
break;
case 'PRODUCT_LIST_WEIGHT':
$listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_PRICE':
// $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
$listing_sql .= "p.products_price_sorter " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
}
}
}
What is the setting on your Product Listing for the Sort Order? Is it set for the Product Name?
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: v1.5.5]
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!
where would I find that
the Display Product Listing Default Sort Order is blank
I do not use the add on that you are but look to see what the settings are for the fields that you have turned on ...
What is Product Name set to?
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: v1.5.5]
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!
Display Product Name is set to 2
Try setting the Sort Order to 2a and see what happens ...
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: v1.5.5]
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!
Bookmarks