Is there a way to use a color name to display an attribute color swatch instead of having to create an image swatch?
Announcement
Collapse
No announcement yet.
Attribute Swatch Colors
Collapse
X
-
Attribute Swatch Colors
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: Twitter | Facebook | FourSquare | Pinterest | Flickr
Tags: None
-
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
-
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: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
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
-
Originally posted by Matt Zimmermann View PostHi 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.
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: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
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
-
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: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
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
-
Originally posted by Bruce - PhosphorMedia View PostI'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.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: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
Comment