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: Listing subcategories

  1. #1
    flyingpenguin is offline Junior Member
    Join Date
    Jun 2009
    Posts
    10

    Default Listing subcategories

    Here is a rather dumb question...how can I list all the subcategories for a single category.

    For instance...if I have a category A, that has subcategories 1 - 5, I would like to list them out like so.

    A
    • 1
    • 2
    • 3
    • 4
    • 5


    I would also like each subcategory name to be a link that would take me to all the products in that subcategory.

    Thanks,
    David

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

    Default

    Are you trying to develop a custom list, or modify an existing xmlpackage, or something else? What version of AspDotNetStorefront are you running? Do you have source code? There are a few different ways that you could go about doing this depending on where you want to make the list available, if it has to be dynamic, and how you want to implement...
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    flyingpenguin is offline Junior Member
    Join Date
    Jun 2009
    Posts
    10

    Default

    I have the latest version 8.0.1.2 I think.

    I have the source code.

    I just want to get the output I want...if I need to create an xmlpackage, that is cool. Personally I am most comfortable in code, but whatever is easiest.

    I figured there would be something easy like call a method that takes in the parameter of the category id and it gives me back a list of subcategories that I could then deal with...no idea how stuff works under the covers.

    David

  4. #4
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Well, the simple way of putting this is to automatically expand the left nav category list by commenting out the following lines on the rev.categories.xml.config under {root}/skins/Skin_#

    Code:
    <xsl:if test="count(child::Entity)&gt;0 and (EntityID = $CategoryID or descendant::Entity/EntityID = $CategoryID) and count(child::Product)&gt;0"> and its ending delimiter </xsl:if>
    and then changing the Unicode character from the :
    Code:
    <span class="catMark">&gt;&gt;</span>*
    by changing the value of the highlighted item to whatever character you want, for example:
    Code:
    <span class="catMark">& # 6 7 8</span> (white spaces was used to avoid unicode translation)*
    Last edited by Jao; 08-06-2009 at 09:19 AM.

  5. #5
    flyingpenguin is offline Junior Member
    Join Date
    Jun 2009
    Posts
    10

    Default

    Great, so if I make the changes, how do I utilize the xml package on my home page template?

  6. #6
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    The template.ascx is already calling the rev.categories.xml.config; therefore, your home page is utilizing it, that is if you haven't changed the template.ascx file.

  7. #7
    kaezr is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    Running AspDotNetStorefront ML 8.0.1.4