views:

869

answers:

2

Hi Guys,

I am in the middle of translating a english shop to French for a client. However, something appears to have broken. On the checkout page, when I click the continue button to allow for first time registration, nothing happens.

Even stranger, on the actual page I can see the following code appearing underneath the button:

yCode == Event.KEY_RETURN) { loginForm.submit(); } }

Any idea what might be wrong here?

Regards, Fiona

A: 

Probably a missing quote or malformed HTML or PHP tag. Check the HTML preceding the code that gets printed out.

There's nothing that really jumps out. One little thing:

<a href="#" onclick="loginForm.submit()">

should be

<a href="#" onclick="loginForm.submit(); return false;">

Also if there's a javascript error and / or the loginForm variable doesn't get created properly then the form won't submit - be sure to check your Javascript console.

Greg
Thanks Greg.. that removed the mysterious line of code from the page.However the button still doesn't do anything. Any ideas?Regards,Fiona
Fiona
Not without seeing more of the code - a URL would be best
Greg
Hi Greg,I think I know why its not working! the Billing tab has disappeared. Any ideas why? I did copy over the site from an existing one, and everything else looks ok to me. Where are the tabs pulled from?Regards,Fiona
Fiona
A: 

Hi Greg,

The site is in dev so sadly cannot provide URL.

Here is some of the source code (hopefully the relevant part)... not sure if its any use to you:

<ol id="checkoutSteps" class="one-page-checkout">
<li id="opc-login" class="section allow ">
    <div class="head">
        <h3><span class="step-count">1</span> &nbsp;Processus de commande</h3><a href="#">Edit</a>
    </div>
    <div id="checkout-step-login" class="box a-item" style="display:none;">
        <div class="col2-set">
<div class="col-1">
    <h4>S’enregistrer et Ouvrir un Compte Client</h4>

                <strong>Enregistrez-vous et gagner du temps !</strong><br/>
        En créant votre compte sur notre site, vous pourrez faire vos achats plus rapidement, garder votre panier d'une visite à l'autre et suivre vos commandes. Lifes2Good s'engage à sécuriser vos informations et à les garder strictement confidentielles.            <ul class="disc">
            <li></li>
            <li></li>
        </ul>
                        <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />
        </div>
<div class="col-2">
    <h4>Se connecter</h4>
            <form id="login-form" action="http://www.viviscal.fr/index.php/customer/account/loginPost/" method="post">
        <p><strong>Already registered?</strong><br/>
        Please log in below:</p>
        <ul class="form-list">
            <li>
                <div class="input-box">
                    <label for="login-email">Email Address <span class="required">*</span></label><br/>
                    <input type="text" class="input-text required-entry validate-email" id="login-email" name="login[username]" value=""/>
                </div>
            </li>
            <li>
                <div class="input-box">
                    <label for="login-password">Mot de Passe <span class="required">*</span></label><br/>
                    <input type="password" class="input-text required-entry" id="login-password" name="login[password]" />
                </div>
            </li>
        </ul>
    </form>
</div>

<div class="col2-set">
<div class="col-1">
    <div class="button-set">
        <p class="required">&nbsp;</p>
        <a href="#" onclick="checkout.setMethod()"><img src="http://www.viviscal.fr/skin/frontend/default/helloclean/images/btn_continue.gif" alt="Continue" class="v-middle"/></a>
    </div>
</div>
<div class="col-2">
    <div class="button-set">
        <p class="required">* Champs obligatoires</p>
        <a href="http://www.viviscal.fr/index.php/customer/account/forgotpassword/" class="f-left">Vous avez oublié votre mot de passe ? </a>
        <a href="#" onclick="loginForm.submit()"><img src="http://www.viviscal.fr/skin/frontend/default/helloclean/images/btn_login.gif" alt="Se connecter" class="v-middle"/></a>
    </div>
</div>

<script type="text/javascript">
var loginForm = new VarienForm('login-form', true);
$('login-email').observe('keypress', bindLoginPost);
$('login-password').observe('keypress', bindLoginPost);
function bindLoginPost(evt){
    if (evt.keyCode == Event.KEY_RETURN) {
        loginForm.submit();
    }
}

Regards, Fiona

Fiona