3

I would like when we create a new configurable product the checkbox is checked by default

Super product attribute checkbox

But, I've found in the .phtml

<input id="__id___label_use_default" type="checkbox" value="1" " checked="use_default" class="attribute-use-default-label">

I would like know where is defined the value use_default?

Thanks, for your help.

3

I've found my solution in /js/mage/adminhtml/product.js after

 var label_readonly = '';
 var use_default_checked = '';
 if (attribute.use_default == '1') {
     use_default_checked = ' checked="checked"';
     label_readonly = ' readonly="readonly"';
 }

I've add this :

 else if (attribute.use_default == null) {
         use_default_checked = ' checked="checked"';
         label_readonly = ' readonly="readonly"';
 }

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.