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

Thread: ASP Menu vs. Category Name

  1. #1
    dayhawk is offline Member
    Join Date
    May 2009
    Posts
    76

    Default ASP Menu vs. Category Name

    Is it possible to pass only a portion of a category name to the asp menu in 9.0.1.3?

    We have a category name,

    Double Barrel Borosilicate Capillary Glass Without Microfilament.

    In the ASP Menu, it would be ideal to have it appear as "Without Microfilament".

    Not sure if this is possible.

    Also, I've noticedd that some subcategories do not show up unless MaxMenuLevel is set to 20 or higher. When MaxMenuLevel is set to 3, some subcats show and most subcats don't.

    This appears to depend on the order of the top-level categories. When top-level categories go from A through L, and when most of those categories have subcategories, and when MaxMenuLevel is set to 3, only the top half or so will show subcategories. So top-level category L with subcategories will not display subcategories.

    After changing the display order, and top-level category L appears second in the list, L will show its subcategories. And the bottom half or so of the top-level categories, will still not display subcategories.

    An interim fix for this is to set the MaxMenuLevel to 20. Then all subcategories in all top-level categories appear. This is a temporary workaround since we'd like to display only 3 levels deep.

    Has anyone else seen an issue like this?

    Thanks.
    MSx 9.2, SQL Server 2005, Windows 2008 R2 Web 64-Bit

  2. #2
    Alkaline is offline Senior Member
    Join Date
    May 2006
    Posts
    459

    Default

    You might be able to do this via CSS and limit the width, but browsers like opera anc chrome/safari will no interpret this correctly.

    Alternatively, you can concact the string if you have the source code.
    Simrun AspDotNetStoreFront Development
    Preferred AspDotnetStorefront Development Partner
    ahsan[@]simrun[.]com
    remove the "[]" for email

    Have a Nice Day

  3. #3
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    The problem of parts of the menu not showing up is a but that I've found, fixed, and reported. It happens only with the VB.Net version I'm told. There should be a patch available for it if you contact the folks at ASPDNSF. If not, post here, and I'll post the fix.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  4. #4
    pligon is offline Junior Member
    Join Date
    May 2009
    Location
    Richmond, VA
    Posts
    27

    Default

    Hello cjbarth,

    I asked support, and they said they were unaware of the fix. Have been troubleshooting this evening on my own copy, but if you have already located the fix, please post, it would be helpful!

  5. #5
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    In the ExtractEntity sub at about line 300 of App_Code/ASPDNSFSiteMapProvider the following was changed:

    If item.HasChildren Then
    ExtractEntity(item.ChildItems, newNode, level)
    level += 1
    End If

    To:

    If item.HasChildren Then
    ExtractEntity(item.ChildItems, newNode, level + 1)
    End If
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  6. #6
    pligon is offline Junior Member
    Join Date
    May 2009
    Location
    Richmond, VA
    Posts
    27

    Default

    Hi there,

    Thanks for that. I can see the problem in that one

    Unfortunately, did not resolve the issue in the left nav. I'm still not seeing any sub-categories at all.

  7. #7
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    So you're not seeing any sub categories in your menu at all? Have you ever seen any?
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  8. #8
    pligon is offline Junior Member
    Join Date
    May 2009
    Location
    Richmond, VA
    Posts
    27

    Default

    No, I haven't. I tried calling through the EntityControl, and I tried calling the XMLPackage rev.categories.xml.config.

    The EntityControl tells me nothing.

    The package shows me that the categoryID is not getting set. If I manually set the category ID, the sub-categories show. In the package categoryID it isn't getting set, because the page name has already been rewritten and the pagename matches at the top of the transform don't work.

    Do I have an different build version 9 or something? ASPDNSF says they are aware of this bug, but have fix for it, and it is VB.NET specific. But you are seeing the sub-categories?

  9. #9
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    If they have a fix I would use that, however, I'm not seeing anything that is like what you are describing. What you are describing doesn't even sound like you are using v9. v9 uses ASP.Net controls for the menu and page.menu.xml.config. That xml file you are referencing is think is from v8.

    What does the code you have in your template to create the menu look like?
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  10. #10
    pligon is offline Junior Member
    Join Date
    May 2009
    Location
    Richmond, VA
    Posts
    27

    Default

    Definitely using version 9. Called the package because I can use it to spit out debugging info. To do that with the control, I have to recompile the entire core:

    In the template.master:

    <aspdnsf:EntityControl ID="ctrlEntityCategory" runat="server" Header="<%$ Tokens:StringResource, AppConfig.CategoryPromptPlural %>" EntityType="Category" MaxMenuSize="<%$ Tokens:AppConfigUSInt, MaxMenuSize %>" />


    <asp:Literal runat="server" Text="<%$ Tokens:XMLPACKAGE, rev.categories.xml.config%>" />

  11. #11
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    That isn't the code that comes with v9. It looks like you've upgraded to v9 and kept the same template. I would suggest that you have a look at the default template and see how the menu is built there and make yours from the same components. If you need more help please see http://forums.aspdotnetstorefront.co...ad.php?t=22752.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  12. #12
    pligon is offline Junior Member
    Join Date
    May 2009
    Location
    Richmond, VA
    Posts
    27

    Default

    Well, no....

    This is a brand new store. Downloaded and run from the install. This is the template.master that came with the package. This code is directly copied from the master without alteration.

    <aspdnsf:EntityControl ID="ctrlEntityCategory" runat="server" Header="<%$ Tokens:StringResource, AppConfig.CategoryPromptPlural %>" EntityType="Category" MaxMenuSize="<%$ Tokens:AppConfigUSInt, MaxMenuSize %>" />

  13. #13
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    I see what you are talking about now. You're not actually refering to the menu, that begins like:

    Code:
    <asp:Menu ID="aspnetMenu" runat="server" Orientation="Horizontal" StaticTopSeparatorImageUrl="images/tab-sep.gif"
    				StaticEnableDefaultPopOutImage="False" StaticDisplayLevels="2" MaximumDynamicDisplayLevels="<%$ Tokens:AppConfigUSInt, MaxMenuLevel %>">
    You are referring to the list of categories shown. So you want not only the top level categories to show, but also child categories. Right now, that list is set to show categories based on your current category. It will change as you navigate to other categories. Try it, please. Click on a top level category and see if that list changes.

    If it doesn't change, we might have a problem. If it does, then everything is working by design. If you really want subcategories to show, then we'll have to modify the InitializeDataSource and related routines in EntityControl.vb to be recursive to pull in more children and format them correctly.

    In any case, the ASP.Net menu should be showing child categories with no problem.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  14. #14
    pligon is offline Junior Member
    Join Date
    May 2009
    Location
    Richmond, VA
    Posts
    27

    Default

    Yeah... That's the way I wish it worked

    Unfortunately, you click on a top level category, and it still doesn't show subcategories. I have done some debugging and see that it's always returning a count of childitems of 0, even if you have items in the sub-category. Well, that ain't right.

    I'm following the code in the EntityControl.vb class to see if I can figure out where it's failing. Any insight if you've worked with this control would be helpful.

  15. #15
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    Unfortunatly, I haven't worked with this control. However, I would start by looking at why the InitializeDataSource routine always sets id = ID_NOT_DEFINED. That seems to defeat the idea of detecting which page your on and then using that as the starting id.

    Off hand, I'm not sure how you might pull the current category to search based on it, but I'm sure it has something to do with {CategoryID} as defined in web.config. That is a variable that is created when you go to a category page, so I'm sure you can modify

    Code:
    Dim id As Integer = ID_NOT_DEFINED
    to be something like

    Code:
    Dim id As Integer = CategoryID
    or you might have to parse the url.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  16. #16
    pligon is offline Junior Member
    Join Date
    May 2009
    Location
    Richmond, VA
    Posts
    27

    Default Resolved!

    Okay, I have resolved this bug:

    In the core, ProductMappingLinkItem.vb and know why it doesn't work in VB, there are three instances of IDataReader actions that go converted into external AnonymousMethods. These were contained inside the functions in the C# version. Because of this, the method level variables in the VB version for found, children, and all never get set.

    To fix, pass the three critical variables in the three AnonymousMethods ByRef. This will allow them to be set properly and it works.

    Hope this helps you!

  17. #17
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    I'm so glad you found it. Please make sure to report this as a bug to ASPDNSF support so they can add it to their library.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  18. #18
    mat12 is offline Junior Member
    Join Date
    Oct 2010
    Posts
    1

    Default

    It happens only with the VB.Net version I'm told. There should be a patch available for it if you contact the folks at ASPDNSF. If not, post here, and I'll post the fix.

  19. #19
    equatek is offline Junior Member
    Join Date
    Jul 2009
    Location
    Rochester, NY
    Posts
    7

    Default

    We're having the problem with the sub-cats not showing also. Could you post the patch for the VB version?

    Thanks
    [SIGPIC][/SIGPIC]

  20. #20
    AspDotNetStorefront Staff - Erik is offline Senior Member
    Join Date
    Nov 2010
    Location
    Ashland, OR
    Posts
    168

    Default Left-Nav subcats not showing on storefront 9013SP1+Admin VB

    We don't have a patch released for this bug (never officially did actually), but thanks to your assistance it was fixed for the current release MultiStore 9.1.0.1

    Those who have a ML9.x version can get this upgrade free on their 'My Licenses' page:

    http://www.aspdotnetstorefront.com/mylicenses.aspx
    Erik Sutton
    AspDotNetStorefront Technical Support