Avatar of rafique12
rafique12

asked on 

Mini login form not working

Happy new year guys!

I was wondering if someone could help me with a problem I'm having with a mini login form for Magento. I've been looking into my code for hours and could do with a fresh pair of eyes...

The problem is that the form isn't

a) posting for users to login

b) directing to the create account URL when the "create an account" button is clicked

c) Isn't directing to the forgot your password URL when "forgot password" is clicked

I wondering if there is a setting that I may have changed as the same thing happens if I use the mini login form from the "base" template.

I've got no idea...

   <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
      <p>
      <input type="text" class="input-xlarge" name="login[username]" id="mini-login" placeholder="<?php echo $this->__('Email:') ?>"></p><p>
      <input type="password" class="input-xlarge" name="login[password]" id="mini-password" placeholder="<?php echo $this->__('Password:') ?>"></p>
   
      </div>
  <div class="modal-footer">
     <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="btn btn-success pull-left" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
    <button type="submit" title="<?php echo $this->__('Login') ?>" class="btn btn-info pull-left"><span><span><?php echo $this->__('Login') ?></button>
    <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?>
      </a>
       </form>

Open in new window


Some help and a fresh pair of eyes will be a massive help
PHPHTMLXMLMagento

Avatar of undefined
Last Comment
rafique12
Avatar of whosbetterthanme
whosbetterthanme
Flag of United States of America image

For starters, can you look at (or post) what the actual rendered code in the browser has? You're showing the script before the server renders/parses it. What does the output HTML show?
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Agreed.  Look at the "View Source" to see what is actually being generated.
Avatar of rafique12
rafique12

ASKER

Thanks for the reply guys, basically all that happens is the page refreshes. The login box shows on first arrival to the site in a Modal. When any of the buttons are clicked it just refreshes the homepage.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
As we all agree, post the source.
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of rafique12
rafique12

ASKER

Okay, thankyou guys!

I have the form posting! but I now get a blank scree with this in the URL:

http://mysite/customer/account/loginPost/

Not sure what is causing it but I am trying to figure it out.

Thanks for your patients!
Thanks to Dave but he agreed with my initial assertion to post the source.
Avatar of rafique12
rafique12

ASKER

Ok, can I change the award or is it too late?
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

The "blank screen" is often a symptom of an error when error reporting is turned off.  Make a search for "display errors" and "error_reporting" on the PHP.net web site and you'll find out how to raise the error messages so you can see what is happening.
Avatar of rafique12
rafique12

ASKER

Thanks I got it to work. Magento uses: ini_set('display_errors', 1); which will show all errors but there weren't any but thanks for the advice.
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo