public function executeNsPrice(sfWebRequest $request) { $part_no = rawurldecode($request->getParameter('part_no')); $agent = new CCSearchAgent($part_no); if ($data = $agent->fetchStorePricing()) { $json = json_encode($data); } else { $json = NULL; } $response = $this->getResponse(); $response->setContentType('application/json'); $response->sendHttpHeaders(); return $this->renderText($json); }