public function getToLocations($_whlocation_id = '', $_whaction_id = '') { // used by ajax to get a list of locations for a given WH Action and From Location if (isset($this->_data['ajax'])) { if (!empty($this->_data['whlocation_id'])) { $_whlocation_id = $this->_data['whlocation_id']; } if (!empty($this->_data['whaction_id'])) { $_whaction_id = $this->_data['whaction_id']; } } $transfer_rule = new WHTransferrule(); $locations = $transfer_rule->getToLocations($_whaction_id, $_whlocation_id); if (isset($this->_data['ajax'])) { $this->view->set('options', $locations); $this->setTemplateName('select_options'); } else { return $locations; } }