Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with products_new.php


Guest

Recommended Posts

I am new to all this, and i need to change products_new.php to got in ascending order of products_id instead of descending order.

 

i changed the sql query:

 

$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_id ASC";

$products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

 

to be ASC instead of DESC, but this hasn't worked.

 

can anyone please help

Link to comment
Share on other sites

Thanks for advice i tried removing the ASC, but it didn't work.

 

if i order by order by p.products_date_added if i added the products on the same date how would that work?

 

i did try changing the ordering to p.products_id, but still no luck.

 

I have no clue why it doesn't work, you would think if i changed the Sql statment to order products_id in ascending or descending order it would work.

 

I am looking at the correct php file, for the box in the middle which states new products for the month? which is located in produtcs_new.php.

 

Cheers

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...