Color swatch code is not generating an image source.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jesse
    Mini Mivite

    • Jul 2012
    • 52

    #1

    Color swatch code is not generating an image source.

    To begin, I do not have advanced technical knowledge. I'm trying to implement swatches on some products. The video tutorial didn't work. I've just implemented this Miva Blog Post. This caused the product page to display 4 boxes for my 4 colors, but with the prompt text showing, not the color. An outline appears with "Red" or "Blue" in it. So then I looked at the HTML, and the line for the image is <img src="" alt="Red" title="Red" class="swatches"> The images exist and everything in the previously linked blog post was done exactly.

    TIA for any help.
  • Brennan
    Super Moderator









    • Jun 2009
    • 3481

    #2
    Re: Color swatch code is not generating an image source.

    would you mind posting a link to the page or send me a message with it, I can point you in the right direction
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment

    • Jesse
      Mini Mivite

      • Jul 2012
      • 52

      #3
      Re: Color swatch code is not generating an image source.

      Thanks, but I actually managed to fix it. The addition suggested in the blog post I linked to was slightly off for my site.

      <mvt:elseif expr="l.settings:attribute:type EQ 'select'"> <mvt:foreach iterator="option" array="attribute:options"> <img src="&mvte:attribute:image;" alt="&mvte:option:prompt;" title="&mvte:option:prompt;" class="swatches" /> </mvt:foreach> <select name="Product_Attributes[&mvt:attribute:index;]:value">

      In the third line, I replaced "&mvte:attribute:image" with "&mvte:option:image" and the images were displayed correctly.

      Comment

      Working...
      X