Announcement

Collapse
No announcement yet.

Multiple Attribute Templates with Swatches

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

    Multiple Attribute Templates with Swatches

    Odd thing going on. I've gone through the forum and some fixes worked, others didn't. I am playing with this on my dev site: http://dts3568.mivamerchantdev.com/p...-number-1.html

    I've taken off u-hidden on the drop downs so that I could see better what was going on. Seems if you just work with the drop downs and make a selection on each, all goes well. But, if you happen to click a binding image afterward, you'll see that the Select Fabric Color shows the Binding color when it should retain the fabric color.

    It adds to the cart just fine, but it is confusing that on the page that Select Fabric Color shows the binding color text.

    Prior to all my changes, it did the same thing. It appears that all my changes have only make the display more aesthetic. And, as far as aesthetics, can't seem to move the drop/down and Select Whatever sections above each of the attributes.

    Been banging my head on the desk. Hopefully, it is just me being boggle minded.

    Thanks,

    Jamie
    Last edited by jsdva; 01-26-21, 12:10 PM. Reason: More concise title
    Jamie Donaldson
    JSDVS Web Design / Development
    Web Design | Web Development | E-commerce Design & Integration

    #2
    Hi Jamie,

    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.
    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
      Originally posted by Matt Zimmermann View Post
      Hi Jamie,

      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.
      Not quite sure how to do that Matt.

      I followed an old post that should have gotten me somewhere close, but...I don't recall something like that being explained. https://www.miva.com/forums/forum/on...-for-a-product

      Any help is appreciated.

      Jamie
      Jamie Donaldson
      JSDVS Web Design / Development
      Web Design | Web Development | E-commerce Design & Integration

      Comment


        #4
        Hi Jamie,

        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


          #5
          Okay. I'll try it, and let you know how it turns out.
          Jamie Donaldson
          JSDVS Web Design / Development
          Web Design | Web Development | E-commerce Design & Integration

          Comment


            #6
            Originally posted by Matt Zimmermann View Post
            Hi Jamie,

            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.
            Well, that change wiped out my images. Switched it back to swatches. Gave me back my images. Moved the labels/inputs above their respective swatches. Commented out: <span data-hook="attribute-swatch-name">&nbsp;</span> to keep the binding label from displaying after the label Select Fabric Color....the drop down still shows the selection.

            http://dts3568.mivamerchantdev.com/p...-number-1.html

            Seems to be functioning properly, adds to the cart as it should, no problem.

            Next up, I would like to put the attribute name under each image. Onward to see if this can happen.
            Jamie Donaldson
            JSDVS Web Design / Development
            Web Design | Web Development | E-commerce Design & Integration

            Comment


              #7
              Odd thing with this, when I applied the v10 changes to the PROD page, I lost the swatch images. Reverted back and got the images back.

              https://www.miva.com/assets/template..._10.00.00.html
              Jamie Donaldson
              JSDVS Web Design / Development
              Web Design | Web Development | E-commerce Design & Integration

              Comment


                #8
                Hi Jamie,

                The changes show there are already implemented in Shadows v2, so they should not have to be altered.
                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


                  #9
                  Don't know. I am on v2 of shadows and it wasn't updated.
                  Jamie Donaldson
                  JSDVS Web Design / Development
                  Web Design | Web Development | E-commerce Design & Integration

                  Comment

                  Working...
                  X