adameriksson Posted January 24, 2013 Share Posted January 24, 2013 (edited) Hi I'm having a problem with the official Prestashop New theme that I'm using on Prestashop 1.4.9 The login form in order-opc checkout don't work if the customer has no adress. I manually create an customer in backend, the user has products in his or hers cart. then they go to checkout, login using the "Already registered" form, then the should be redirected to adress.php where they can save their informtion. But the login form just flashes, then nothing happens, no redirect. BUT, if i refresh the page, I am logged in, and then I'm being redirected to adress.php What's the problem? Some .js file? or what can it be? Please help me! ------------ UPDATE: Looks that I've solved it! I took a chance comparing order-opc.js from prestashop_new theme and stock prestashop theme. Did found tre lines in stock .js file at line 370-373 isLogged = 1; if (json.no_address == 1) document.location.href = addressUrl; This was missing in prestashop new, so I just added these three lines to line 338 just after $.ajax({ type: 'POST', url: orderOpcUrl, async: true, cache: false, dataType : "json", data: 'ajax=true&method=getAddressBlockAndCarriersAndPayments&token=' + static_token , success: function(json) { so now i have $.ajax({ type: 'POST', url: orderOpcUrl, async: true, cache: false, dataType : "json", data: 'ajax=true&method=getAddressBlockAndCarriersAndPayments&token=' + static_token , success: function(json) { isLogged = 1; if (json.no_address == 1) document.location.href = addressUrl; Edited January 24, 2013 by adameriksson (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now