1

Hi Could someone help me with the following,

In Add new products page, I have an attribute 'code generate' with a dropdown list of values Yes, No. I need to show additional attribute fields such as 'name' and 'number of codes' if user selects Yes for the field 'code generate'.

All the additional attributes have already been created. I just want to know how to load other attributes based on Yes or No of the field 'code generate'

Thank you.

0

This would need some javascripting as this is not possible with Magento's configuration alone.

They way I would do this is to make:

  • one attribute with yes or no as an option.
  • one attribute with a number of codes.

Display both normally but hide the second one in the template files using CSS (display:none;)

Then, add some javascript code to read the value of the first select attribute with a click event. If the read value is Yes, then display the second dropdown. If no then hide again.

I hope this helps a bit

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.