• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Help needed with customizing {tag_attributes}

Community Beginner ,
Oct 14, 2014 Oct 14, 2014

Copy link to clipboard

Copied

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.

Thanks

Gavin

TOPICS
Documentation

Views

458

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 14, 2014 Oct 14, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 14, 2014 Oct 14, 2014

Copy link to clipboard

Copied

Hi Liam,

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

Thanks

Gavin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 14, 2014 Oct 14, 2014

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 14, 2014 Oct 14, 2014

Copy link to clipboard

Copied

Liam,

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.

Gavin

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}.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 14, 2014 Oct 14, 2014

Copy link to clipboard

Copied

LATEST

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!

Thanks

Gavin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines