Exemplo n.º 1
0
 /**
  * Render block
  *
  * @return string
  */
 public function _toHtml()
 {
     try {
         if (!$this->canRender()) {
             return '';
         }
         foreach ($this->getFields() as $field) {
             $this->addLine("_ltk.SCA.CaptureEmail({$this->toJsString($field)});");
         }
         return parent::_toHtml();
     } catch (Exception $e) {
         $this->getLogger()->addException($e);
         return '';
     }
 }
Exemplo n.º 2
0
 /**
  * Render block
  *
  * @return string
  */
 public function _toHtml()
 {
     try {
         if (!$this->canRender()) {
             return '';
         }
         if ($this->_hasAjaxScript()) {
             $this->addLine("document.observe('dom:loaded', function() { Listrak_Remarketing.track(); });");
         } else {
             $this->_addCustomerJS();
             if (!$this->_addCartJS()) {
                 $this->addLine("_ltk.SCA.Submit();");
             }
         }
         return parent::_toHtml();
     } catch (Exception $e) {
         $this->getLogger()->addException($e);
         return '';
     }
 }
Exemplo n.º 3
0
 /**
  * Render block
  *
  * @return string
  */
 public function _toHtml()
 {
     try {
         if (!$this->canRender()) {
             return '';
         }
         if ($this->_hasAjaxScript()) {
             $method = "track";
             if ($this->isCartPage()) {
                 $method = "updateCart";
             }
             $this->addLine("Listrak_Remarketing.{$method}();");
         } else {
             $this->_addCustomerJS();
             if (!$this->_addCartJS()) {
                 $this->addLine("_ltk.SCA.Submit();");
             }
         }
         return parent::_toHtml();
     } catch (Exception $e) {
         $this->getLogger()->addException($e);
         return '';
     }
 }