Disignated CategoryGridPage below article.

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
jhmac
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Dec 02, 2010 10:02 am

Disignated CategoryGridPage below article.

Post by jhmac » Wed Feb 15, 2012 6:44 pm

Hello All
I have a question.
How would I create a CategoryGridPage that pulled up a designated sub-category. I want to create a page about a vendor and have a CategoryGridPage with the sub-category below the article. I want to call it with something like [[ConLib:Custom\CategoryGridPageSpecialVendor]] or something like that. Is this even possible?
thanks in advance.
jh

User avatar
david-ebt
Captain (CAPT)
Captain (CAPT)
Posts: 253
Joined: Fri Dec 31, 2010 10:12 am

Re: Disignated CategoryGridPage below article.

Post by david-ebt » Wed Feb 15, 2012 9:56 pm

Do you already have a category set up for this vendor with their products? If so, take a look at the .CS file for the CategoryGridPages you'll find a section of code beginning

Code: Select all

public int CategoryId
If you don't have the SearchSideBar active on your page, then this code uses the PageHelper.GetCategoryId() function which is in the app_code\PageHelper.cs file.

That function will look on the query string for CategoryId=#### where the #### is your category number. If you do have a category with this vendor's product already set up, you can browse to that category in admin and click on the preview button. It will give you the SEO-friendly URL.

Will that do what you want or do you need something more complex?
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

jhmac
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Dec 02, 2010 10:02 am

Re: Disignated CategoryGridPage below article.

Post by jhmac » Thu Feb 16, 2012 4:39 pm

Thanks for the help david.
I found the code you we talking about on the .cs file.
public int CategoryId
{
get
{
if(_SearchSidebar != null && _SearchSidebar.CategoryId > 0) return _SearchSidebar.CategoryId;
if (ViewState["CategoryId"] == null)
ViewState["CategoryId"] = PageHelper.GetCategoryId();
return (int)ViewState["CategoryId"];
}
set
{
ViewState["CategoryId"] = value;
}
}
I assume I do have the SearchSidebar active since it is being referenced in the code on the .ascx page
<%@ Register Src="~/ConLib/CategorySearchSidebar.ascx" TagName="CategorySearchSidebar" TagPrefix="uc" %>
where do i put the SEO-friendly url?

Can I have many categoryGridPages for all of the vendors I want to do articles on and just change the url for each sub-category I want to link to. I do not really want them to be linked in the sidebar, just from a "<a href="url"></a>" on the front page.
thanks again,
jh

User avatar
david-ebt
Captain (CAPT)
Captain (CAPT)
Posts: 253
Joined: Fri Dec 31, 2010 10:12 am

Re: Disignated CategoryGridPage below article.

Post by david-ebt » Fri Feb 17, 2012 10:50 am

If you're setting up categories to hold these vendors, you can create a new top level category called VENDORS and then create a new sub-category for each of your vendors. Just make the VENDORS category Hidden and it won't show up in your category tree. You will want the sub-categories to be Public.

While in the Browse Category area in admin, just click on the preview button for each vendor sub-category and you'll see the SEO-friendly URL.

What version of Able are you using?
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

Post Reply