/** * 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 ''; } }
/** * 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 ''; } }
/** * 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 ''; } }