Announcement

Collapse
No announcement yet.

Attribute Prompt Links

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

    Attribute Prompt Links

    Hello. I would like to have a link for some of our attributes, so people could click and see what the options actually are, get more details etc. The prompt field doesn't seem to accept accept html like some other fields do, is there a way of doing this? Note this is mainly for the attribute template prompt.

    Thanks.
    Leon Gross
    www.soundlabsgroup.com.au

    #2
    I have a client that recently needed the same thing. The way we did it was set up a line by line list of prompts and links in a custom product field that we read and turn into an array, and then as the attribute template rolls along we do a miva_array_search(..) for the current attribute prompt and if it's found the prompt is outputted as a link to the associated url. You could also do this on a global level by using a readytheme content section or a category custom field or a page custom field (seo fields), it's a flexible idea.

    The only thing the client I mentioned doesn't like about he system above is he needs to do it to almost every product so we're in the process of making a module we're calling Attributes Plus that makes it easier to do things like this.
    M.A.D.* since 1997

    http://www.scotsscripts.com

    *miva application developers

    Comment


      #3
      On the PROD template under product attributes template, you can find the code for the type of attribute you have, like text or radio and look for the label or other section that you want to update, and replace this

      Code:
            <label class="c-form-label &mvt:required_attribute_classes;" for="&mvte:attribute_ID;" title="&mvte:attribute:prompt;">&mvte:attribute:prompt;</label>
      with this -

      Code:
      <mvt:if expr="l.settings:attribute:code EQ 'ATTRIBUTE-CODE'">
               <label class="c-form-label &mvt:required_attribute_classes;" for="&mvte:attribute_ID;" title="&mvte:attribute:prompt;">&mvte:attribute:prompt;</label> <a href="your link">link text</a>
      <mvt:else>
                <label class="c-form-label &mvt:required_attribute_classes;" for="&mvte:attribute_ID;" title="&mvte:attribute:prompt;">&mvte:attribute:prompt;</label>
      </mvt:if>

      Comment

      Working...
      X