Different content page per sub-category

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
softpac
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 33
Joined: Mon Oct 22, 2007 12:08 am
Location: Australia

Different content page per sub-category

Post by softpac » Tue Mar 25, 2008 10:52 pm

How do I get AC7 to display a different content page per category?

At the moment, if I assign a custom scriptlet content page for a category, all other category content pages change as well! Which means all categories now display the same content page!

For the drop down field Display Page, I have tried Category List, then SubCategory, but neither made any difference. The value in the Content drop down field remains the same for all categories, and if I change it on one, then all the rest are changed automatically.

Is this a bug, feature or corruption in my RC2 install?

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Post by m_plugables » Wed Mar 26, 2008 12:17 am

I think category specific pages are not supported currently. All categories share the same scriptlet.

softpac
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 33
Joined: Mon Oct 22, 2007 12:08 am
Location: Australia

Post by softpac » Wed Mar 26, 2008 2:50 am

That's a shame. This may end up being a show stopper for me. In my store, I have around 6 categories. I would like it when the user clicks on a category, for AC7 to display some information about the category plus the subcategories in the left side bar.

Then the user would click on a subcategory, and the products for that subcategory are then displayed in a grid. This part occurs, but not the first part as explained in the first paragraph.

softpac
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 33
Joined: Mon Oct 22, 2007 12:08 am
Location: Australia

Post by softpac » Wed Mar 26, 2008 3:11 am

Maybe the way I am trying to solve this is wrong. I just come across the edit category icon. When clicked it displays some fields. It looks like the Summary and Description fields is what I need to use.

However, I have entered some text in there, but they are not being displayed when a user navigates to the category.

How do I display Category Summary and Description?

softpac
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 33
Joined: Mon Oct 22, 2007 12:08 am
Location: Australia

Post by softpac » Wed Mar 26, 2008 3:35 am

I am on a roll tonight! Just worked out how to display the Category Summary and Description fields. Edit the scriptlet "Category List Page", and add "<p>$Category.Summary</p><p>$Category.Description</p>"

Naturally, you'll need to set the Display Page for all categories to "Category List" and Content drop down field to "Category List Page".

Oh yes, don't forget to enter some text into the Summary and Description fields for each of the categories, otherwise nothing will be displayed.

Now for every category the user clicks on, that category summary and description is displayed.

Hope this helps for those wanting to know!

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Post by m_plugables » Wed Mar 26, 2008 3:38 am

First edit the Category and provide the information like category description.
Then from Admin side go to Web site -> Themes and display pages
and for Category Display Page select option like CategoryGrid4.ascx

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Post by sohaib » Wed Mar 26, 2008 5:07 am

mazhar wrote:I think category specific pages are not supported currently. All categories share the same scriptlet.
Thats not right. Category specific pages can be defined in the Edit Mode.
When logged in as admin, open the category in the store template. In the edit section at the bottom select 'Edit Mode'. Select the Display Page for the current category from the drop down. Click 'Update Themes'.

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Post by sohaib » Wed Mar 26, 2008 8:20 am

You can also specify the 'Display Page' to be used for a particular category from 'Edit Category' page in merchant admin.

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Post by m_plugables » Wed Mar 26, 2008 11:31 pm

Wow, thanks for correction. I was misunderstanding the feature.

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re:

Post by aaronfrankel » Wed May 07, 2008 2:09 pm

softpac wrote:I am on a roll tonight! Just worked out how to display the Category Summary and Description fields. Edit the scriptlet "Category List Page", and add "<p>$Category.Summary</p><p>$Category.Description</p>"

Naturally, you'll need to set the Display Page for all categories to "Category List" and Content drop down field to "Category List Page".

Oh yes, don't forget to enter some text into the Summary and Description fields for each of the categories, otherwise nothing will be displayed.

Now for every category the user clicks on, that category summary and description is displayed.

Hope this helps for those wanting to know!
Sorry if this seems really basic, but I am used to PHP and not ASP. I added the code above to "CategoryGridPage.ascx" in an attempt to try to get the description to show up above the subCategory links and below the category header. However, it just prints that code to the page. In PHP I would have used <?php echo '<p>$Category.Summary</p><p>$Category.Description</p>' ?>, but I am lost in ASP.

