Example #1
0
 public function updatecatalogattributeAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(TRUE);
     $request = $this->getRequest();
     $catalogGuid = $request->getParam('guid');
     $title = $request->getParam('title');
     $attributeGuid = $request->getParam('attributeGuid');
     $catalogAttributeDb = new App_Model_Db_Table_CatalogAttribute();
     $catalogAttributeDb->update(array('value' => $title), array('catalogGuid = ?' => $catalogGuid, 'attributeGuid = ?' => $attributeGuid));
     //$indexingEngine = Pandamp_Search::manager();
     //$indexingEngine->indexCatalog($catalogGuid);
     try {
         $this->view->addHitsBySolr(json_encode([["id" => $catalogGuid, "title" => ["set" => $title], "shortTitle" => ["set" => Pandamp_Utility_String::removeSign($title, '-', true)], "modifiedDate" => ["set" => date("Y-m-d\\TH:i:s\\Z")], "modifiedBy" => ["set" => Zend_Auth::getInstance()->getIdentity()->username]]]));
     } catch (Zend_Exception $e) {
     }
     $this->getResponse()->setBody('RESULT_OK');
 }