public function add() { $this->select_type(); $type = $this->get('type'); $cnt = $type->getController(); $e = $cnt->validateKey($this->post()); if ($e->has()) { $this->set('error', $e); } else { $type = AttributeType::getByID($this->post('atID')); StoreProductKey::add($type, $this->post()); $this->redirect('/dashboard/store/products/attributes/', 'success'); } }
public function add() { $this->select_type(); $type = $this->get('type'); $cnt = $type->getController(); $e = $cnt->validateKey($this->post()); if ($e->has()) { $this->set('error', $e); } else { $type = AttributeType::getByID($this->post('atID')); $args = array('akHandle' => $this->post('akHandle'), 'akName' => $this->post('akName'), 'akIsSearchable' => $this->post('akIsSearchable'), 'akIsSearchableIndexed' => $this->post('akIsSearchableIndexed'), 'akIsAutoCreated' => 0, 'akIsEditable' => 1); $ak = StoreProductKey::add($type, $this->post()); $this->redirect('/dashboard/store/products/attributes/', 'success'); } }