No announcement yet.

Parent Category of Product > childof

  • Filter
  • Time
  • Show
Clear All
new posts

  • Parent Category of Product > childof

    I am trying to use Tool Kit to get the parent category of a product

    <mvt:item name="toolkit" param="childof|parentfound|g.Category_Code" />
    <mvt:if expr="g.parentfound">
    <div style="font-size: 1em; font-weight: normal; padding: 4px;background: #5D5D5D; color: #fff;">&mvt:childof:name;...</div>
    but it seems to go too far up the tree. So if I have this

    --CTGY 1
    ---Sub Ctgy 1
    ----Sub Sub Ctgy 1
    --CTGY 2

    It does not see the immediate parent of Prod1, rather it is returning CTGY1's name. I need the immediate parent if possible.

  • Code:
    <mvt:do name="l.result" file="g.Module_Library_DB" value="CategoryList_Load_Offset_Product_Assigned(l.settings:product:id,0,'','',0,l.null, g.assigned_categories )" />
    <mvt:foreach iterator="category" array="global:assigned_categories">
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook


    • Bruce, you are a lifesaver. Thanks that did it.

      While I'm at it I really appreciate you and all the other people on the forum that take the time to answer questions.



      This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

      This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.