Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sort order of New Products


rockpretty

Recommended Posts

Posted

dont you have order by p.products_date_added DESC

 

if you want to add a max age:

 

$date = strtotime("-60 days"); // set max age of displayed product

$date = strftime("%Y-%m-%d",$date);

 

p.products_date_added > '".$date."' and

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Sorry, really analog here. Where do I find how I've got it sorted?

What is the page name that I would correct the age on?

 

Thanks

 

dont you have order by p.products_date_added DESC

 

if you want to add a max age:

 

$date = strtotime("-60 days"); // set max age of displayed product

$date = strftime("%Y-%m-%d",$date);

 

p.products_date_added > '".$date."' and

Posted

look in catalog/products_new.php

 

for something like

 

<?php
 $products_new_array = array();

 $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name";
 $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

 if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>

 

or for just "order by p.products_date_added" after it it should be DESC

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...