zmodel = Mage::getModel('livechat/livechat')->load(1); $zoptions = $this->zmodel->_data; $greetings = Zend_JSON::Decode($zoptions['greetings']); if ($zoptions["code"] == "") { $zoptions["code"] = "zopim"; } $html = ""; if ($this->getRequest()->getParam('zopimColor')!="" || $this->getRequest()->getParam('zopimTheme')!="") { $this->zmodel->setGetvisitorinfo($this->checkbox_helper("zopimGetVisitorInfo")); $this->zmodel->setHideonoffline($this->checkbox_helper("zopimHideOnOffline")); $this->zmodel->setBubbleenable($this->checkbox_helper("zopimBubbleEnable")); $this->zmodel->setLang($this->getRequest()->getParam('zopimLang')); $this->zmodel->setPosition($this->getRequest()->getParam('zopimPosition')); $this->zmodel->setTheme($this->getRequest()->getParam('zopimTheme')); $this->zmodel->setBubbletitle($this->getRequest()->getParam('zopimBubbleTitle')); $this->zmodel->setBubbletext($this->getRequest()->getParam('zopimBubbleText')); $this->zmodel->setColor($this->getRequest()->getParam('zopimColor')); $greetings["online"]["window"] = stripslashes($this->getRequest()->getParam("zopimOnlineLong")); $greetings["away"]["window"] = stripslashes($this->getRequest()->getParam("zopimAwayLong")); $greetings["offline"]["window"] = stripslashes($this->getRequest()->getParam("zopimOfflineLong")); $greetings["online"]["bar"] = stripslashes($this->getRequest()->getParam("zopimOnlineShort")); $greetings["away"]["bar"] = stripslashes($this->getRequest()->getParam("zopimAwayShort")); $greetings["offline"]["bar"] = stripslashes($this->getRequest()->getParam("zopimOfflineShort")); $this->zmodel->setGreetings(Zend_JSON::Encode($greetings)); $this->zmodel->save(); $zoptions = $this->zmodel->_data; $html = '