how to show/hide categories
Posted: Tue Sep 30, 2008 2:30 pm
For specific url referrers to the ac7 site we want to show one category and its products and for anyone else a different category and is products. We changed the SimpleCategoryList.cs code thus:
if (HttpContext.Current.Request.UrlReferrer.ToString().Contains("http://localhost/testexchange") || HttpContext.Current.Request.UrlReferrer.ToString().Contains("http://www.exchangeonlinemall.com/defau ... =aafes.com"))
{
referrerCategoryId = 7;
}
else
referrerCategoryId = 8;
but this does not load any categories at all.
If we let it default to a value of zero then both categories show and we do not want that.
What am I doing wrong? Any help is appreciated. Once we have this working we can do the same for featured products, top sellers, etc. I hope!
if (HttpContext.Current.Request.UrlReferrer.ToString().Contains("http://localhost/testexchange") || HttpContext.Current.Request.UrlReferrer.ToString().Contains("http://www.exchangeonlinemall.com/defau ... =aafes.com"))
{
referrerCategoryId = 7;
}
else
referrerCategoryId = 8;
but this does not load any categories at all.
If we let it default to a value of zero then both categories show and we do not want that.
What am I doing wrong? Any help is appreciated. Once we have this working we can do the same for featured products, top sellers, etc. I hope!