5 Replies Latest reply on Oct 14, 2014 4:21 AM by gcpa

    Help needed with customizing {tag_attributes}


      I've tried searching for information on how best to customize {tag_attributes} but not finding much help so hoping someone can help on here.


      I would like to know if it is possible and if so how to do the following.


      1/ For a mandatory product attribute with a drop down list (or radio button) how do I automatically select the first option.  I assume I use javascript to achieve this but I don't know how you select the correct elements.  Has anyone some example code?


      2/ When an option is selected (not mandatory) which has am additional price how do I recalculate and show the product total?


      3/ Can the tag_attributes style be configured (I assume with css) can anyone provide a simple example I could follow?


      Would appreciate anyone's help on this.





        • 1. Re: Help needed with customizing {tag_attributes}
          Liam Dilley Adobe Community Professional & MVP

          Hey Gavin.


          1. You have these options: {tag_attributes, horizontal, hideDisabledVariations, autoSelectFirstVariation} So you can set it - {tag_attributes,false,false,true}

          2. You will need to do this with javascript

          3. You just need to inspect the markup of attributes and target them accordingly. This is just CSS so how to do CSS is a google away.

          • 2. Re: Help needed with customizing {tag_attributes}
            gcpa Level 1

            Hi Liam,


            In regards to point 1.  I tried that but it didn't work - even with inventory switched on.





            • 3. Re: Help needed with customizing {tag_attributes}
              Liam Dilley Adobe Community Professional & MVP

              Look at site with this and It is working for me. check how you have it.

              • 4. Re: Help needed with customizing {tag_attributes}
                gcpa Level 1



                I have used exactly: {tag_attributes,false,false,true}


                I do see the behavior change but only in that the options are now listed horizontally.  According to the documentation this should only happen if the first parameter was set to true.




                EDIT: If it helps I am simply using the default OXO3 template and the tag is being placed in Individual Product Large.  I have also tried {tag_attributes,,,true}.

                • 5. Re: Help needed with customizing {tag_attributes}
                  gcpa Level 1

                  Okay I have made it work but I think the solution is not desirable and I hope there is another way.


                  It was only after I created product variations did configuring tab_attributes work.  What isn't desirable is the need to maintain a stock level of something that's an option that has no stock levels associated with it.


                  It would be much simpler for default selection to work without the need for inventory and creating product variations.


                  Therefore is there another way?  Or some way of specifying infinite stock levels?


                  Also despite the first parameter being false the options are listed horizontally.


                  Basically {tag_attributes} seems to be a right mess in it's implementation to me.  It's certainly not simple to use!