Announcement

Collapse
No announcement yet.

Parent Category of Product > childof

Collapse
X
 
  • 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

    Code:
    <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>
    </mvt:if>
    but it seems to go too far up the tree. So if I have this

    SFNT
    --CTGY 1
    ---Sub Ctgy 1
    ----Sub Sub Ctgy 1
    -----Prod1
    --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.

    #2
    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">
       &mvt:category:active;<br>
       &mvt:category:code;<br>
       &mvt:category:id;<br>
       &mvt:category:name;<br>
    
    </mvt:foreach>
    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
    phosphormedia.com

    Comment


      #3
      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.

      Comment

      Working...
      X