Guest User

erte

a guest
Apr 11th, 2017
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if (!Mage::getSingleton('customer/session')->isLoggedIn()): ?>
  2. <div id="ajaxlogin-login-window" style="display: none;">
  3. <div class="page-title">
  4. <span><?php echo $this->__('Login into your Account 4') ?></span>
  5. </div>
  6. <form action="<?php echo $this->getUrl('example/amasty/createSimpleProductAndRedirect', array('_secure'=>(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']==='on'))) ?>" method="post" id="ajaxlogin-login-form">
  7. <div class="content">
  8. <ul class="form-list">
  9. <li>
  10. <input type="hidden" id="likeproduct_id" name="product_id" value=""/>
  11. <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
  12. <div class="input-box">
  13. <input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
  14. </div>
  15. </li>
  16. <li>
  17. <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
  18. <div class="input-box">
  19. <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
  20. </div>
  21. </li>
  22. <?php echo $this->getChildHtml('form.additional.info'); ?>
  23. </ul>
  24. </div>
  25. <div class="buttons-set">
  26. <button type="button" class="button" onclick="setproductregisteration();" title="<?php echo $this->__('Register') ?>" name="noaccount" id="noaccount"><span><span><?php echo $this->__('Register') ?></span></span></button>
  27. <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
  28. <div class="progress-indicator">
  29. <span class="please-wait" id="login-please-wait" style="display:none;">
  30. <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" class="v-middle" alt=""/>
  31. </span>
  32. </div>
  33. <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left ajaxlogin-forgot"><?php echo $this->__('Forgot Your Password?') ?></a>
  34. </div>
  35. </form>
  36. <script type="text/javascript">
  37. //<![CDATA[
  38. var ajaxLoginForm = new VarienForm('ajaxlogin-login-form', true);
  39. //]]>
  40. </script>
  41. </div>
  42. <?php endif; ?>
  43.  
  44.  
  45.  
  46.  
  47.  
  48. <script type="text/javascript">
  49. function setproductlogin(pid)
  50. {
  51. document.getElementById("likeproduct_id").value=pid;
  52. jQuery("#productlistlogin").trigger("click");
  53. }
  54. function setproductregisteration()
  55. {
  56. var pid=document.getElementById("likeproduct_id").value;
  57. document.getElementById("likeproductreg_id").value=pid;
  58.  
  59. }
  60. document.observe("dom:loaded", function() {
  61. var triggers = {
  62. login: {
  63. el : $$('.ajaxlogin-login'),
  64. event : 'click',
  65. window: $('ajaxlogin-login-window'),
  66. size: {
  67. maxWidth: 300
  68. }
  69. },
  70. create: {
  71. el : $$('#noaccount'),
  72. event : 'click',
  73. window: $('ajaxlogin-create-window')
  74. },
  75. forgot: {
  76. el : $$('.ajaxlogin-forgot'),
  77. event : 'click',
  78. window: $('ajaxlogin-forgot-window'),
  79. size: {
  80. maxWidth: 300
  81. }
  82. },
  83. logout: {
  84. el : $$('.ajaxlogin-logout'),
  85. event : 'click',
  86. window: $('ajaxlogin-logout-window'),
  87. size: {
  88. maxWidth: 300
  89. }
  90. }
  91. };
  92. ajaxLoginWindow = new AjaxLogin({
  93.  
  94. triggers: triggers
  95. });
  96. });
  97. </script>
RAW Paste Data