public function _toHtml() { try { foreach ($this->getFields() as $field) { $this->addLine("_ltk.SCA.CaptureEmail({$this->toJsString($field)});"); } return parent::_toHtml(); } catch (Exception $e) { Mage::getModel('listrak/log')->addException($e); return ''; } }
public function _toHtml() { try { if ($this->_browsingSku) { $this->addLine("_ltk.Activity.AddProductBrowse({$this->toJsString($this->_browsingSku)});"); } else { $this->addLine("_ltk.Activity.AddPageBrowse({$this->toJsString(Mage::helper('core/url')->getCurrentUrl())});"); } $this->addLine("_ltk.Activity.Submit();"); return parent::_toHtml(); } catch (Exception $e) { Mage::getModel('listrak/log')->addException($e); return ''; } }
public function _toHtml() { try { if (!$this->_suspend) { $custSession = Mage::getSingleton('customer/session'); if ($custSession->isLoggedIn() && !$custSession->getListrakCustomerTracked()) { $cust = $custSession->getCustomer(); $this->addLine("_ltk.SCA.SetCustomer(" . $this->toJsString($cust->getEmail()) . ", " . $this->toJsString($cust->getFirstname()) . ", " . $this->toJsString($cust->getLastname()) . ");"); $this->addLine("_ltk.SCA.Submit();"); $custSession->setListrakCustomerTracked(true); } } return parent::_toHtml(); } catch (Exception $e) { Mage::getModel('listrak/log')->addException($e); return ''; } }
public function _toHtml() { try { if ($this->_confirmationPage) { return ""; } $needSubmit = false; if ($this->_convert) { $session = Mage::getSingleton('listrak/session'); $this->addLine("_ltk.SCA.SetSessionID({$this->toJsString($session->getSessionId())});"); $emails = $session->getEmails(); if (count($emails) > 0 && !Mage::getSingleton('customer/session')->isLoggedIn()) { $this->addLine("_ltk.SCA.SetCustomer({$this->toJsString($emails[0]['email'])}, '', '');"); $needSubmit = true; } } $chkSession = Mage::getSingleton('checkout/session'); if ($this->_cartPage || $this->_convert || $chkSession->getListrakCartModified()) { $this->addLine("_ltk.SCA.Stage = 1;"); if (Mage::getSingleton('checkout/cart')->getSummaryQty() > 0) { foreach ($this->getCartItems() as $item) { $this->addLine("_ltk.SCA.AddItemWithLinks(" . $this->toJsString($item->getSku()) . ", " . $this->toJsString($item->getQty()) . ", " . $this->toJsString($item->getPrice()) . ", " . $this->toJsString($item->getName()) . ", " . $this->toJsString($item->getImageUrl()) . ", " . $this->toJsString($item->getProductUrl()) . ");"); } $this->addLine("_ltk.SCA.Meta1 = {$this->toJsString($this->getBasketId())};"); $this->addLine("_ltk.SCA.Submit();"); } else { $this->addLine("_ltk.SCA.ClearCart();"); // _ltk.SCA.Submit is called by _ltk.SCA.ClearCart } $chkSession->unsListrakCartModified(); } else { if ($needSubmit) { $this->addLine("_ltk.SCA.Submit();"); } } return parent::_toHtml(); } catch (Exception $e) { Mage::getModel('listrak/log')->addException($e); return ''; } }
public function _toHtml() { $this->addLine("_ltk.Click.Submit();"); return parent::_toHtml(); }
public function _toHtml() { return parent::_toHtml(); }