Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Dan Sunesen 45 posts 145 karma points
    Feb 05, 2013 @ 13:32
    Dan Sunesen
    0

    Get category description

    So, I have managed to output the names of each category and also manged to output each product.

    However, I cannot seem to figure out how to output the description on the category. Somehow it is empty? description=""

     

    This is what I get, when I output the category in a textarea

    <category index="0" id="69" parentCategoryId="" parentCategoryName="" contentId="-1" name="Seating" displayName="Seating" displayOnSite="True" description="" image="" definition="Default Category Definition">
      <properties>
        <CategoryImageName cultureCode="" dataType="ShortText">R82_Seating_icon_CMYK_48359.png</CategoryImageName>
        </properties>
        <childCategories />
    </category>

     

    And this is how it looks in uCommerce

    How do I output the description?

    Br
    Dan

  • Niels Jorck Ellegaard 39 posts 245 karma points
    Feb 05, 2013 @ 13:42
    Niels Jorck Ellegaard
    0

    In razor you can output the description on the category object with the method GetDescription()

    There you have access to LongDescription, Displayname and more. You have to put in the CultureCode aswell so it knows, which language to output.

    Call this on the object:

    .GetDescription(CultureInfo.CurrentCulture.ToString()).LongDescription
  • Dan Sunesen 45 posts 145 karma points
    Feb 05, 2013 @ 14:07
    Dan Sunesen
    0

    And so if I want to fetch it by XSLT, how do I get it then?

     

  • Niels Jorck Ellegaard 39 posts 245 karma points
    Feb 05, 2013 @ 14:46
    Niels Jorck Ellegaard
    100

    I'm not very solid at xslt, someone else will have to help you with that one, sorry.

  • Nickolaj Lundgreen 233 posts 1132 karma points
    Feb 05, 2013 @ 14:57
    Nickolaj Lundgreen
    1

    I know close to nothing about XSLT, but maybe this is what you are looking for:
    Link

  • Dan Sunesen 45 posts 145 karma points
    Feb 05, 2013 @ 15:30
    Dan Sunesen
    0

    Hey Nikolaj! I managed to get it working by adding hostname and language! Thanks a lot!

  • Dan Sunesen 45 posts 145 karma points
    Feb 05, 2013 @ 15:31
    Dan Sunesen
    0

    Aargh, sry, Nikolaj Lundgreen was supposed to get the Solved-credit!

Please Sign in or register to post replies

Write your reply to:

Draft