Announcement

Collapse
No announcement yet.

Swatch Attribute Bug, Shadows ReadyTheme (Probably Others)

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

    Swatch Attribute Bug, Shadows ReadyTheme (Probably Others)

    I'm running into an issue and not having luck with support where the swatch attribute isn't working WHEN TWO SEPARATE ATTRIBUTES USE SWATCHES AT THE SAME TIME. I've seen this present in the past and can't locate the fix Miva provided me via email. I've included a screenshot of what is happening. It shows "both attribute labels", but all of the swatch images that are supposed to be tied to the 2nd attribute are getting applied to the first instead. In the screenshot, each attribute should have 3 swatch options below their label, but they are all dumping into the one.

    This is a totally fresh install, no edits. In other dev sites we have running, same thing happens. Has to be an issue with an ID not being unique or something? Can't figure it out....

    screenshot-Test.png
    Ted Hust
    AarcMediaGroup.com

    Celebrating 13 Years of Outstanding Service & Support
    Miva Merchant Design

    #2
    Hi Ted,

    By default, Shadows is designed to only work with one "swatch" attribute. While you can use more then one, you will have to make the ID for the swatch element be dynamic and adjust the code accordingly. I would start by changing the swatch element from "swatches" to "swatches-%attribute_code%". This will make a unique ID for the swatch container. I'm not sure if you will have to modify the Head Template code to accommodate this update.
    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
      OK, so In the attribute template, I changed "swatches" to "swatches-&mvt:attribute:code;", that nukes them obviously, when I go into the attribute machine template, the only mention of "swatches" is within the Swatch Element, so not sure how I'd add the attribute code to that so it can differentiate. Had no idea this was only set up to handle a single swatch instance. I have a client that needs two and have had a ticket open for a couple weeks about this. Thanks for replying here.

      EDITED, found it, duh, it's referenced as "swatch" in the template. My fault.
      Ted Hust
      AarcMediaGroup.com

      Celebrating 13 Years of Outstanding Service & Support
      Miva Merchant Design

      Comment


        #4
        So I wasn't able to figure this out. This is for a gig that the client isn't going to want to spend anymore loot having me fix this up. If you guys have anything handy let me know, otherwise I'll just break it to her that she has to use radio checkboxes instead. I played around with it for 30 minutes or so and simply can't figure out how to get it to allow for both to work. If I find the gig where someone at Miva had supplied me a simple fix for this I'll post it here.
        Ted Hust
        AarcMediaGroup.com

        Celebrating 13 Years of Outstanding Service & Support
        Miva Merchant Design

        Comment


          #5
          Hi Ted,

          One way to add a second swatch attribute would be to use radio buttons. You could upload the images for the radio and use CSS to modify the layout [ ]. It may require a bit of editing, but it could work. You might try something like this [ https://github.com/o-sam-o/jquery.select2Buttons ], although the code is pretty old.
          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


            #6
            Personally I'd talk them out having three different style cups with multiple colors of each on the same product :)
            Especially if the plan is to have the correct cup in the correct color image shown?
            I don't think that's doable with two swatch select images even if it did work, but maybe I'm very wrong...
            Mark Hood
            Vermont Gear

            Comment

            Working...
            X