Announcement

Collapse
No announcement yet.

Custom Fields / Product Page

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

    Custom Fields / Product Page

    Okay, what I am trying to do below. I have two custom fields: highlightTag (shows a graphic by the product name if that custom field has something in it) and longname (longname replaces the product name if that custom field has something in it....used with long product names).

    1. See if a product has the custom fields of both highlightTag and longname. If yes, display both of them instead of the standard Miva product name.
    2. If not #1, check to see if it has just highlightTag. If yes, display the highlightTag and the standard product name.
    3. If not #1 or #2, just display the standard product name.

    Below is what I've got and where I've stopped. Bleary eyed now. I've tried all kinds of different scenarios with the custom fields and Miva doesn't like any of them so far, so I know somewhere I keep messing it up. I've not tried to combine two custom fields into one section at a time before until now. So, forgive my ignorance.

    Code:
    <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:highlightTag;,longname">
                         <h4>&mvt:product:customfield_values:customfields:longname; &nbsp; <span class="ico"><img src="graphics/00000001/images/&mvt:product:customfield_values:customfields:highlightTag;.png" alt="&mvt:product:customfield_values:customfields:highlightTag;" /></span></h4>
                <mvt:else>
                <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:highlightTag">
                        <h4 class="title">&mvt:product:name; &nbsp; <span class="ico"><img src="graphics/00000001/images/&mvt:product:customfield_values:customfields:highlightTag;.png" alt="&mvt:product:customfield_values:customfields:highlightTag;" /></span></h4>
                <mvt:else>
                    <h4 class="title">&mvt:product:name;</h4>
                </mvt:if>
    Yep, they are assigned to the product page and all work separately. Plus all custom fields have stuff in them on the product.

    Any help you can give is very greatly appreciated

    Jamie
    Last edited by jsdva; 09-28-14, 11:12 AM. Reason: more info
    Jamie Donaldson
    JSDVS Web Design / Development
    Web Design | Web Development | E-commerce Design & Integration

    #2
    Re: Custom Fields / Product Page

    Try something like this:

    Code:
    <mvt:if expr="l.settings:product:customfield_values:customfields:highlightTag AND l.settings:product:customfield_values:customfields:longname">
    
    <mvt:elseif expr="l.settings:product:customfield_values:customfields:highlightTag">
    
    <mvt:else>
    
    </mvt:if>
    You can also transition to the new custom field capabilities which don't require the field be assigned to a given page/template:
    http://www.mivamerchant.com/videos/a...-documentation

    Comment


      #3
      Re: Custom Fields / Product Page

      Well, that worked Dan, it shows both longname and highlightTag custom fields are filled in on the product.

      Your help is so greatly appreciated!

      Jamie
      Last edited by jsdva; 09-29-14, 06:15 AM. Reason: checked again and worked!
      Jamie Donaldson
      JSDVS Web Design / Development
      Web Design | Web Development | E-commerce Design & Integration

      Comment

      Working...
      X