Announcement

Collapse
No announcement yet.

customfields

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

    customfields

    In the process of removing our Sebenza Template Manager category and product templates a bunch of little things stopped working and trying to sort some of them out.

    This code use to work but the customfield is no longer showing up on the page. Have there been any major changes that might account for these missing customfields?

    Code:
    <mvt:if expr="NOT ISNULL l.settings:category:customfield_values:customfields:cat_summary">
        <div class="cat_summary"> 
            <span class="dropt">category summary 
                      <span style="width:280px;">&mvt:category:customfield_values:customfields:cat_summary;</span> 
            </span> 
        </div>
    </mvt:if>

    #2
    Re: customfields

    Make sure the category custom field is selected for that category (under Catalog Categories)...depending on where you use them, you might need to call them directly with :

    <mvt:item name="customfields" param="Read_Category_Code( 'category_code', 'custom_field_code', l.settings:customfields )" />
    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
      Re: customfields

      >Make sure the category custom field is selected for that category

      I thought of that but I must be doing something wrong. While the custom field exists if I look under custom fields, and it is a type Category Field, it does not show on the CTGY page in the customfield selection box.

      Comment


        #4
        Re: customfields

        Those point and click custom fields selections are for the products assigned for the category and work in the Product List template of the CTGY page. That's why you need to call the Category Custom Fields yourself.
        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


          #5
          Re: customfields

          For whatever reason it seems the change over from the Sebenza templates broke several customfields. I tinkered with the code you posted and finally used PCINET Tool Belt code. I'll have to see what else has gone missing on the site.

          I appreciate your always taking the time to answer the questions of this perpetual novice.
          Last edited by habreu; 07-14-15, 09:27 AM.

          Comment


            #6
            Re: customfields

            So I'm trying to wrap my head around this example given
            Code:
            <mvt:item name="customfields" param="Read_Category_Code( 'teams', 'dodgers, angels', g.Custom_Fields )" />
            &mvte:global:Custom_Fields:dodgers;
            &mvte:global:Custom_Fields:angels;
            I'm trying to display a category custom field on every category page template if that field is not empty. I don't want to have to enter in every category for the site. What would I use instead of a category code?
            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

            Comment


              #7
              Re: customfields

              Every parameter can be a string (wrapped in single quotes) or a variable.

              You would do something like this:

              Code:
              <mvt:item name="customfields" param="Read_Category_Code( g.Category_Code, 'dodgers, angels', g.Custom_Fields )" />
              Brennan Heyde
              VP Product
              Miva, Inc.
              [email protected]
              https://www.miva.com

              Comment


                #8
                Re: customfields

                I have tried 3 different things (and I have made sure that the custom field is assigned) and none of them are working

                Code:
                <mvt:if expr="NOT ISNULL l.settings:category:customfield_values:customfields:YouTube">&mvt:category:customfield_values:customfields:YouTube;
                </mvt:if>
                
                
                <mvt:if expr="NOT ISNULL l.settings:cattree_categories:customfield_values:customfields:YouTube">			
                 &mvt:cattree_categories:customfield_values:customfields:YouTube;
                </mvt:if>
                
                
                <mvt:item name="customfields" param="Read_Category_Code( g.Category_Code, 'YouTube', g.Custom_Fields )" />
                &mvte:global:Custom_Fields:YouTube;
                Leslie Kirk
                Miva Certified Developer
                Miva Merchant Specialist since 1997
                Previously of Webs Your Way
                (aka Leslie Nord leslienord)

                Email me: [email protected]
                www.lesliekirk.com

                Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                Comment


                  #9
                  Re: customfields

                  I believe that this:

                  <mvt:item name="customfields" param="Read_Category_Code( g.Category_Code, 'YouTube', g.Custom_Fields )" />
                  &mvte:global:Custom_Fields:YouTube;

                  Needs to be first. Category custom fields don't have a "enable" button. They have to be read manually.
                  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


                    #10
                    Re: customfields

                    One small tweak to that above. When you have a single custom field, its value is saved in whatever variable you pass in.

                    So it would be this:

                    Code:
                    <mvt:item name="customfields" param="Read_Category_Code( g.Category_Code, 'YouTube', g.youtube )" />
                    &mvte:global:youtube;
                    Brennan Heyde
                    VP Product
                    Miva, Inc.
                    [email protected]
                    https://www.miva.com

                    Comment


                      #11
                      Re: customfields

                      Thanks Brennan, in my case I had to change it to &mvt:global:youtube; since I'm using the field to enter the YouTube iframe code.

                      I'd say this is one of those keeper snippets of code.
                      Leslie Kirk
                      Miva Certified Developer
                      Miva Merchant Specialist since 1997
                      Previously of Webs Your Way
                      (aka Leslie Nord leslienord)

                      Email me: [email protected]
                      www.lesliekirk.com

                      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                      Comment

                      Working...
                      X