='); } public function removeEmptyItems($var) { return !empty($var); } public function prepareArray($var) { if (is_string($var)) { $var = @explode(',', $var); } if (is_array($var)) { $var = array_unique($var); $var = array_filter($var, array(Mage::helper('producttab'), 'removeEmptyItems')); $var = @implode(',', $var); } return $var; } public function jsParam($obj) { /* var_dump($obj->getData()) */ $param = array( 'url' => $obj->getSendUrl(), 'effect' => $this->getEffect(), 'duration' => ($this->getEffect()=="slide")? $this->getDurationSlide():(($this->getEffect()=="fade")?$this->getDurationFade():""), 'from' => ($this->getEffect()=="slide")? $this->getScaleFromSlide():(($this->getEffect()=="fade")?$this->getFromFade():""), 'to' => ($this->getEffect()=="slide")? $this->getScaleToSlide():(($this->getEffect()=="fade")?$this->getToFade():""), 'direction' => $this->getDirection()==0? 'true':'false', 'identifier' => $obj->getConfig('identifier'), 'icon' => $this->getUrlIconLoading(), 'is_product_view_tab' => Mage::registry('current_product') ? 1 : 0 ); return Zend_Json::encode($param); } } ?>