Jump to content

5.2.4 cart existing customer


Recommended Posts

We're having problems with the view cart page and the existing customer login form.

 

When you click on the existing customer form it does not display the form but it does highlight the button when you click back to the new customer it changing the button to active and then brings up the form.

 

I think its got something to do with the javascript not showing the form by adding the active class.

 

JavaScript

 

jQuery(document).ready(function(){
   jQuery("#existingcust").click(function(){
       if (jQuery(this).hasClass('active')!=true) {
           jQuery(".signuptype").removeClass('active');
           jQuery(this).addClass('active');
           jQuery("#signupfrm").fadeToggle('fast',function(){
               jQuery("#loginfrm").fadeToggle('fast');
           });
           jQuery("#custtype").val("existing");
       }
   });
   jQuery("#newcust").click(function(){
       if (jQuery(this).hasClass('active')!=true) {
           jQuery(".signuptype").removeClass('active');
           jQuery(this).addClass('active');
           jQuery("#loginfrm").fadeToggle('fast',function(){
               jQuery("#signupfrm").fadeToggle('fast');
           });
           jQuery("#custtype").val("new");
       }
   });
});

 

HTML - Login Form

 

<div class="signupfields{if $custtype eq "existing" && !$loggedin}{else} hidden{/if}" id="loginfrm">

 

HTML - Existing Customer Form

 

<div class="signupfields{if $custtype eq "existing" && !$loggedin} hidden{/if}" id="signupfrm">

 

We've made no modifications to the orderform templates.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated