Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to sort product listings on category view in ascending order by price?


Johnny123

Recommended Posts

Okay, I know this question has been asked 100 times in these parts, but the only threads/info I can find related to my query is for an older version of oscommerce/no longer currently works.

 

I'm sure it's a very quick, easy fix so please someone put me out of my misery!

 

How to sort product listings on category view in ascending order by price?

 

all help greatly appreciated

thanks! :)

Link to comment
Share on other sites

Thanks for the reply, however unfortunately this doesn't do anything.

 

I also changed "d" and "desc" in the line below to "a" and "asc" but still no luck. Have reverted all changes (just so you/others know how my code currently stands).

 

Any further input would be great

 

thanks

Link to comment
Share on other sites

You would probably need to amend this as well:

 

if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
         $HTTP_GET_VARS['sort'] = $i+1 . 'a';
         $listing_sql .= " order by pd.products_name";
         break;
       }

 

Anyway, someone will no doubt be along to come up with the right solution. I'm not online now to be able to test it.

 

Perhaps;

 

if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
         $HTTP_GET_VARS['sort'] = $i+1 . 'a';
         $listing_sql .= " order by final_price";
         break;
       }

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...