/** * Receive option value based on option type * * @param ProductCustomOptionInterface $option * @return null|string */ protected function getOptionRequestValue(ProductCustomOptionInterface $option) { $returnValue = null; switch ($option->getType()) { case 'field': $returnValue = 'Test value'; break; case 'date_time': $returnValue = '2015-09-09 07:16:00'; break; case 'drop_down': $returnValue = '3-1-select'; break; case 'radio': $returnValue = '4-1-radio'; break; } return $returnValue; }