I am writing an shopping cart in CS2002 FP1 and I don't want my
subcategories to show up below any main category if no products exists
within those subcategories,
The only ways I've thought of is to do one of two things:
1) CS SQL stored procedure change (the one that GetChildCategories
calls). This change would involve doing an inner join with the
corresponding products for each category.
2) modify DataSet (used to bind to DataList for displaying categories
on the web site) to remove category row after call function to find out
if each subcategory has no products.
Solution 1 would be more risky (changing a complicated stored
procedure) but less time costly on the server. Soution 2 would be less
risky but more taxing on the server (calling GetProducts for each
subcategory). Does anyone have any other solutions or would recommend
which solution I should take?