<tr> <td colspan="3" align="right"><input type="button" value="Add Variant" class="infoBoxButton" onclick="addVariant();" /></td> </tr> <tr> <td width="30%" valign="top"> <select name="variantGroups" ondblclick="moreFields();" size="20" style="width: 100%;"> <?php $Qvgroups = $osC_Database->query('select id, title, module from :table_products_variants_groups where languages_id = :languages_id order by sort_order, title'); $Qvgroups->bindTable(':table_products_variants_groups', TABLE_PRODUCTS_VARIANTS_GROUPS); $Qvgroups->bindInt(':languages_id', $osC_Language->getID()); $Qvgroups->execute(); $has_multiple_value_groups = false; while ($Qvgroups->next()) { $vgroup_title = $Qvgroups->value('title'); if (osC_Variants::allowsMultipleValues($Qvgroups->value('module'))) { if ($has_multiple_value_groups === false) { $has_multiple_value_groups = true; } $vgroup_title .= ' (*)'; } echo ' <optgroup label="' . $vgroup_title . '" id="' . $Qvgroups->valueInt('id') . '">' . "\n"; $Qvvalues = $osC_Database->query('select id, title from :table_products_variants_values where products_variants_groups_id = :products_variants_groups_id and languages_id = :languages_id order by sort_order, title'); $Qvvalues->bindTable(':table_products_variants_values', TABLE_PRODUCTS_VARIANTS_VALUES); $Qvvalues->bindInt(':products_variants_groups_id', $Qvgroups->valueInt('id')); $Qvvalues->bindInt(':languages_id', $osC_Language->getID()); $Qvvalues->execute(); while ($Qvvalues->next()) { echo ' <option value="' . $Qvvalues->valueInt('id') . '">' . $Qvvalues->value('title') . '</option>' . "\n"; } echo ' </optgroup>' . "\n";