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 6 of 6

Thread: Manufacturer Filter by Current Category

  1. #1
    tonya is offline Junior Member
    Join Date
    Sep 2011
    Posts
    22

    Default Manufacturer Filter by Current Category

    I am needing/wanting to add a Manufacturer filter to our left-nav that will display ONLY the manufacturers with products that are in the current category. I have found how to display all manufacturers but not just the ones for the active category. This is essentially to be used as a "pre-filter" for the first level of our Category system then on the next level the user will be able to filter based on additional criteria.

    I am using ASPDNSF 8 and Channel Advisor. I do not have access to source code. I am limited to XML packages via skinning.

    Any assistance will be appreciated.

    I will be happy to upload the modified xml package that I am working with and referencing from yet another package if needed. However, the current method seems a bit convoluted.

    Thank you in advance,
    ~Tonya

  2. #2
    mmcgeachy is offline Senior Member
    Join Date
    Sep 2008
    Posts
    174

    Default

    I don't know how much control you have so for now I will just give an example as to how to display results from a based off the ManufacturerID and CategoryID. This xmlpackage is assuming the view link would be something like http://site/c-1-catagory.aspx?ManID=1. Which is just adding query string with a ManufacturerID in it. The xmlpackage I have in mind is this:
    C#/VB.NET Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="Entity Grid" debug="false" includeentityhelper="true">

        <!-- ###################################################################################################### -->
        <!-- Copyright AspDotNetStorefront.com, 1995-2009.  All Rights Reserved.                                    -->
        <!-- http://www.aspdotnetstorefront.com                                                                        -->
        <!-- For details on this license please visit  the product homepage at the URL above.                        -->
        <!-- THE ABOVE NOTICE MUST REMAIN INTACT.                                                                   -->
        <!--                                                                                                        -->
        <!-- ###################################################################################################### -->


        <query name="Products" rowElementName="Product">
            <sql>
                <![CDATA[
                SELECT Product.Name, Product.ProductID, Product.SKU, ProductVariant.VariantID, Product.HidePriceUntilCart, ProductVariant.Price, 
                          isnull(ProductVariant.SalePrice,0) SalePrice,ProductVariant.Points,Product.TaxClassID
                FROM Product  with (nolock)
                INNER JOIN  ProductVariant ON ProductVariant.ProductID = Product.ProductID 
                INNER JOIN  ProductCategory ON ProductCategory.ProductID = Product.ProductID
          INNER JOIN  ProductManufacturer ON ProductManufacturer.ProductID = Product.ProductID
                WHERE (ProductManufacturer.ManufacturerID = @ManID)    AND (ProductCategory.CategoryID = @CatID)
                ]]>
            </sql>        
        <queryparam paramname="@ManID" paramtype="request" requestparamname="ManID" sqlDataType="int" defvalue="0" validationpattern="" />
        <queryparam paramname="@CatID" paramtype="runtime" requestparamname="CatID" sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>


        <PackageTransform>
        
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                            xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
              <xsl:output method="html" omit-xml-declaration="yes" />

                <xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
                <xsl:param name="WebConfigLocaleSetting" select="/root/Runtime/WebConfigLocaleSetting" />
                <xsl:param name="ShowSubcatsInGrid"><xsl:value-of select="aspdnsf:AppConfig('ShowSubcatsInGrid')" /></xsl:param>
                <xsl:param name="SubcatGridCols"><xsl:value-of select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/ColWidth" /></xsl:param>
                <xsl:param name="EntityName"><xsl:value-of select="/root/Runtime/EntityName" /></xsl:param>
                <xsl:param name="EntityID"><xsl:value-of select="/root/Runtime/EntityID" /></xsl:param>
                <xsl:param name="WholesaleOnlySite"><xsl:value-of select="aspdnsf:AppConfigBool('WholesaleOnlySite')"/></xsl:param>

                <xsl:param name="BaseURL">
                    <xsl:choose>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'category'">c-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'section'">s-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'manufacturer'">m-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'library'">l-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                    </xsl:choose>
                </xsl:param>

                <xsl:param name="CurrentPage">
                    <xsl:choose>
                        <xsl:when test="/root/QueryString/pagenum"><xsl:value-of select="/root/QueryString/pagenum" /></xsl:when>
                        <xsl:otherwise>1</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>



                <xsl:template match="/">
                    <div>
                    <xsl:value-of select="aspdnsf:EntityPageHeaderDescription($EntityName, $EntityID)" disable-output-escaping="yes" />
                    </div>
                    <xsl:value-of select="aspdnsf:EntityPageFilterOptions($EntityName, $EntityID, /root/Runtime/SecID, /root/Runtime/CatID, /root/Runtime/ManID, /root/Runtime/ProductTypeFilterID)" disable-output-escaping="yes" />

                    <xsl:call-template name="SubEntity" />
                    <xsl:choose>
                        <xsl:when test="count(/root/Products/Product) = 0 and count(/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/Entity) = 0">
                            <xsl:value-of select="aspdnsf:Topic(concat('empty', /root/Runtime/EntityName, 'text'))" disable-output-escaping="yes" />
                        </xsl:when>
                        <xsl:otherwise>
                                    <div style="text-align:right;"><xsl:value-of select="aspdnsf:PagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /></div>
                                    <table border="0" cellpadding="0" cellspacing="4" width="100%">
                                        <xsl:apply-templates select="/root/Products/Product" />
                                    </table>
                                    <div style="text-align:right;"><xsl:value-of select="aspdnsf:PagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /></div>
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>



                <xsl:template name="SubEntity">
                    <xsl:variable name="delta">
                        <xsl:choose>
                            <xsl:when test="(count(/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[ParentEntityID=/root/Runtime/EntityID]) mod number($SubcatGridCols)) = 0">0</xsl:when>
                            <xsl:otherwise>
                                <xsl:value-of select="number($SubcatGridCols)-(count(/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[ParentEntityID=/root/Runtime/EntityID]) mod number($SubcatGridCols))"/>
                            </xsl:otherwise>
                        </xsl:choose>
                    </xsl:variable>
                    <xsl:variable name="rows" select="ceiling(count(/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[ParentEntityID=/root/Runtime/EntityID]) div number($SubcatGridCols))" />

                    <xsl:for-each select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[ParentEntityID=/root/Runtime/EntityID]">

                        <xsl:variable name="entityposition" select="position()" />


                        <xsl:choose>
                            <xsl:when test="$ShowSubcatsInGrid = 'true'">
                                <xsl:if test="position() mod $SubcatGridCols = 1 or ($SubcatGridCols = 1)">
                                    <table border="0" cellpadding="0" cellspacing="4" width="100%">
                                        <tr>
                                            <xsl:for-each select=". | following-sibling::*[position() &lt; $SubcatGridCols]">
                                                <xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)"></xsl:variable>
                                                 
                                                <xsl:call-template name="SubCatCell">
                                                    <xsl:with-param name="scName" select="$scName" />
                                                </xsl:call-template>

                                            </xsl:for-each>
                                            <xsl:if test="ceiling($entityposition div  number($SubcatGridCols)) = $rows and $delta &gt; 0">
                                                <xsl:call-template name="FillerCells">
                                                    <xsl:with-param name="cellCount" select="$delta" />
                                                </xsl:call-template>
                                            </xsl:if>

                                        </tr>
                                        <tr>
                                            <td height="10" colspan="{$SubcatGridCols}"> </td>
                                        </tr>
                                    </table>
                                </xsl:if>
                            </xsl:when>
                            <xsl:otherwise>
                                <xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)"></xsl:variable>

                                <p align="left">
                                       <img border="0" src="{concat('skins/skin_', aspdnsf:SkinID(), '/images/redarrow.gif')}"></img> 
                                    <a href="{aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')}">
                                        <xsl:value-of select="$scName" disable-output-escaping="yes"/>
                                    </a>
                                </p>
                            </xsl:otherwise>
                        </xsl:choose>
                    </xsl:for-each>
                </xsl:template>
                

                <xsl:template name="SubCatCell">
                    <xsl:param name="scName"></xsl:param>
                    <xsl:param name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="$pSEAltText=''"><xsl:value-of select="$scName" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="$pSEAltText" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>


                    <xsl:param name="URL"><xsl:value-of select="aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')" /></xsl:param>

                    <td align="center" width="{concat(round(100 div number($SubcatGridCols)),'%')}">
                        <a href="{$URL}">
                            <xsl:value-of select="aspdnsf:LookupEntityImage(EntityID, $EntityName, 'icon', 0, $AltText)" disable-output-escaping="yes" />
                        </a>
                        <br/>
                        <a href="{$URL}">
                            <xsl:value-of select="$scName" disable-output-escaping="yes"/>
                        </a>
                    </td>

                </xsl:template>
                

                <xsl:template match="Product">

                    <xsl:variable name="delta">
                        <xsl:choose>
                            <xsl:when test="(count(/root/Products/Product) mod number($SubcatGridCols)) = 0">0</xsl:when>
                            <xsl:otherwise>
                                <xsl:value-of select="number($SubcatGridCols)-(count(/root/Products/Product) mod number($SubcatGridCols))"/>
                            </xsl:otherwise>
                        </xsl:choose>
                    </xsl:variable>
                    <xsl:variable name="rows" select="ceiling(count(/root/Products/Product) div number($SubcatGridCols))" />

                    <xsl:if test="$SubcatGridCols = 1">
                        <tr>
                            <xsl:call-template name="ProductCell"></xsl:call-template>
                        </tr>
                    </xsl:if>


                    <xsl:if test="position() mod $SubcatGridCols = 1 and $SubcatGridCols &gt; 1">
                        <tr>
                         <xsl:for-each select=". | following-sibling::*[position() &lt; $SubcatGridCols]">
                            <xsl:call-template name="ProductCell"></xsl:call-template>
                         </xsl:for-each>
                            <xsl:if test="ceiling(position() div  number($SubcatGridCols)) = $rows and $delta &gt; 0">
                                <xsl:call-template name="FillerCells">
                                    <xsl:with-param name="cellCount" select="$delta" />
                                </xsl:call-template>
                            </xsl:if>
                        </tr>
                    </xsl:if>

                </xsl:template>


                <xsl:template name="ProductCell">

                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="$pSEAltText=''"><xsl:value-of select="$pName" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="$pSEAltText" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>

                    <td align="center" valign="bottom" width="{concat(round(100 div number($SubcatGridCols)),'%')}">
                        <table>
                            <tr>
                                <td height="30" align="center" valign="center">
                                    <a href="{aspdnsf:ProductandEntityLink(ProductID, SEName, $EntityID, $EntityName, 0)}">
                                        <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFileNameOverride, SKU, 'icon', 1, $AltText)" disable-output-escaping="yes"/>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <td height="10" align="center" valign="top">
                                    <a href="{aspdnsf:ProductandEntityLink(ProductID, SEName, $EntityID, $EntityName, 0)}">
                                        <xsl:value-of select="$pName" disable-output-escaping="yes" />
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <td height="45" align="center" valign="top">
                                    <xsl:if test="aspdnsf:AppConfigBool('DisplayOutOfStockProducts') = 'true'">
                                        <xsl:value-of select="aspdnsf:DisplayProductStockHint(ProductID, VariantID,'Entity')" disable-output-escaping="yes" />
                                    </xsl:if>
                                </td>
                            </tr>
                        </table>
                    </td>

                </xsl:template>

                <xsl:template name="FillerCells">
                    <xsl:param name="cellCount"/>
                    <xsl:param name="CellWidth" select="100 div $SubcatGridCols" />
                    <td width="{$CellWidth}%"> </td>
                    <xsl:if test="$cellCount > 1">
                        <xsl:call-template name="FillerCells">
                            <xsl:with-param name="cellCount" select="$cellCount - 1"/>
                        </xsl:call-template>
                    </xsl:if>
                </xsl:template>
                
            </xsl:stylesheet>
        </PackageTransform>
    </package>
    Hopefully that at least points you in the right direction.

  3. #3
    tonya is offline Junior Member
    Join Date
    Sep 2011
    Posts
    22

    Default

    Thank you for the XML package example. I will look over it and see if I can make enough sense of it to get it to work with my existing filters.

    Just now, I am getting the following error: Exception=Expected token ']', found '$'. ... following-sibling::*[position() -->$<-- SubcatGridCols] for the following lines of code:

    Code:
     
     <xsl:for-each select=". | following-sibling::*[position() $SubcatGridCols]">
                          <xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)" />
                          <xsl:call-template name="SubCatCell">
                            <xsl:with-param name="scName" select="$scName" />
                          </xsl:call-template>
                        </xsl:for-each>
    and
    Code:
     <xsl:for-each select=". | following-sibling::*[position() $SubcatGridCols]">
                  <xsl:call-template name="ProductCell"></xsl:call-template>
                </xsl:for-each>
    Both of them originally read ''... [position() <"$SubcatGridCols]"> '' but that also generated an error due to the extra " and < before $SubcatGridCols.

    I will look at this more tomorrow but any guidance is appreciated.

    p.s. You can see the error that I am currently receiving and where I am wanting to put the Manufacturers list at http://www.got-chrome.com/c-9-lighting.aspx?skinid=5.
    Last edited by tonya; 07-02-2013 at 02:27 PM. Reason: addendum with URL

  4. #4
    tonya is offline Junior Member
    Join Date
    Sep 2011
    Posts
    22

    Default

    As a point of reference to get the left nav to work we are using: lots of conditionals within gc.filterednav. It currently shows one menu for the home page and other such pages, one menu for top level Category pages (i.e. Exterior Accessories), and another menu for sub-categories (i.e. [Exterior Accessories -->] Lighting --> Light Kits --> All Lights). So far, this has mostly worked by referencing additional xml packages. However, my hang-up is not knowing how to only show the condensed version of Categories (as is currently shown) and a coordinating list of Manufacturers for our 2nd level Categories (i.e. Lighting).

    I feel like I keep spinning my wheels on this one. So, any guidance will be appreciated!

    Per template.ascx, left nav is governed by gc.filterednav, which is shown below. Entity.test070213.grid is the xml package provided above by mmcgeachy.

    Code:
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <?xml-stylesheet type="text/css" href="skins/{Skin_ID}/style.css" media="all"?>
    <package version="2.1" displayname="Reductive Navigation" debug="false" includeentityhelper="true" CacheMode="Url">
      <webquery name="WebQuery" RetType="xml">
        <url>http://localhost:880/FilteredEntityData.ashx?CategoryIDs={CategoryID}-{CategoryIDs}&amp;SectionIDs={SectionID}-{SectionIDs}&amp;ManufacturerIDs={ManufacturerID}-{ManufacturerIDs}&amp;DistributorIDs={DistributorID}-{DistributorIDs}&amp;searchterm={SearchTerm}{Query}&amp;MinPrice={MinPrice}&amp;MaxPrice={MaxPrice}&amp;DisplayOutOfStock={DisplayOutOfStock}</url>
        <querystringreplace replaceTag="{CategoryID}" replacetype="request" replaceparamname="CategoryID" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{SectionID}" replacetype="request" replaceparamname="SectionID" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{ManufacturerID}" replacetype="request" replaceparamname="ManufacturerID" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{DistributorID}" replacetype="request" replaceparamname="DistributorID" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{CategoryIDs}" replacetype="request" replaceparamname="Category" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{SectionIDs}" replacetype="request" replaceparamname="Section" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{ManufacturerIDs}" replacetype="request" replaceparamname="Manufacturer" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{DistributorIDs}" replacetype="request" replaceparamname="Distributor" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{SearchTerm}" replacetype="request" replaceparamname="SearchTerm" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{Query}" replacetype="request" replaceparamname="Query" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{MinPrice}" replacetype="request" replaceparamname="MinPrice" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{MaxPrice}" replacetype="request" replaceparamname="MaxPrice" defvalue="" validationpattern="" />
        <querystringreplace replaceTag="{DisplayOutOfStock}" replacetype="appconfig" replaceparamname="DisplayOutOfStockProducts" defvalue="0" validationpattern="" />
      </webquery>
      <query name="Entity" rowElementName="Data">
        <sql><![CDATA[
                    select sectionid as EntityID, extensiondata, 'section' as EntityType from section where parentsectionid = 0
                    UNION ALL
                    select categoryid as EntityID, extensiondata, 'category' as EntityType from category where parentcategoryid = 0
                ]]></sql>
      </query>
      <query name="Narrow" rowElementName="Entities">
        <sql><![CDATA[
    				select e.EntityID, e.Name, e.ParentEntityID as ParentID, e.EntityType
    				from split(@SectionIDs, '-') qe inner join EntityMaster e on (qe.items = e.entityid and e.EntityType = 'section')
    				UNION ALL
    				select e.EntityID, e.Name, e.ParentEntityID as ParentID, e.EntityType
    				from split(@CategoryIDs, '-') qe inner join EntityMaster e on (qe.items = e.entityid and e.EntityType = 'category')
                ]]></sql>
        <queryparam paramname="@SectionIDs" paramtype="request" requestparamname="section" sqlDataType="varchar" defvalue="" validationpattern="^[0-9\-]*$" />
        <queryparam paramname="@CategoryIDs" paramtype="request" requestparamname="category" sqlDataType="varchar" defvalue="" validationpattern="^[0-9\-]*$" />
        <queryparam paramname="@ManufacturerIDs" paramtype="request" requestparamname="manufacturer" sqlDataType="varchar" defvalue="" validationpattern="^[0-9\-]*$" />
        <queryparam paramname="@DistributorIDs" paramtype="request" requestparamname="distributor" sqlDataType="varchar" defvalue="" validationpattern="^[0-9\-]*$" />
        <queryparam paramname="@GenreIDs" paramtype="request" requestparamname="genre" sqlDataType="varchar" defvalue="" validationpattern="^[0-9\-]*$" />
        <queryparam paramname="@VectorIDs" paramtype="request" requestparamname="vector" sqlDataType="varchar" defvalue="" validationpattern="^[0-9\-]*$" />
      </query>
      <PackageTransform>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
          <xsl:output method="html" omit-xml-declaration="yes" />
          <xsl:param name="CurrentEntityName">
            <xsl:choose>
              <xsl:when test="/root/Runtime/PageName = 'showcategory.aspx' ">
                <xsl:text>Category</xsl:text>
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showsection.aspx' ">
                <xsl:text>Section</xsl:text>
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showmanufacturer.aspx' ">
                <xsl:text>Manufacturer</xsl:text>
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showlibrary.aspx' ">
                <xsl:text>Library</xsl:text>
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showdistributor.aspx' ">
                <xsl:text>Distributor</xsl:text>
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showgenre.aspx' ">
                <xsl:text>Genre</xsl:text>
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showvector.aspx' ">
                <xsl:text>Vector</xsl:text>
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'casearch.aspx'">
                <xsl:text>Search</xsl:text>
              </xsl:when>
              <xsl:otherwise>
                <xsl:text>NonListingPage</xsl:text>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:param>
          <xsl:param name="CurrentEntityID">
            <xsl:choose>
              <xsl:when test="/root/Runtime/PageName = 'showcategory.aspx' ">
                <xsl:value-of select="/root/QueryString/categoryid" />
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showsection.aspx' ">
                <xsl:value-of select="/root/QueryString/sectionid" />
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showmanufacturer.aspx' ">
                <xsl:value-of select="/root/QueryString/manufacturerid" />
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showlibrary.aspx' ">
                <xsl:value-of select="/root/QueryString/libraryid" />
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showdistributor.aspx' ">
                <xsl:value-of select="/root/QueryString/distributorid" />
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showgenre.aspx' ">
                <xsl:value-of select="/root/QueryString/genreid" />
              </xsl:when>
              <xsl:when test="/root/Runtime/PageName = 'showvector.aspx' ">
                <xsl:value-of select="/root/QueryString/vectorid" />
              </xsl:when>
            </xsl:choose>
          </xsl:param>
          <xsl:param name="CurrentEntity" select="/root/EntityHelpers/*[name()=$CurrentEntityName]//Entity[EntityID = $CurrentEntityID]" />
          <xsl:param name="ShowSelectedCookie" select="aspdnsf:AppConfig('ReductiveNav.showselected')" />
          <xsl:param name="LinkCountCookie" select="aspdnsf:AppConfig('ReductiveNav.LinkCount')" />
          <xsl:param name="ShowEmptiesCookie" select="aspdnsf:AppConfig('ReductiveNav.ShowEmpties')" />
          <xsl:param name="UseDropdownsCookie" select="aspdnsf:AppConfig('ReductiveNav.UseDropdowns')" />
          <xsl:param name="UseHierarchyCookie" select="aspdnsf:AppConfig('ReductiveNav.UseHierarchy')" />
          <xsl:param name="ShowCountsCookie" select="aspdnsf:AppConfig('ReductiveNav.ShowCounts')" />
          <xsl:param name="linkcount">
            <xsl:choose>
              <xsl:when test="$LinkCountCookie != ''">
                <xsl:value-of select="$LinkCountCookie + 1" />
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="6" />
              </xsl:otherwise>
            </xsl:choose>
          </xsl:param>
          <xsl:param name="ShowSelected" select="boolean(aspdnsf:ToLower($ShowSelectedCookie) = 'true')" />
          <xsl:param name="UseHierarchy" select="boolean(aspdnsf:ToLower($UseHierarchyCookie) = 'true')" />
          <xsl:param name="ShowEmpties" select="boolean(aspdnsf:ToLower($ShowEmptiesCookie) = 'true')" />
          <xsl:param name="ShowCounts" select="boolean(aspdnsf:ToLower($ShowCountsCookie) = 'true')" />
          <xsl:param name="GlobalUseDropdowns" select="boolean(aspdnsf:ToLower($UseDropdownsCookie) = 'true')" />
          <xsl:param name="IsProductListingPage" select="$CurrentEntity/XmlPackage = 'entity.filteredgrid.xml.config' or /root/System/PageName = 'casearch.aspx'" />
          <xsl:param name="SkinID" select="/root/System/SkinID" />
          <xsl:param name="ReductiveRoot" select="/root/EntityHelpers/Section" />
          <xsl:param name="CatgparentID">
            <xsl:choose>
              <xsl:when test="$CurrentEntityName = 'Category' and $CurrentEntityID = root/QueryString/categoryid">
                <xsl:for-each select="/root/EntityHelpers/Category//Entity[EntityID = $CurrentEntityID]">
                  <xsl:value-of select="../parent::Entity/EntityID" />
                </xsl:for-each>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="$CurrentEntityName"/> and <xsl:value-of select="$CurrentEntityID"></xsl:value-of>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:param>
          <!--= $CurrentEntityID and $CurrentEntityName = Category" /   - New -->
          <xsl:param name="CatHasChildren">
            <xsl:choose>
              <xsl:when test="$CurrentEntityName = 'Category' and $CurrentEntityID = root/QueryString/categoryid">
                <xsl:for-each select="/root/EntityHelpers/Category//Entity[EntityID = $CurrentEntityID]">
                  <xsl:value-of select="count(child::Entity/EntityID)" />
                </xsl:for-each>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="$CurrentEntityName"/> and <xsl:value-of select="$CurrentEntityID"></xsl:value-of>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:param>
          <!--New-->
          
          <xsl:template match="/">    
            <xsl:comment>
              WebQuery:<xsl:value-of select="/root/WebQuery/Result/Url" disable-output-escaping="yes" />
            </xsl:comment>
    
            <xsl:choose>
              <xsl:when test="$IsProductListingPage">
            <script type="text/javascript" src="jscripts/categorylogic.js"></script>
                <!-- categorylogic manages site product filters -->
               
                <div id="ReductiveNav">
                  <xsl:call-template name="Search" />
                  <xsl:if test="$ShowSelected">
                    <xsl:call-template name="Selections" />
                  </xsl:if>
                <!--  //<script type="text/javascript" src="skins/Skin_5/jscripts/accordionMenu.js">
                  //</script> 
                  Added 6/19/13 after significant testing outside of ASPDNSF/XML but does not seem to work here. -->
    
                  Gparent: <xsl:value-of select="$CatgparentID" />
                  <!-- New -->
                  <br />
                  Has Children: <xsl:value-of select="$CatHasChildren" />
                  <!-- New -->
                  <br />
                  <xsl:value-of select="aspdnsf:Topic('ReductiveNavDefault2')" disable-output-escaping="yes" /> <!--Added 6/13/13-->
                  <!-- <xsl:apply-templates select="/root/EntityHelpers/Manufacturer" mode="ReductiveGroups" /> -->
                  <xsl:apply-templates select="$ReductiveRoot/Entity" mode="ReductiveGroups" />
                </div>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="aspdnsf:Topic('ReductiveNavDefault')" disable-output-escaping="yes" />
              </xsl:otherwise>
            </xsl:choose>
          </xsl:template>
          
          <xsl:template match="Entity|Manufacturer" mode="ReductiveGroups">
            <xsl:param name="EntityName" select="aspdnsf:GetMLValue(Name)" />
            <xsl:param name="pEntityID" select="./EntityID" />
            <xsl:param name="parentID" select="./parent::Entity/EntityID" />
            <xsl:param name="EntityType" select="aspdnsf:ToLower(name(ancestor-or-self::*[parent::*[name() = 'EntityHelpers']]))" />
            <xsl:param name="ChildIsCurrentPage" select="boolean(aspdnsf:ToLower($CurrentEntityName) = $EntityType and $CurrentEntityID = Entity/EntityID)" />
            <xsl:param name="EntityTypeNarrows" select="/root/Narrow/Entities[aspdnsf:ToLower(EntityType) = $EntityType] | Entity[$CurrentEntityID = EntityID and $ChildIsCurrentPage]" />
            <xsl:param name="ChildSelected" select="boolean(Entity[EntityID = $EntityTypeNarrows/EntityID]) or $ChildIsCurrentPage" />
            <xsl:param name="SelectedChild" select="Entity[EntityID = $EntityTypeNarrows/EntityID]/EntityID" />
            <xsl:param name="EntityTypeCounts" select="/root/WebQuery/Result/EntityCounts/EntityCount[aspdnsf:ToLower(EntityType) = $EntityType]" />
            <xsl:param name="EntityTypeData" select="/root/Entity/Data[aspdnsf:ToLower(EntityType) = $EntityType]" />
            <xsl:param name="UseDropdowns" select="$EntityTypeData[EntityID=$pEntityID]/extensiondata = 'dropdown' or $GlobalUseDropdowns" />
            <xsl:param name="ContainsProducts" select="boolean(.//Entity/EntityID = $EntityTypeCounts/EntityID)" />
            <xsl:param name="ParentIsSelected" select="boolean($EntityTypeNarrows[EntityID = $parentID])" />
            <xsl:param name="EntityUniqueID" select="concat($EntityType, aspdnsf:StrReplace($EntityName, ' ', ''))" />
            <xsl:variable name="removelink">
              <xsl:choose>
                <xsl:when test="$EntityType = aspdnsf:ToLower($CurrentEntityName) and $SelectedChild = $CurrentEntityID">
                  <xsl:text>javascript:replaceBasePage('casearch.aspx');</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>javascript:removeEntity(</xsl:text>
                  <xsl:value-of select="$SelectedChild" />
                  <xsl:text>, '</xsl:text>
                  <xsl:value-of select="$EntityType" />
                  <xsl:text>');</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:variable>
    
    
            <xsl:choose>
              <xsl:when test="$CatgparentID!='' and $CatHasChildren&gt;=0">
                <xsl:if test="$UseHierarchy">
                  <xsl:apply-templates select="Entity/Entity" mode="ReductiveGroups" />
                </xsl:if>
                <xsl:if test="($ShowEmpties or ($ContainsProducts and not($ChildSelected))) and ($ParentIsSelected or $ChildSelected or ParentEntityID = 0)">
                  <div class="CatBlock" id="{$EntityName}Unselected" style="font-size:1.25em;color:#FFFFFF;">
                    <div class="art-block-body art-blocksecheader">
                      <div class="lr"></div>
                      <div class="rl"></div>
                      <b class="sectionheader-text sectionheader-group">
                        <xsl:variable name="imagepath" select="concat('skins/skin_',$SkinID,'/reductivegroupimages/', $EntityName, '.jpg')" />
                        <xsl:choose>
                          <xsl:when test="aspdnsf:FileExists($imagepath)">
                            <img src="{$imagepath}" alt="{$EntityName}" />
                          </xsl:when>
                          <xsl:when test="not(Name)">
                            <xsl:value-of select="aspdnsf:StringResource(concat('AppConfig.',name(),'PromptPlural'))" />
                          </xsl:when>
                          <xsl:otherwise>
                            <xsl:value-of select="aspdnsf:GetMLValue(Name)" />
                          </xsl:otherwise>
                        </xsl:choose>
                      </b>
                    </div>
                    <!--<br />-->
                    <xsl:if test="$ShowEmpties and $ChildSelected">
                      *-*<a href="{$removelink}">View All</a>
                    </xsl:if>
                    <div>
                      <xsl:choose>
                        <xsl:when test="$UseDropdowns">
                          <xsl:call-template name="EntityReductiveDropdown">
                            <xsl:with-param name="EntityName" select="$EntityName" />
                            <xsl:with-param name="EntityType" select="$EntityType" />
                            <xsl:with-param name="EntityUniqueID" select="$EntityUniqueID" />
                            <xsl:with-param name="ChildSelected" select="$ChildSelected" />
                            <xsl:with-param name="SelectedChild" select="$SelectedChild" />
                            <xsl:with-param name="EntityTypeCounts" select="$EntityTypeCounts" />
                            <xsl:with-param name="EntityTypeNarrows" select="$EntityTypeNarrows" />
                            <xsl:with-param name="removelink" select="$removelink" />
                          </xsl:call-template>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:call-template name="EntityReductiveList">
                            <xsl:with-param name="EntityName" select="$EntityName" />
                            <xsl:with-param name="EntityType" select="$EntityType" />
                            <xsl:with-param name="EntityUniqueID" select="$EntityUniqueID" />
                            <xsl:with-param name="ChildSelected" select="$ChildSelected" />
                            <xsl:with-param name="SelectedChild" select="$SelectedChild" />
                            <xsl:with-param name="EntityTypeCounts" select="$EntityTypeCounts" />
                            <xsl:with-param name="EntityTypeNarrows" select="$EntityTypeNarrows" />
                            <xsl:with-param name="removelink" select="$removelink" />
                          </xsl:call-template>
                        </xsl:otherwise>
                      </xsl:choose>
                    </div>
                  </div>
                  <br />
                </xsl:if>
              </xsl:when>
              <xsl:otherwise>
               <xsl:value-of select="aspdnsf:XmlPackage('entity.test070213.grid.xml.config', 'hidesearchbar=true')" disable-output-escaping="yes" />
              </xsl:otherwise>
            </xsl:choose>
          </xsl:template>
          
          <xsl:template name="EntityReductiveList">
            <xsl:param name="EntityName" />
            <xsl:param name="EntityType" />
            <xsl:param name="EntityUniqueID" />
            <xsl:param name="ChildSelected" />
            <xsl:param name="SelectedChild" />
            <xsl:param name="EntityTypeCounts" />
            <xsl:param name="EntityTypeNarrows" />
            <xsl:param name="removelink" />
            <div class="visible ReductiveAttributes" id="visible{$EntityUniqueID}">
              <xsl:for-each select="Entity[EntityID = $EntityTypeCounts/EntityID or $ShowEmpties]">
                <xsl:variable name="name" select="Name" />
                <xsl:variable name="sid" select="EntityID" />
                <xsl:variable name="count" select="$EntityTypeCounts[EntityID = $sid]/productcount" />
                <xsl:variable name="link">
                  <xsl:choose>
                    <xsl:when test="$IsProductListingPage">
                      <xsl:text>javascript:entityLink(</xsl:text>
                      <xsl:value-of select="$sid" />
                      <xsl:text>, '</xsl:text>
                      <xsl:value-of select="$EntityType" />
                      <xsl:text>');</xsl:text>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:value-of select="aspdnsf:EntityLink(EntityID, SEName, $EntityType, 0)" />
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:variable>
                <xsl:choose>
                  <xsl:when test="not($ChildSelected) and $count &gt; 0 ">
                    <div class="nav-sublevel">
                      <a href="{$link}" class="fullwidth">
                        <xsl:value-of select="aspdnsf:GetMLValue($name)" />
                        <xsl:if test="$ShowCounts and EntityID = $EntityTypeCounts/EntityID ">
                          <xsl:value-of select="concat(' (',$count,')')" />
                        </xsl:if>
                      </a>
                    </div>
                  </xsl:when>
                  <xsl:otherwise>
                    <div class="nav-nolink">
                      <xsl:choose>
                        <xsl:when test="EntityID = $SelectedChild">
                          <strong class="selectedsection">
                            <xsl:value-of select="aspdnsf:GetMLValue($name)" />*<a class="fullwidth" href="{$removelink}">(x)</a></strong>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:value-of select="aspdnsf:GetMLValue($name)" />
                        </xsl:otherwise>
                      </xsl:choose>
                      <xsl:if test="not($ChildSelected)">
                        (0)
                      </xsl:if>
                    </div>
                  </xsl:otherwise>
                </xsl:choose>
                <xsl:if test="position() = $linkcount - 1">
                  <xsl:text disable-output-escaping="yes">&lt;/div&gt;&lt;div class="hidden ReductiveAttributes" style="display:none" id="hidden</xsl:text>
                  <xsl:value-of select="$EntityUniqueID" />
                  <xsl:text disable-output-escaping="yes">"&gt;</xsl:text>
                </xsl:if>
              </xsl:for-each>
            </div>
            <xsl:if test="count(Entity[EntityID = $EntityTypeCounts/EntityID or $ShowEmpties]) &gt;= $linkcount">
              <a class="fullwidth rnmore" id="More{$EntityUniqueID}Link" onclick="javascript:document.getElementById('hidden{$EntityUniqueID}').style.display = 'block';document.getElementById('More{$EntityUniqueID}Link').style.display = 'none';" href="javascript:void(0);">More...</a>
            </xsl:if>
          </xsl:template>
          
          <xsl:template name="EntityReductiveDropdown">
            <xsl:param name="EntityName" />
            <xsl:param name="EntityType" />
            <xsl:param name="EntityUniqueID" />
            <xsl:param name="ChildSelected" />
            <xsl:param name="SelectedChild" />
            <xsl:param name="EntityTypeCounts" />
            <xsl:param name="EntityTypeNarrows" />
            <xsl:param name="removelink" />
            <span class="ReductiveAttributes">
              <FORM NAME="{$EntityUniqueID}nav">
                <SELECT NAME="{$EntityUniqueID}SelectURL">
                  <xsl:attribute name="onChange">
                    <xsl:choose>
                      <xsl:when test="not($IsProductListingPage)">
                        document.location.href = this.options[this.selectedIndex].value;
                      </xsl:when>
                      <xsl:when test="$ChildSelected">
                        entityReplaceLink(this.options[this.selectedIndex].value, <xsl:value-of select="$SelectedChild" />, "<xsl:value-of select="$EntityType" />");
                      </xsl:when>
                      <xsl:otherwise>
                        entityLink(this.options[this.selectedIndex].value, "<xsl:value-of select="$EntityType" />");
                      </xsl:otherwise>
                    </xsl:choose>
                  </xsl:attribute>
                  <option value="">
                    Select a <xsl:value-of select="aspdnsf:GetMLValue(Name)" /></option>
                  <xsl:for-each select="Entity">
                    <xsl:variable name="name" select="aspdnsf:GetMLValue(Name)" />
                    <xsl:variable name="sid" select="EntityID" />
                    <xsl:variable name="Count" select="$EntityTypeCounts[EntityID = $sid]/productcount" />
                    <xsl:if test="$EntityTypeCounts[EntityID = $sid]/productcount &gt; 0 or $ShowEmpties">          
                      <OPTION>
                        <xsl:attribute name="value">
                          <xsl:choose>
                            <xsl:when test="not($IsProductListingPage)">
                              <xsl:value-of select="aspdnsf:EntityLink(EntityID, SEName, $EntityType, 0)" />
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:value-of select="$sid" />
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:attribute>
                        <xsl:if test="$EntityTypeNarrows[EntityID = $sid]">
                          <xsl:attribute name="selected" />
                        </xsl:if>
                        <xsl:if test="not($EntityTypeCounts[EntityID = $sid]/productcount &gt; 0)">
                          <xsl:attribute name="disabled">disabled</xsl:attribute>
                        </xsl:if>
                        <xsl:value-of select="aspdnsf:GetMLValue(Name)" />
                        <xsl:if test="$ShowCounts or $Count = 0">
                          <xsl:value-of select="concat(' (',$Count,')')" />
                        </xsl:if>
                      </OPTION>
                    </xsl:if>
                  </xsl:for-each>
                </SELECT>
              </FORM>
            </span>
          </xsl:template>
          
          <xsl:template name="Selections">
            <xsl:param name="SelectionsContent">
              <xsl:apply-templates select="$ReductiveRoot/Entity" mode="SelectedAttributes" />
            </xsl:param>
            <xsl:if test="string-length($SelectionsContent) &gt; 0">
              <div id="allSelections">
                <b id="YouHaveSelected">You have selected:</b>
                <div id="youveselected">
                  <xsl:apply-templates select="$ReductiveRoot/Entity" mode="SelectedAttributes" />
                  <a class="fullwidth back" id="RemoveAllSelections" href="casearch.aspx?searchterm=">Start Over</a>
                </div>
                <br />
              </div>
            </xsl:if>
          </xsl:template>
          
          <xsl:template match="Entity" mode="SelectedAttributes">
            <xsl:param name="EntityType" select="aspdnsf:ToLower(name(ancestor-or-self::*[parent::*[name() = 'EntityHelpers']]))" />
            <xsl:param name="ChildIsCurrentPage" select="boolean(aspdnsf:ToLower($CurrentEntityName) = $EntityType and $CurrentEntityID = Entity/EntityID)" />
            <xsl:param name="EntityTypeNarrows" select="/root/Narrow/Entities[aspdnsf:ToLower(EntityType) = $EntityType] | Entity[$CurrentEntityID = EntityID and $ChildIsCurrentPage]" />
            <xsl:param name="ChildSelected" select="boolean(Entity[EntityID = $EntityTypeNarrows/EntityID]) or $ChildIsCurrentPage" />
            <xsl:if test="$ChildSelected">
              <xsl:for-each select="Entity[EntityID = $EntityTypeNarrows/EntityID]">
                <xsl:variable name="RemoveLink">
                  <xsl:choose>
                    <xsl:when test="aspdnsf:ToLower($CurrentEntityName) = $EntityType and $CurrentEntityID = EntityID">
                      <xsl:text>replaceBasePage('casearch.aspx')</xsl:text>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:text>removeEntity(</xsl:text>
                      <xsl:value-of select="EntityID" />
                      <xsl:text>, "</xsl:text>
                      <xsl:value-of select="$EntityType" />
                      <xsl:text>")</xsl:text>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:variable>
                <div class="nav-section" id="{Name}Selected">
                  <xsl:value-of select="aspdnsf:GetMLValue(Name)" />*
                  <xsl:if test="not(.//Entity[EntityID = $EntityTypeNarrows/EntityID])"><a href="javascript:{$RemoveLink};" class="removeLink">(remove)</a></xsl:if><xsl:apply-templates select="./Entity" mode="SelectedAttributes" /></div>
              </xsl:for-each>
            </xsl:if>
          </xsl:template>
          
          <xsl:template name="Search">
            <xsl:choose>
              <xsl:when test="/root/QueryString/searchterm != ''">
                <b>Search Term:</b>*<em><xsl:value-of select="/root/QueryString/searchterm" /></em><a href="javascript:removeParam(&quot;SearchTerm&quot;);" class="removeLink">*(remove)</a><br /><br /></xsl:when>
              <xsl:otherwise>
                <!-- <div class="sectionheader group"> class="sectionheader-text" -->
                <b id="SearchHeader">
                  <xsl:variable name="imagepath" select="concat('skins/skin_',$SkinID,'/reductivegroupimages/search.jpg')" />
                  <xsl:choose>
                    <xsl:when test="aspdnsf:FileExists($imagepath)">
                      <img src="{$imagepath}" alt="Search Results" />
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:text>Search Results</xsl:text>
                    </xsl:otherwise>
                  </xsl:choose>
                </b>
                <!-- </div> -->
                <div class="CatBlock" id="SearchUnselected">
                  <xsl:variable name="onsubmit">
                    <xsl:choose>
                      <xsl:when test="$IsProductListingPage">
                        <xsl:text>setParam('SearchTerm', document.getElementById('RNsearchBox').value);</xsl:text>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:text>document.location.href = 'casearch.aspx?SearchTerm=' + document.getElementById('RNsearchBox').value;</xsl:text>
                      </xsl:otherwise>
                    </xsl:choose>
                  </xsl:variable>
                  <form onsubmit="{$onsubmit}return false;">
                    <input type="text" size="20" name="SearchTerm" id="RNsearchBox" />
                    <input type="submit" id="RNsearchGo" value="Go" />
                  </form>
                </div>
                <br />
              </xsl:otherwise>
            </xsl:choose>
          </xsl:template>
        </xsl:stylesheet>
      </PackageTransform>
    </package>

  5. #5
    mmcgeachy is offline Senior Member
    Join Date
    Sep 2008
    Posts
    174

    Default

    hmm past some type of odd encoding issues from a copy paste I am not sure why it would throw errors. The xmlpackage is based off the Entity Grid xmlpackage. I just changed the product query so if all else fails just try creating a copy Entity Grid and edit query to see if you have still throw the errors.

    Also looking at your site I am slightly confused where the issue lies. Reason being is when I go to here the page looks like it has something like this addon. Granted the page calls it brand instead of Manufacturer it still looks like what you are describing. The filtering looks to be working also.

  6. #6
    tonya is offline Junior Member
    Join Date
    Sep 2011
    Posts
    22

    Default

    The site was setup by Vortx before I joined the team and I have been learning XSL, ASPDNSF, and all that goes along with it over the course of the past 2 years while also helping manage site inventory, etc. As such, I am not sure what Vortx used to get our reductive style custom filters to work other than custom XML packages that are designed specifically for the navigation, thus are completely separate from the category entity pages (i.e. entity.grid and entity.filteredgrid). What I do know is that the filters that you see on most of our sub-category pages (i.e. http://www.got-chrome.com/c-208-light-bulbs.aspx) is based off of custom attributes in Channel Advisor that sync to ASPDNSF's section/department fields. What I had tried previously was to replicate the xml package that governs the display and filter of the sections/departments but at best what I got was a lot of redundancy (i.e. all of my manufacturers being listed multiple times) or the other extreme was that all of my manufacturers were hidden when I tried applying similar logic and CSS styling as I am using to hone in on my Category list on the sub-category pages.