Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How TO Order Products List By Field

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:14 AM.

   

 
X-Cart forums © 2001-2020