I create one configurable product and create 5 Associative products for that configurable product and I create two custom options for one product. After,give values to options and I add that product to shopping cart and I got the following Error in cart page
I have used following code to get custom options:
if($option->getDefaultTitle()== "Measurement" && $input_type =="drop_down") {
echo '<div class="input-box">';
echo '<select id="drop" name="options['.$option->getId().']" title="" ><option value="">select</option><option value="2" price="0">Feet </option><option value="1" price="0">Mtr </option></select>';
echo '<input class="validate-one-required-by-name" type="'.$input_type.'" name="options['.$option->getId().']" value=""/>';
echo '</div>';
}
Best Answer
Please use the following code to get the options of select dropdown