View Single Post
  #21  
Old 01-27-2004, 04:24 PM
 
spidey spidey is offline
 

Member
  
Join Date: Aug 2003
Location: Montreal, Canada
Posts: 11
 

Default

Hey everyone,

I managed to get a sort working by Price and by Product (can be further applied for any other product fields), along the lines that this original thread was going towards (i.e. A "Sort By" link at the top of the product listings).

Did the following:

1) Made the changes in navigation.tpl and products.tpl (basically adding the code so that $orderby variable can be passed back and forth), according to what funkydunk mentioned earlier in this thread

2) DID NOT MODIFY func.php at all... Instead, modified products.php to:
Code:
$products = func_search_products($search_query, !empty($user_account['membership'])?$user_account['membership']:"", $first_page,$current_category["product_count"],0,$orderby);

The sorting is then not only limited to price, but whatever variables you would like to add to products.tpl for sorting... Hope this works for everyone!
__________________
X-Cart Version: 3.5.2 | PHP version: 4.3.4 | MySQL version: 4.0.15
Bluewave Multimedia - Web Development Outsourcing
-- \"The sweet is never as sweet, without the sour.\"
Reply With Quote