Announcement

Collapse
No announcement yet.

Inactive categories showing up on catalog page

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

    Inactive categories showing up on catalog page

    Problem with our-catalog.html page. It is showing inactive categories. The only way to remove them from that page is to delete them. However I will need them later down the road. And does not seem like a catalog page should work like this.

    #2
    In your CTLG page code, replace
    Code:
    <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code(l.settings:parent:code, l.settings:catalog)" />
    with
    Code:
    <mvt:do name="l.result" file="g.Module_Library_DB" value="Runtime_Load_Category_Code(l.settings:parent:code, l.settings:catalog)" />
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Thanks for the response Matt. Did that and now nothing shows at all. Below is small part of that page but you can see where I replaced it. On the CTLG

      <section class="o-layout u-grids-2 u-grids-3--l x-product-list">
      <mvt:do name="l.result" file="g.Module_Library_DB" value="CategoryList_Load_Parent('', l.settings:parent_categories)" />
      <mvt:foreach iterator="parent" array="parent_categories">
      <mvt:assign name="l.settings:catalog_item" value="''" />
      <mvt:do name="l.result" file="g.Module_Library_DB" value="Runtime_Load_Category_Code(l.settings:paren t:code, l.settings:catalog)" />
      <mvt:do name="l.module_loaded" file="g.Module_Library_DB" value="Module_Load_Code('cmp-cssui-cattree', l.module)" />
      <mvt:if expr="l.module_loaded">
      <mvt:do name="l.result" file="g.Module_Root $ l.module:module" value="CSSUI_CatTree_Load(l.settings:catalog:id, l.settings:catalog_item)" />
      </mvt:if>
      <mvt:do file="g.Module_Feature_URI_UT" name="l.settings:catalog:link" value="Store_Category_URL(l.settings:catalog, NULL)" />
      <div class="o-layout__item u-text-center x-product-list__item">
      <a class="u-block x-product-list__link" href="&mvte:catalog:link;">
      <figure class="x-product-list__figure">
      <mvt:if expr="l.settings:catalog_item:image">
      <img class="x-product-list__image" src="&mvt:catalog_item:image;" alt="&mvt:catalog:name;">
      </mvt:if>
      <figcaption>

      Comment


        #4
        Well...it looks like I had a typo in that and called the wrong function as well. Sorry about that.

        Here's the correct code for the CTLG page:
        Code:
        <mvt:item name="html_profile" />
        <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <base href="&mvt:global:basehref;">
            <mvt:if expr="NOT ISNULL l.settings:page:title">
                <title>&mvt:page:title;</title>
            <mvt:else>
                <title>&mvt:store:name;: &mvt:page:name;</title>
            </mvt:if>
            <mvt:item name="head" param="css_list" />
            <mvt:item name="head" param="head_tag" />
        </head>
        <body id="js-&mvte:page:code;" class="o-site-wrapper t-page-&mvt:global:pageClass;">
            <mvt:item name="hdft" param="global_header" />
        
            <section class="o-layout o-layout--column-reverse o-layout--row-reverse--l">
                <div class="o-layout__item u-width-12 u-width-9--l">
                    <section class="o-layout">
                        <div class="o-layout__item">
                            <h1 class="c-heading-delta u-text-bold u-text-uppercase">&mvte:page:name;</h1>
                            <hr class="c-keyline">
                        </div>
                    </section>
        
                    <section class="o-layout">
                        <div class="o-layout__item">
                            <mvt:item name="hdft" param="header" />
                        </div>
                    </section>
        
                    <section class="o-layout u-grids-2 u-grids-3--l x-product-list">
                        <mvt:do name="l.result" file="g.Module_Library_DB" value="Runtime_CategoryList_Load_Parent('', l.settings:parent_categories)" />
                        <mvt:foreach iterator="parent" array="parent_categories">
                            <mvt:assign name="l.settings:catalog_item" value="''" />
                            <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code(l.settings:parent:code, l.settings:catalog)" />
                            <mvt:do name="l.module_loaded" file="g.Module_Library_DB" value="Module_Load_Code('cmp-cssui-cattree', l.module)" />
                            <mvt:if expr="l.module_loaded">
                                <mvt:do name="l.result" file="g.Module_Root $ l.module:module" value="CSSUI_CatTree_Load(l.settings:catalog:id, l.settings:catalog_item)" />
                            </mvt:if>
                            <mvt:do file="g.Module_Feature_URI_UT" name="l.settings:catalog:link" value="Store_Category_URL(l.settings:catalog, NULL)" />
                            <div class="o-layout__item u-text-center x-product-list__item">
                                <a class="u-block x-product-list__link" href="&mvte:catalog:link;">
                                    <figure class="x-product-list__figure">
                                        <mvt:if expr="l.settings:catalog_item:image">
                                            <img class="x-product-list__image" src="&mvt:catalog_item:image;" alt="&mvt:catalog:name;">
                                        </mvt:if>
                                        <figcaption>
                                            <strong class="x-product-list__name u-text-uppercase">&mvte:catalog:name;</strong>
                                        </figcaption>
                                    </figure>
                                </a>
                            </div>
                        </mvt:foreach>
                    </section>
        
                    <section class="o-layout">
                        <div class="o-layout__item">
                            <mvt:item name="hdft" param="footer" />
                        </div>
                    </section>
                </div>
                <aside class="o-layout__item u-width-12 u-width-3--l">
                    <mvt:item name="category_tree" />
                    <mvt:item name="facets" />
                </aside>
        
            </section>
            <mvt:item name="hdft" param="global_footer" />
        </body>
        </html>
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #5
          Thank you so much Matt. It is working as expected now. Appreciate your help.

          Comment


            #6
            Am trying to get an image for each catalog category showing by having a an image uploaded on the CTGY for category title. The CTLG page does have image references in the code. However the page says catalog image vs category image. Have changed the catalog to say category and done some other changes but not having any luck. Is it a simple change or does it require rewriting a lot of the code? Also can you point me to the color.css file? Am trying to change button color and cannot find that file. theme/css file when I changed the color nothing happened.

            Comment


              #7
              The catalog page will pull the category tree images for the categories if they are uploaded. As for the colors code, you can copy those from core/css/utilities/colors.css and update your theme-styles.css file as needed.
              Matt Zimmermann

              Miva Web Developer
              Alchemy Web Development
              https://www.alchemywebdev.com
              Site Development - Maintenance - Consultation

              Miva Certified Developer
              Miva Professional Developer

              https://www.dev4web.net | Twitter

              Comment

              Working...
              X