/** * Displays a product option's fees. * * @param int $option_id Product option ID. * * @return void */ public function action_index($option_id = null) { $option = $this->get_option($option_id); $fees = Service_Product_Option_Fee::find(array('option' => $option)); $this->view->product = $option->product; $this->view->option = $option; $this->view->fees = $fees; }
/** * Gets one or more product option fees. * * @param int $option_id Product option ID. * @param int $id Product option fee ID. * * @return void */ public function get_index($option_id = null, $id = null) { $option = $this->get_option($option_id); if (!$id) { $fees = \Service_Product_Option_Fee::find(array('option' => $option)); } else { $fees = $this->get_fee($id, $option); } $this->response($fees); }