php - WP Woocommerce - Create a select dropdown with attributes for a user uploadform. -


i have site users can uploa dproducts themself woocommerce. im using meta keys in uploader set size, gender , other choices products. however, filer plugins uses attributes , taxomonys filter product, , im looking way add woo attributes trough uploader via dropdowns , checkboxes. possible?

two example im using - dropdown categories , 1 textfield input field metakey.

categories:

case 'post_categories':                 $options = userpro_publish_categories($args);                 $res .= "<select name='".$key.'-'.$i.'[]'."' multiple='multiple' class='chosen-select' data-custom-error='".__('please choose category @ least','userpro')."' data-required='".$args['require_category']."' data-placeholder='".$placeholder."'>";                 foreach($options $k=>$v) {                     if (strstr($k, 'optgroup_b')) {                         $res .= "<optgroup label='$v'>";                     } elseif (strstr($k, 'optgroup_e')) {                         $res .= "</optgroup>";                     } else {                         $res .= "<option value='$k'>$v</option>";                     }                 }                 $res .= "</select>";                 break; 

text meta key:

case '_bank_details':                 $res .= "<input data-required='".$args['require_'.$key]."' type='text' name='$key-$i' id='$key-$i' value='".$user_bank."' placeholder='".$placeholder."' />";                 break; 

how create somethings similar, woo attributes?


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -