Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 7 of 7

Thread: Category Display

  1. #1
    colin is offline Junior Member
    Join Date
    Feb 2008
    Posts
    7

    Default Category Display

    Hi,

    Is there a 'built in' xml package and/or 'link' that will display all of the main categories? (Just like how the 'Products' are displayed when you go to a category landing page).

    Thanks,
    Colin

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    No there isn't, but it's a very simple modification to create one

    First, copy the manufacturers.aspx and manufacturers.aspx.cs files, and paste them back into the same directory with names of categories.aspx and categories.aspx.cs


    Next open the new categories.aspx file and change line 1 from
    Code:
    <%@ Page language="c#" Inherits="AspDotNetStorefront.manufacturers" CodeFile="manufacturers.aspx.cs" EnableEventValidation="false"%>
    to
    Code:
    <%@ Page language="c#" Inherits="AspDotNetStorefront.categories" CodeFile="categories.aspx.cs" EnableEventValidation="false"%>

    Then, change line 6 from
    Code:
    <aspdnsf:XmlPackage id="Package1" PackageName="entity.manufacturers.xml.config" runat="server" EnforceDisclaimer="true" EnforcePassword="true" EnforceSubscription="true" AllowSEPropogation="true" RuntimeParams="entity=Manufacturer"/>
    to
    Code:
    <aspdnsf:XmlPackage id="Package1" PackageName="entity.manufacturers.xml.config" runat="server" EnforceDisclaimer="true" EnforcePassword="true" EnforceSubscription="true" AllowSEPropogation="true" RuntimeParams="entity=Category"/>

    Then open your new categories.aspx.cs page and change line 14 from
    Code:
    public partial class manufacturers : SkinBase
    to
    Code:
    public partial class categories : SkinBase

    This last step is optional, but you can open the skins/skin_#/menudata.xml file and change
    Code:
    <item Text="(!menu.Categories!)" LookId="TopItemLook" />
    to
    Code:
    <item Text="(!menu.Categories!)" NavigateUrl="categories.aspx" LookId="TopItemLook" />
    If you followed the last optional step, your top navigation menu will now allow you to click on the "Categories" menu item and it will redirect you to the new categories.aspx page that you just created...just like the "Manufacturers" menu item does. Alternatively you can place a link anywhere in your skin to the categories.aspx page to navigate to it as well.

    A very simple mod that doesn't even require you to customize or create a new xmlpackage...this mod uses the same package that manufacturers.aspx uses
    Last edited by George the Great; 02-12-2008 at 08:08 PM. Reason: late night typos :)
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    ASPDNSF Staff - Buddy is offline Banned
    Join Date
    Jul 2005
    Posts
    378

    Default

    Actually there is a package that already does this, it's the entity.rootlevel.xml.config package. You might have to make a few tweaks to it to work for you but it's pretty much what you're asking for. You can run it standalone by executing it with the URL e-entity.rootlevel.aspx (or with a custom name that you choose after making the below modifications). You'd need to modify it a little to get it to work though. Add the allowengine attribute to the package element:

    Code:
        <package version="2.1" displayname="Entity Root Level Grid" debug="false" includeentityhelper="true" allowengine="true">
    Then you'll need to change this:

    Code:
    <xsl:param name="EntityName"><xsl:value-of select="/root/Runtime/EntityName" /></xsl:param>
    to this

    Code:
    <xsl:param name="EntityName"><xsl:value-of select="/root/Querystring/entityname" /></xsl:param>

    Then call the url passing a querystring named entityname set to the entity that you are interested in (i.e. Category, Department, Manufacturer, etc.)

  4. #4
    colin is offline Junior Member
    Join Date
    Feb 2008
    Posts
    7

    Default

    Perfect. I can display all categories now. That was simple and harmless

    Thanks a lot guys,
    Colin

  5. #5
    landrstudios is offline Junior Member
    Join Date
    Jun 2008
    Posts
    9

    Default Adding a "summary" to categories.aspx?

    Is there a way to add a "summary" section to the categories.aspx so that I can get in a header area similar to a regular category page?

  6. #6
    ASPDNSF Staff - Buddy is offline Banned
    Join Date
    Jul 2005
    Posts
    378

    Default

    You can use the Summary field in the entity you're interested in and display it at the top of your package.

  7. #7
    jamiee is offline Junior Member
    Join Date
    Mar 2009
    Posts
    3

    Arrow A step further

    Is there a way to take this a step further & use this for a sub-category?

    I have it showing my 3 main categories:

    - All Watches
    - Collections
    - Strap Colour

    What I would like to show is all the categories within Collections.

    Any ideas?
    Thanks
    Jamie