fixes to products
diff --git a/erpnext/website/js/product_category.js b/erpnext/website/js/product_category.js
index 04b7e71..5296029 100644
--- a/erpnext/website/js/product_category.js
+++ b/erpnext/website/js/product_category.js
@@ -5,12 +5,13 @@
 	wrapper.category_list = new wn.widgets.Listing({
 		parent: $(wrapper).find('.web-side-section').get(0),
 		query: 'select label, count(t2.name) as items, t1.item_group \
-			from `tabProduct Group` t1, `tabItem` t2\
+			from `tabProduct Group` t1, `tabProduct` t2, tabItem t3\
 			where t1.parent="Products Settings" \
-			and t2.item_group = t1.item_group \
-			and ifnull(t2.show_in_website, 0)=1 \
-			group by t2.item_group \
-			order by t1.idx desc',
+			and t2.item = t3.name \
+			and t3.item_group = t1.item_group \
+			and ifnull(t2.published, 0)=1 \
+			group by t1.item_group \
+			order by t1.idx',
 		hide_refresh: true,
 		render_row: function(parent, data) {
 			parent.innerHTML = repl('<a href="#!products/%(label)s">%(label)s</a> (%(items)s)', 
diff --git a/erpnext/website/page/products/products.js b/erpnext/website/page/products/products.js
index 0e7dec5..f61979b 100644
--- a/erpnext/website/page/products/products.js
+++ b/erpnext/website/page/products/products.js
@@ -54,6 +54,7 @@
 				t1.page_name, t1.short_description \
 				from tabProduct t1, tabItem t2 \
 				where t1.item = t2.name \
+				and ifnull(t1.published,0)=1 \
 				and t2.item_group="%(cat)s" \
 				and t1.short_description like "%%(searchstr)s%"', args)
 		},
@@ -63,7 +64,7 @@
 				<div style="float:left; width: 400px">\
 					<b><a href="#!%(page_name)s">%(title)s</a></b>\
 					<p>%(short_description)s</p></div>\
-				<div style="clear: both; margin-bottom: 7px;"></div>', data);
+				<div style="clear: both; margin-bottom: 15px; border-bottom: 1px solid #AAA"></div>', data);
 		}
 	});
 	
@@ -81,4 +82,4 @@
 	
 	$(wrapper).find('h1').html(cat.label);
 	wrapper.mainlist.run();
-}
\ No newline at end of file
+}