Breadcrumbs

Home Web Development Magneto customer login and update cart not working
Magneto customer login and update cart not working PDF Print E-mail
Written by Administrator   

If your Magento customer login is not working on the front end, follow below instructions to to fix the issue.

 

Navigate to: app/design/frontend/[your theme package]/[your theme]/template/persistent/customer/form/login.phtml

Open the login.phtml

Add the code:  <?php echo $this->getBlockHtml('formkey'); ?>  below the <form> tag

 

e.g. around line 42

<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">

<?php echo $this->getBlockHtml('formkey'); ?>   <!--New code Mike-->

<div class="col-md-6">

<div class="content">

........................................

....................

.......

 

To fix Magento login at the Onepage checkout, follow the below instructions.

Navigate to:  /app/design/frontend//[your theme package]/[your theme]/template/persistent/checkout/onepage/login.phtml

Open the login.phtml

Add the code:  <?php echo $this->getBlockHtml('formkey'); ?>  below the <form> tag

 

e.g.  around line 50

<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post" class="form-horizontal">

<?php echo $this->getBlockHtml('formkey'); ?> <!--New Code Mike-->

<div class="form-group">

<label for="inputEmail3" class="col-sm-3 control-label required"><em>*</em> <?php echo $this->__('Email') ?></label>

<div class="col-sm-7">

........................................

....................

 

.......

 

Navigate to:   /app/design/frontend//[your theme package]/[your theme]/template/checkout/onepage/login.phtml

Open the login.phtml

Add the code:  <?php echo $this->getBlockHtml('formkey'); ?>  below the <form> tag

e.g. around line 67

<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">

<?php echo $this->getBlockHtml('formkey'); ?> <!--New Code Mike-->

<fieldset>

<h4><?php echo $this->__('Already registered?') ?></h4>

........................................

....................

 

.......

 

 

In addition if you are experiencing that the Magento cart update button is not working, follow the below instructions to fix the issue.

 

Naviagte to: /app/design/frontend//[your theme package]/[your theme]/template/checkout/cart.phtml

Around line 50 add the code:  <?php echo $this->getBlockHtml('formkey'); ?>  below the <from action> tag

e.g. around line 50

<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">

<?php echo $this->getBlockHtml('formkey'); ?> <!--New Code Mike-->

<fieldset>

<div id="shopping-cart-table" class="data-table cart-table">

........................................

....................

 

.......