| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Sorting Products alphabetically | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Sorting Products alphabetically
Hello,
Is there a way of sorting subcategories and products alphabetically by Subcategory or Product Name (rather than by Subcategory or Product ID)? We have a lot of subcategories that use manufacters names, and sorting the products by the invisible Product ID really doesn't make much sense... Thanks for any help, Gil |
|||||||
#2
|
|||||||
|
|||||||
I was able to do this for searches, but have not figured out how to do it with the catagory views.
For searches you just change the only GROUP BY in search.php. I tried changing the "group by" in config.php, but it didn't fix the problem and I haven't seen what effect it did have. |
|||||||
#3
|
|||||||
|
|||||||
Hi Ryan,
Yeah, I could fix it for the search as well which, as you said, was pretty easy. However, subcategories and products seem to be a lot harder to sort. Well, if I should find a fix I'll post it here. Thanks again, Gil |
|||||||
#4
|
|||||||
|
|||||||
I had the same problem, and ended up deleting the items, and re-importing them in the order I wanted them to appear. They seem to be sorted by their product_code.
Martin |
|||||||
#5
|
|||||||
|
|||||||
|
|||||||
#6
|
|||||||
|
|||||||
It certainly does help! Thank you. I see the point. I have not modified any of the php files before. I am using a PC. Can I move the file to my PC, edit the text with a text editor, and ftp it right back? Won't I mess something else up?
Martin |
|||||||
#7
|
|||||||
|
|||||||
Hi martinp,
You should have no problem editing the file on a pc. I am on a pc and use Wordpad to edit the php files. Just remember to upload in ASCII mode rather than binary mode when re-uploading the file.That should do it! ATKOgirl |
|||||||
#8
|
|||||||
|
|||||||
I do not see the line that tkogirl changed. I looked in my product.php file and all I came up with was this:
$search_query = "($sql_tbl[products].categoryid='$cat' or $sql_tbl[products].categoryid1='$cat' or $sql_tbl[products].categoryid2='$cat' or $sql_tbl[products].categoryid3='$cat') and $sql_tbl[products].forsale='Y'"; $total_products_in_search = $current_category["product_count"]; $products = func_search_products($search_query, !empty($user_account['membership'])?$user_account['membership']:"", $first_page,$current_category["product_count"]); if (count($products) ==0) $products=""; if(!empty($active_modules["Subscriptions"])) { include $xcart_dir."/modules/Subscriptions/subscription.php"; } $smarty->assign("products",$products); $smarty->assign("navigation_script","home.php?cat=$cat") ; ?> Is this similar code to what you changed? and what version xcart are you using?
__________________
X-Cart Gold 4.1.3 |
|||||||
|
|||
X-Cart forums © 2001-2020
|