Jump to content

Archived

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

sagitario

Produts sort by price

Recommended Posts

you could change it from the catalog\index.php

 

instead of

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

 

use this

 

	  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	if ($column_list[$i] == 'PRODUCT_LIST_PRICE') {
	   $listing_sql .= " order by p.products_price";
	  break;
	}
  }

Share this post


Link to post
Share on other sites

Thank enigma1 for the help. :thumbsup:

 

I try another way.

 

	  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	if ($column_list[$i] == 'PRODUCT_LIST_PRICE') {
	  $HTTP_GET_VARS['sort'] = $i+1 . 'a';
	  $listing_sql .= " order by p.products_price";
	  break;
	}
  }

 

This way the prices are sort by price and you can sort by name our something else. :D

Share this post


Link to post
Share on other sites

×