<td> <?php if (isset($poption->type) && ($poption->type == 'select' || $poption->type == 'radio' || $poption->type == 'checkbox')) { ?> <?php echo J2StorePopup::popup("index.php?option=com_j2store&view=products&task=setproductoptionvalues&product_id=" . $this->item->j2store_product_id . "&productoption_id=" . $poption->j2store_productoption_id . "&layout=productoptionvalues&tmpl=component", JText::_("J2STORE_OPTION_SET_VALUES"), array()); ?> <?php } ?> </td> <td> <?php $parent_options = J2StoreHelperSelect::getParentOption($poption->j2store_productoption_id, $poption->parent_id, $poption->option_id); echo J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[item_options][' . $poption->j2store_productoption_id . '][parent_id]')->value($poption->parent_id)->setPlaceHolders($parent_options)->attribs(array('class' => 'input-small'))->getHtml(); ?> </td> <td> <?php if (isset($poption->type) && !in_array($poption->type, array('select', 'radio', 'checkbox'))) { ?> <?php if (isset($poption->parent_id) && !empty($poption->parent_id)) { ?> <?php echo J2StorePopup::popup("index.php?option=com_j2store&view=products&task=setparentoptionvalues&productoption_id=" . $poption->j2store_productoption_id . "&layout=parentproductopvalues&tmpl=component", JText::_("J2STORE_OPTION_PARENT_OPTION_VALUES"), array()); ?> <?php