Category Grid with Basket Options - add description

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

Category Grid with Basket Options - add description

Post by Chris Hadden » Wed Sep 18, 2013 8:07 pm

I use the Category Grid with Basket Options when showing any product. Is there a way to alter the [[ConLib:CategoryGridPage3]] to include the "description" above.... same as shown using "Category Grid with Category Data" ? I suppose I could make an individual scriptlet for each page but seems more complex then it should be..

Thanks

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

Re: Category Grid with Basket Options - add description

Post by jmestep » Thu Sep 19, 2013 5:50 am

You can do that- just take whatever display code is showing the description from the other page and put code from both ascx and cs files into the category grid 3
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

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

Re: Category Grid with Basket Options - add description

Post by Chris Hadden » Thu Sep 19, 2013 8:38 am

Ok well I opened those files in category grid 4. To try and see if I could find the relevant code.... The problem is I am not a code guy so I am not sure where stuff starts and ends. the cs file contains this which looks like it might be it but not sure what is supposed to be included and what not:

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;
}
else
{
// IF IT IS ROOT CATEGORY
Page.Title = DefaultCaption;
Caption.Text = DefaultCaption;
CategoryDescriptionPanel.Visible = false;
}
}
else
{
CategoryHeaderPanel.Visible = false;
}
BindSearchResultsPanel();



The ascx seems like this would be it ??




<asp:PlaceHolder ID="CategoryDescriptionPanel" runat="server" EnableViewState="false">
<asp:Literal ID="CategoryDescription" runat="server" Text="" EnableViewState="false" />
<br /><br />
</asp:PlaceHolder>


Can anyone offer guidence on what exactley I place into the category grid 3 to get the description to show?? Thanks

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

Re: Category Grid with Basket Options - add description

Post by jmestep » Fri Sep 20, 2013 4:21 am

You would put this code into the code behind in the BindPage() event

Code: Select all

if (!string.IsNullOrEmpty(_Category.Description))
{
CategoryDescriptionPanel.Visible = true;
CategoryDescription.Text = _Category.Description;
}
else CategoryDescriptionPanel.Visible = false;
Then in the markup (.ascx file) you would put this wherever you want the description to show

Code: Select all

<asp:PlaceHolder ID="CategoryDescriptionPanel" runat="server" EnableViewState="false">            
	        <asp:Literal ID="CategoryDescription" runat="server" Text="" EnableViewState="false" />
	        <br /><br />
        </asp:PlaceHolder>
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

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

Re: Category Grid with Basket Options - add description

Post by Chris Hadden » Fri Sep 20, 2013 10:28 am

That worked perfectly, thanks for your help on this. Chris

Post Reply