question about category grid page

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Chris Hadden
Commander (CMDR)
Commander (CMDR)
Posts: 182
Joined: Tue Jan 27, 2009 2:29 pm

question about category grid page

Post by Chris Hadden » Mon Jul 30, 2012 8:17 pm

Under the "content" option I there are two options I like.

(Category grid page with category data) [[ConLib:CategoryGridPage4]]
(Category grid page with basket options) [[ConLib:CategoryGridPage3]]


I'd like to have both though, category data displayed AND the basket option. Seems reasonable, how could I do that?

Thanks
Chris

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: question about category grid page

Post by jmestep » Tue Jul 31, 2012 6:49 am

You would have to customize the page. CategoryGrid3 only displays products according to the datasource that is selected in the code. You would need to change that to use a catalognode datasource, then show the quantity box only for catalognodes that are products.l
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

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

Re: question about category grid page

Post by david-ebt » Tue Jul 31, 2012 8:40 am

Do you just want to add the category description to the category grid with basket? Try this. Add this code to the CategoryGridPage3.ascx page just above the placeholder for the SubCategoryPanel:

Code: Select all

<asp:PlaceHolder ID="CategoryDescriptionPanel" runat="server" EnableViewState="false">            
	<asp:Literal ID="CategoryDescription" runat="server" Text="" EnableViewState="false" />
	<br /><br />
</asp:PlaceHolder>
Then change the beginning of the BindPage function in the CategoryGridPage3.ascx.cs file to this:

Code: Select all

private void BindPage()
{
	CategoryBreadCrumbs1.Visible = DisplayBreadCrumbs;
	CategoryBreadCrumbs1.CategoryId = this.CategoryId;

	//BIND THE DISPLAY ELEMENTS
	if (IsValidCategory())
	{
		if (_Category != null)
		{
			Page.Title = _Category.Name;
			Caption.Text = _Category.Name;

			if (!string.IsNullOrEmpty(_Category.Description))
			{
				CategoryDescriptionPanel.Visible = true;
				CategoryDescription.Text = _Category.Description;
			}
			else CategoryDescriptionPanel.Visible = false;
		}
Just adding the few lines for the Description.

That will display the category description above the subcategory list. If that's not exactly what you want, hopefully it will put you on the right track.
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

Chris Hadden
Commander (CMDR)
Commander (CMDR)
Posts: 182
Joined: Tue Jan 27, 2009 2:29 pm

Re: question about category grid page

Post by Chris Hadden » Fri Aug 03, 2012 12:23 pm

Yes I am just trying to add the category description to the top of the categorygrid3.aspx

I tried changing the code as suggested. I have not gotten it to work yet. I am confused about something maybe someone can clear up. I didn't want to fool with the original file so I created CategoryCUSTOMGridPage3.ascx.cs and CategoryCUSTOMGridPage3.ascx.cs this is in the same conlib folder.

Do I now have to have a CUSTOMGirdPage3.aspx in the root folder to get it to work?

Also I was not certain whether the following line of code should stay

else
{
// IF IT IS ROOT CATEGORY
Page.Title = DefaultCaption;
Caption.Text = DefaultCaption;



I don't have a reference in the snipet of code to know whether I am deleting that or just inserting that code above it.

Thanks for your help

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

Re: question about category grid page

Post by david-ebt » Fri Aug 03, 2012 12:30 pm

You don't have to create a new CustomGridPage3.aspx unless you want to have two different category pages.

The normal convention is to NOT directly edit the Able-supplied files as you say. The convention is to copy the control files you want to customize into the CUSTOM folder. So you can keep the CategoryGridPage3 name. Then in the scriptlet for the content, change it from:

Code: Select all

[[ConLib:CategoryGridPage3 DisplayBreadCrumbs="false"]]
to

Code: Select all

[[ConLib:Custom\CategoryGridPage3 DisplayBreadCrumbs="false"]]
The code you ask about should probably stay. It's for setting the title for page and the header on the page.
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

Post Reply