Announcement

Collapse
No announcement yet.

Attribute Swatch Colors

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

    Attribute Swatch Colors

    Is there a way to use a color name to display an attribute color swatch instead of having to create an image swatch?
    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: X | Facebook | Pinterest

    #2
    Hi Leslie,

    You could probably use some CSS magic to control a SPAN tag and fill it with the background color of the swatch name. The only sticky part about this would be the swatch name would have to be a named CSS color [ https://www.w3schools.com/cssref/css_colors.asp ].
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Yeah, I was curious as to what the commented out code in the scripts.js file that mentions swatchColor and has a ton of color names and hex codes for them.
      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: X | Facebook | Pinterest

      Comment


        #4
        Hi Leslie,

        That was holdover code from Suivant. It applied an outline of the appropriate color to the swatch when it was selected if the code matched one of the color codes.
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #5
          Originally posted by Matt Zimmermann View Post
          Hi Leslie,

          That was holdover code from Suivant. It applied an outline of the appropriate color to the swatch when it was selected if the code matched one of the color codes.
          LOL, okay. Nevermind. Maybe this can be a 2.0 wish list item
          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: X | Facebook | Pinterest

          Comment


            #6
            couldn't you do it using class names and corresponding selector definitions like .almostBlue { background: #0000FA; width:20px;height:10px } and <span class="almostBlue"></span>
            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


              #7
              Enter the class name in the swatch image field for the attribute?
              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: X | Facebook | Pinterest

              Comment


                #8
                I'm not sure if there is a way to do this through image machine, I was thinking more of just using attribute templates...but then I'm old school as in it would be faster for me to implement via attribute code and my own jQuery than to figure out where the bones are buried in image-machine :)

                If this was feasible through image machine, i'd assume Matt would chime in.
                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


                  #9
                  Originally posted by Bruce - PhosphorMedia View Post
                  I'm not sure if there is a way to do this through image machine, I was thinking more of just using attribute templates...but then I'm old school as in it would be faster for me to implement via attribute code and my own jQuery than to figure out where the bones are buried in image-machine :)

                  If this was feasible through image machine, i'd assume Matt would chime in.
                  I was referring to the Attributes - the field where you upload the image through.
                  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: X | Facebook | Pinterest

                  Comment

                  Working...
                  X