softpac
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 33
Joined: Mon Oct 22, 2007 12:08 am
Location: Australia

Re: Different content page per sub-category

Post by softpac » Wed May 07, 2008 4:42 pm

I'm only a beginner myself too. But it sounds like you were editing the CategoryGridPage.ascx file directly. What I did was add the HTML code "<p>$Category.Summary</p><p>$Category.Description</p>" via the Admin Console.

My understanding is not to edit scriptlets directly with a text editor, but rather through the Admin Console screen. Login in as admin, click on the menu "Web Site" then sub menu item "Content and Layout". Scroll down to the scriptlet you wish to edit, click on its Edit icon (looks like a notepad to the right). When the scriptlet screen opens up, insert the above code into the "Content" field box. Then click save.

If you are saying you did do all this, and it still doesn't work - then I do not know what else to suggest. Hopefully someone else reading this can suggest something.

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Different content page per sub-category

Post by aaronfrankel » Wed May 07, 2008 5:34 pm

softpac wrote:I'm only a beginner myself too. But it sounds like you were editing the CategoryGridPage.ascx file directly. What I did was add the HTML code "<p>$Category.Summary</p><p>$Category.Description</p>" via the Admin Console.

My understanding is not to edit scriptlets directly with a text editor, but rather through the Admin Console screen. Login in as admin, click on the menu "Web Site" then sub menu item "Content and Layout". Scroll down to the scriptlet you wish to edit, click on its Edit icon (looks like a notepad to the right). When the scriptlet screen opens up, insert the above code into the "Content" field box. Then click save.

If you are saying you did do all this, and it still doesn't work - then I do not know what else to suggest. Hopefully someone else reading this can suggest something.
I will give it a try. However, the change requires this be done directly to the file to remove the subcat links and to properly position the text within the actual HTML structure.

<ADDED>It did work. However, as figured it added the description above the subCat URLS and the category Header. On another note I can see exactly where the code needs to be added to the CategoryGridPage.ascx file. I just don't know how to make it print.</ADDED>

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

Re: Different content page per sub-category

Post by jmestep » Wed May 07, 2008 6:58 pm

It can be done by copying code from another display page, like CategoryGridPage2.ascx:
<asp:PlaceHolder ID="CategoryDescriptionPanel" runat="server" EnableViewState="false">
<asp:Literal ID="CategoryDescription" runat="server" Text="" EnableViewState="false" />
<br /><br />
</asp:PlaceHolder>

and the corresponding section from CategoryGridPage4.ascx.cs
Caption.Text = _Category.Name;
if (!string.IsNullOrEmpty(_Category.Description))
{
CategoryDescriptionPanel.Visible = true;
CategoryDescription.Text = _Category.Description;
}
else CategoryDescriptionPanel.Visible = false;


Before you do that, you might want to see if that category display page will meet your needs to start with.
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

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Different content page per sub-category

Post by aaronfrankel » Wed May 07, 2008 7:00 pm

jmestep wrote:It can be done by copying code from another display page, like CategoryGridPage2.ascx:
<asp:PlaceHolder ID="CategoryDescriptionPanel" runat="server" EnableViewState="false">
<asp:Literal ID="CategoryDescription" runat="server" Text="" EnableViewState="false" />
<br /><br />
</asp:PlaceHolder>

and the corresponding section from CategoryGridPage4.ascx.cs
Caption.Text = _Category.Name;
if (!string.IsNullOrEmpty(_Category.Description))
{
CategoryDescriptionPanel.Visible = true;
CategoryDescription.Text = _Category.Description;
}
else CategoryDescriptionPanel.Visible = false;


Before you do that, you might want to see if that category display page will meet your needs to start with.
I will give this a whirl. Thanks!

I have already played with all the layouts. This one is closes to our needs.

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

Re: Different content page per sub-category

Post by Chris Hadden » Mon Mar 01, 2010 6:28 pm

Well it has been almost 2 years since the original post on this. I have come across this same issue. As you drill down into subcatagories each new page that appears should have different content to it. Seems like that should just be a standard feature but Ablecommerce does not seem to allow that, as far as I can tell. As softpac stated adding "<p>$Category.Description</p>" does allow the category description to be shown as content on the page.............I am wondering if 2 years later this is still the fix?

Thanks

Post Reply