View Single Post
  #66  
Old 08-06-2004, 05:50 PM
 
thegrail thegrail is offline
 

Newbie
  
Join Date: Jul 2004
Posts: 9
 

Default Category Position and Display Order

I upgraded from 4.0.0-4.0.1 without trouble, including some manual pathces. But I cannot seem to get the patch that fixes the category position bug to work. I patch manually and I just get a blank page. Maybe I'm not making the correct modifications. I've cut and pasted the whole block that I've changed. Can anyone see anything wrong. When I apply the patch as shown, the homepage won't come up. (Without the patch, the categories do not display in the correct Position Order.)

Also, while we're on the topic of Category Display Order, in the Admin, my Categories do not display in alphabetical order. Is there a fix for that as well?

Quote:
PATCH
http://forum.x-cart.com/viewtopic.php?p=52759#52759

Index: include/categories.php
================================================== =================
retrieving revision 1.64
diff -u -r1.64 categories.php
--- include/categories.phpб═ 12 Jul 2004 06:50:34 -0000б═ 1.64
+++ include/categories.phpб═ 19 Jul 2004 07:11:25 -0000
@@ -63,11 +63,13 @@
б═ б═ б═ б═ global $user_account;
б═ б═ б═ б═ $customer_search_condition = " AND avail='Y' AND (membership='".addslashes($user_account["membership"])."' OR membership='')";
б═ б═ б═ б═ $search_condition .= $customer_search_condition;
-б═ б═ б═ б═if ($flag == "all" || $flag == NULL)
+б═ б═ б═ б═if ($flag == "all")
б═ б═ б═ б═ б═ б═ $sort_condition = " ORDER BY category";
б═ б═ б═ б═ else
б═ б═ б═ б═ б═ б═ $sort_condition = " ORDER BY order_by, category";
б═ б═ }
+б═ б═elseif (defined('MANAGE_CATEGORIES'))
+б═ б═ б═ б═$sort_condition = " ORDER BY category, order_by";

б═ б═ if ($short_list)
б═ б═ б═ б═ $to_search = "categoryid,parentid,categoryid_path,category,prod uct_count,avail,order_by";


***
FROM:

global $user_account;
$customer_search_condition = " AND avail='Y' AND (membership='".addslashes($user_account["membership"])."' OR membership='')";
$search_condition .= $customer_search_condition;
if ($flag == "all" || $flag == NULL)
$sort_condition = " ORDER BY category";
else
$sort_condition = " ORDER BY order_by, category";
}

if ($short_list)
$to_search = "categoryid,parentid,categoryid_path,category,prod uct_count,avail,order_by";


***
TO:

global $user_account;
$customer_search_condition = " AND avail='Y' AND (membership='".addslashes($user_account["membership"])."' OR membership='')";
$search_condition .= $customer_search_condition;
if ($flag == "all")
$sort_condition = " ORDER BY category";
else
$sort_condition = " ORDER BY order_by, category";
}
б═ б═elseif (defined('MANAGE_CATEGORIES'))
б═ б═ б═ б═ $sort_condition = " ORDER BY category, order_by";

if ($short_list)
$to_search = "categoryid,parentid,categoryid_path,category,prod uct_count,avail,order_by";
__________________
Chuck
x-Cart v. 4.0.1
mySQL 4.0.20
php-4.3.7
Solaris OS 9
Apache 2.0.50
Reply With Quote