Announcement

Collapse
No announcement yet.

Toolkit support for how long or can a dynamic nav be replaced without toolkit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Toolkit support for how long or can a dynamic nav be replaced without toolkit

    Our store uses a lot of toolkit functions including building dynamic custom navigations for our deep level categories. I am using parentcat and subcat functions of toolkit to display a custom navigation in such way that it will only display the parent category and it child categories of a particular category no matter what level it is. So for example:

    Parent: Gifts for Pet Lovers
    Sub Cat Level 1: T-Shirts & Accessories
    Sub Cat Level 2: Stickers
    Sub Cat Level 2: Tees
    Sub Cat Level 3: Dogs
    Sub Cat Level 3: Cats
    Sub Cat Level 3:Birds​​​​​​​ ​​​​​​​
    Sub Cat Level 2: Hats
    Sub Cat Level 2: Keychains

    Parent: Pet Bakery
    Sub Cat Level 1: Everyday Treats
    Sub Cat Level 1: Seasonal Treats
    Sub Cat Level 2: Summer
    Sub Cat Level 2: 4th of July
    Sub Cat Level 1 Cookies
    Sub Cat Level 1: Cakes

    So currently we have set it up in such way is no matter what category page you are on under gifts for pet lovers, the entire parent menu with its sub categories are displayed and no other categories on these pages. Is this possible without using toolkit.

    Thanks
    ​​​​​​​
    ​​​​​​​
    ​​​​​​​​​​​​​​

    Keyboard Not Found..... Press F1 to continue

    #2
    You could use the CategoryList_Load_All function to get all the categories in the store. In the array there is a depth variable that you can check to see what level the category so it can be styled as needed:

    HTML Code:
    <mvt:do name="l.settings:category_count" file="g.Module_Library_DB" value="Runtime_CategoryList_Load_All( l.settings:categories_list )" />
    <mvt:foreach iterator="category" array="categories_list">
                   Level &mvt:category:depth;- &mvt:category:name;<br>
    </mvt:foreach>
    Nicholas Adkins
    Technical Training Specialist / Miva, Inc.
    [email protected]
    https://www.miva.com/mivalearn

    Comment


      #3
      Hi Nick,

      When I use this code in a content theme component and add it to CTGY page, it displays all the categories in the but at same time does not display the products assigned to that category.

      Thanks.
      Keyboard Not Found..... Press F1 to continue

      Comment


        #4
        To get the products assigned you could do something like this:

        HTML Code:
        HTML Code:
        <mvt:do name="l.settings:category_count" file="g.Module_Library_DB" value="Runtime_CategoryList_Load_All( l.settings:categories_list )" />
             <mvt:foreach iterator="category" array="categories_list">
                  <mvt:do file="g.Module_Library_DB" name="l.success" value="CategoryXProduct_Load_Category(l.settings:c ategory:id, l.settings:categoryxproduct)" />
                  Level &mvt:category:depth;- &mvt:category:name;<br>
                  <mvt:foreach iterator="cat_product" array="categoryxproduct">
                       <mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_ID(l.settings:cat_product:prod uct_id, l.settings:product )" />
                       -- &mvt:product:name;
                  </mvt:foreach>
             </mvt:foreach>
        Nicholas Adkins
        Technical Training Specialist / Miva, Inc.
        [email protected]
        https://www.miva.com/mivalearn

        Comment

        Working...
        X