Amazzing Posted May 20, 2012 Share Posted May 20, 2012 Hello dear community, Here is my case: PS 1473. All orders are one page guest checkout. The only payment option is Cash on Delivery. My goal is to redirect user to order validation page right after he clicks 'Save' button, that is used for saving account informations. What I did so far, was adding some JS code to "save" button in order-opc-new-account.tpl: <p class="submit"> <input type="submit" class="exclusive button" name="submitAccount" id="submitAccount" value="{l s='Save'}" onclick="location.href = 'modules/cashondelivery/validation.php';" /> </p> It is really simple and it works. But if there are some errors in user fields, page is reloaded and no error message is displayed. So, I need to call JS only in case there are no errors in user fields. It has to look something like that: {if no errors} onclick="location.href ='modules/cashondelivery/validation.php';"{/if} Can you please tell, how can I define "no errors"? I am sure it is a really easy question for those, who is familiar with PS smarty logic If you have any other suggestions about skipping the payment selection and redirecting to validation.php, I would be really glad to hear that! Thank you in advance for your attention. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted May 23, 2013 Share Posted May 23, 2013 Thank you ! I have been searching for bout 2 weeks for this. Where have u been ? Haha ! Thanks ! [beer] Link to comment Share on other sites More sharing options...
vekia Posted May 23, 2013 Share Posted May 23, 2013 But if there are some errors in user fields what kind of errors you've got? it's important in this case Link to comment Share on other sites More sharing options...
Larry Baldwin Posted May 23, 2013 Share Posted May 23, 2013 I have the errors to. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted May 23, 2013 Share Posted May 23, 2013 I have changed only the first line : <p class="submit"> <input type="submit" class="exclusive button" name="submitAccount" id="submitAccount" value="{l s='Save'}" onclick="location.href = 'modules/cashondelivery/validation.php';" /> </p> I am using prestashop 1.5.4.1 ERROR : TECHNICAL ERROR : unable to send login informations Redirects to hompage This is what i am trying to acomplish http://www.prestashop.com/forums/topic/249427-one-page-checkout-save-account-into-confirm-payment/page__p__1238560?do=findComment&comment=1238560 After redirection to homepage , it seems that account is created Link to comment Share on other sites More sharing options...
Larry Baldwin Posted May 24, 2013 Share Posted May 24, 2013 Bump. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted May 24, 2013 Share Posted May 24, 2013 Buuuump. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted May 24, 2013 Share Posted May 24, 2013 Really need this guys ! Anyone ? I can pay a small fee for this tip Link to comment Share on other sites More sharing options...
Marius05 Posted April 5, 2014 Share Posted April 5, 2014 Have find anyone an solution for redirect page after save account information? 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