Announcement

Collapse
No announcement yet.

re-post to Custom Fields - Long Product names

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

    re-post to Custom Fields - Long Product names

    I have an if/else statement to display a product name that has more characters than Miva's &mvt:product:name; allows, and if I have that custom field filled in on the product custom field tab. If that field is not filled in, then display the regular product name. In dev, the long product name displayed in the browser. After "live" it will not display.

    Here is the custom field:

    <mvt:if expr="l.settings:product:customfield_values:custom fields:highlightTag AND l.settings:product:customfield_values:customfields :longname">
    <h5>&mvt:product:customfield_values:customfields:l ongname; &nbsp; <span class="ico"><img src="graphics/00000001/images/&mvt:product:customfield_values:customfields:highl ightTag;.png" alt="&mvt:product:customfield_values:customfields: highlightTag;" /></span></h5>
    <mvt:elseif expr="l.settings:product:customfield_values:custom fields:highlightTag">
    <h5 class="title">&mvt:product:name; &nbsp; <span class="ico"><img src="graphics/00000001/images/&mvt:product:customfield_values:customfields:highl ightTag;.png" alt="&mvt:product:customfield_values:customfields: highlightTag;" /></span></h5>
    <mvt:else>
    <h5 class="title">&mvt:product:name;</h5>
    </mvt:if>

    #2
    Re: re-post to Custom Fields - Long Product names

    Are you sure you carried everything over from DEV? The custom fields and the image referenced? If you use your browser's inspector, is anything displaying at all?
    Best,
    Pamela

    Consultant / Developer / Trainer
    Contributing Editor to Practical Ecommerce
    Author of the Official Guides for Miva Merchant
    pamelahazelton.com

    Comment


      #3
      Re: re-post to Custom Fields - Long Product names

      There was nothing to carry over. It was all in the dev and the dev
      overwrites the existing site. The only image in that if/else was carried
      over too, and only displays if that custom field for it is selected on
      the product custom field tag, which for the one product tested, that
      image does not apply.

      Other custom fields display on the PROD screen, and this is what
      displays in the browser:

      <!--Product Name Custom Field Begin -->
      <h5 class="title">Premier 12&quot; Drainable Pouch, Convex Flextend
      Barrier, Pre-Cut 1 1/8&quot; Stoma Size, Transpare</h5>
      <!--Product Name Custom Field End -->

      It is like the custom field is not filled out, since it is showing only
      the &mvt:product:name; truncated of course, because that field only
      accepts so many characters.

      Yes, all custom fields are selected on the Product Display Layout tab too.

      The custom field for the longname is filled out on the product, so it is
      indeed there, and it did display on the dev site. There were no issues
      until the dev became "live".

      Comment


        #4
        Re: re-post to Custom Fields - Long Product names

        Okay, just checking at that part because not everyone overwrites Live with Dev.

        Next step - if you put "XXX" inside the conditional, does it display?
        Best,
        Pamela

        Consultant / Developer / Trainer
        Contributing Editor to Practical Ecommerce
        Author of the Official Guides for Miva Merchant
        pamelahazelton.com

        Comment


          #5
          Re: re-post to Custom Fields - Long Product names

          No, that didn't work. The custom is not displaying.

          Comment


            #6
            Re: re-post to Custom Fields - Long Product names

            Okay, so that starts to narrow it down. If the XXX isn't displaying either, the problem is with the conditional itself. Something had to have changed from the time you worked on this in dev mode and the time it went live.

            Have you tried...

            mvt:if expr="NOT ISNULL...
            Best,
            Pamela

            Consultant / Developer / Trainer
            Contributing Editor to Practical Ecommerce
            Author of the Official Guides for Miva Merchant
            pamelahazelton.com

            Comment


              #7
              Re: re-post to Custom Fields - Long Product names

              Okay....post this now:

              Got it to work without the hightlightTag and just the longname by adding
              another else/if to the conditional.

              Still don't know why it worked in dev and not now as it was, but it
              works now and I am nappy!! I'll deal with it!

              Thank you for all your help Pam!! Solved!

              Comment


                #8
                Re: re-post to Custom Fields - Long Product names

                Glad it worked out for you!
                Best,
                Pamela

                Consultant / Developer / Trainer
                Contributing Editor to Practical Ecommerce
                Author of the Official Guides for Miva Merchant
                pamelahazelton.com

                Comment

                Working...
                X