Alexanderleo Posted December 12, 2013 Share Posted December 12, 2013 Hello How can I remove the "Already Registered" and "Create an account". And then make the guest checkout "open" when you go to the order process. So you dont have to click on the guest checkout option. I want it to open itself because I dont want to have any registered users. Link to comment Share on other sites More sharing options...
NemoPS Posted December 13, 2013 Share Posted December 13, 2013 You must edit the template file named order-opc-new-account. Remove this (about this, it changes depending on the template) <form action="{$link->getPageLink('authentication', true, NULL, "back=order-opc")|escape:'html'}" method="post" id="login_form" class="std"> <fieldset> <h3>{l s='Already registered?'}</h3> <p><a href="#" id="openLoginFormBlock">» {l s='Click here'}</a></p> <div id="login_form_content" style="display:none;"> <!-- Error return block --> <div id="opc_login_errors" class="error" style="display:none;"></div> <!-- END Error return block --> <div style="margin-left:40px;margin-bottom:5px;float:left;width:40%;"> <label for="login_email">{l s='Email address'}</label> <span><input type="text" id="login_email" name="email" /></span> </div> <div style="margin-left:40px;margin-bottom:5px;float:left;width:40%;"> <label for="login_passwd">{l s='Password'}</label> <span><input type="password" id="login_passwd" name="login_passwd" /></span> <a href="{$link->getPageLink('password', true)|escape:'html'}" class="lost_password">{l s='Forgot your password?'}</a> </div> <p class="submit"> {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if} <input type="submit" id="SubmitLogin" name="SubmitLogin" class="button" value="{l s='Login'}" /> </p> </div> </fieldset> </form> Then, in the #new_account_form div, find and remove <div id="opc_account_choice"> <div class="opc_float"> <p class="title_block">{l s='Instant Checkout'}</p> <p> <input type="button" class="exclusive_large" id="opc_guestCheckout" value="{l s='Guest checkout'}" /> </p> </div> <div class="opc_float"> <p class="title_block">{l s='Create your account today and enjoy:'}</p> <ul class="bullet"> <li>{l s='Personalized and secure access'}</li> <li>{l s='A fast and easy check out process'}</li> <li>{l s='Separate billing and shipping addresses'}</li> </ul> <p> <input type="button" class="button_large" id="opc_createAccount" value="{l s='Create an account'}" /> </p> </div> <div class="clear"></div> </div> Finally, on order-opc.js, change Then edit order-opc.js, and scroll to $('#opc_guestCheckout').click(function() { $('.is_customer_param').hide(); $('#opc_account_form').slideDown('slow'); $('#is_new_customer').val('0'); $('#opc_account_choice, #opc_invoice_address').hide(); $('#new_account_title').html(txtInstantCheckout); $('#submitAccount').prop({id : 'submitGuestAccount', name : 'submitGuestAccount'}); updateState(); updateNeedIDNumber(); updateZipCode(); }); To $('.is_customer_param').hide(); $('#opc_account_form').slideDown('slow'); $('#is_new_customer').val('0'); $('#opc_account_choice, #opc_invoice_address').hide(); $('#new_account_title').html(txtInstantCheckout); $('#submitAccount').prop({id : 'submitGuestAccount', name : 'submitGuestAccount'}); updateState(); updateNeedIDNumber(); updateZipCode(); )basically remove the click action) DIdn't test it, but it should work! Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 13, 2013 Author Share Posted December 13, 2013 Hello If you go to my site: www.dinsticker.dk It do not show anything now when you go to the cart. Link to comment Share on other sites More sharing options...
El Patron Posted December 13, 2013 Share Posted December 13, 2013 Hello If you go to my site: www.dinsticker.dk It do not show anything now when you go to the cart. please turn on erros that will help determine issue with your change... http://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information/ remember to always back up changes you make to 'any' file first. Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 13, 2013 Author Share Posted December 13, 2013 It is now set to "true". I have a backup of the files Link to comment Share on other sites More sharing options...
El Patron Posted December 13, 2013 Share Posted December 13, 2013 It is now set to "true". I have a backup of the files Now please recreate the test, do you get any error messages? nemo will need this info for debug. Link to comment Share on other sites More sharing options...
NemoPS Posted December 14, 2013 Share Posted December 14, 2013 Yes, please screen the error page you get. There probably is a compiler exception, a syntax error Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 14, 2013 Author Share Posted December 14, 2013 Where do I locate this error log? Link to comment Share on other sites More sharing options...
El Patron Posted December 14, 2013 Share Posted December 14, 2013 I suggest that you do not make these changes until you are more comfortable working with PrestaShop in general and coding in particular. You can always of course continue trying to make this work for you or hire someone to do it for you (see paid section), or look for a module. But in my honest opinion you are not experienced enough yet to make these type of changes. best of luck and happy selling Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 14, 2013 Author Share Posted December 14, 2013 I have worked a lot with prestashop but never ran into any errors. So I do not know anything about the error log where it is located. In my cpanel at the serevr or in prestashop? Link to comment Share on other sites More sharing options...
NemoPS Posted December 14, 2013 Share Posted December 14, 2013 You should be able to see the error as soon as your reach the problematic page (the order page in this case) Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 14, 2013 Author Share Posted December 14, 2013 Hmm. Removing the cookies and a ctrl + F5 refresh helped the problem. So it works now. Tahnk you! 1 Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 16, 2013 Author Share Posted December 16, 2013 You should be able to see the error as soon as your reach the problematic page (the order page in this case) Hello Nemo I got a little problem. When i press "save" in the OPC nothing happens. It says it you needs to "log gin" but when you click save to thei nformations you write nothing happens. You can try to add a product on www.dinsticker.dk and go to the cart. Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 19, 2013 Author Share Posted December 19, 2013 Can someone help? Link to comment Share on other sites More sharing options...
senso321 Posted December 19, 2013 Share Posted December 19, 2013 (edited) Easyest way to achieve this is to edit the authentication.tpl file. Here is what i did {if isset($inOrderProcess) == false} <div class="row"> <div class="authentication_span authentication_left"> <form action="{$link->getPageLink('authentication', true)|escape:'html'}" method="post" id="login_form" class="std"> <fieldset class="block"> <h3 class="title_block">{l s='Sign in'}</h3> <div class="form_content clearfix"> <ul class="wrapper_block"> <li> <!-- <label for="email" class="required"><em>*</em>{l s='Email address'}</label> --> <div class="input-box"> <input type="text" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|stripslashes}{/if}" placeholder="Email" class="account_input input-text" /> </div> </li> <li> <!-- <label for="passwd" class="required"><em>*</em>{l s='Password'}</label> --> <div class="input-box"> <input type="password" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|stripslashes}{/if}" placeholder="Password" class="account_input input-text" /> </div> </li> </ul> <!-- <p class="required_note"><sup>*</sup> {l s='Required Fields'}</p> --> <p class="lost_password"><a href="{$link->getPageLink('password')|escape:'html'}" title="{l s='Recover your forgotten password'}" rel="nofollow">{l s='Forgot your password?'}</a></p> </div> <div class="submit clearfix"> {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if} <input type="submit" id="SubmitLogin" name="SubmitLogin" class="button btn_primary btn-block" value="{l s='Sign in'}" /> </div> </fieldset> </form> </div> <div class="authentication_span authentication_right"> <form action="{$link->getPageLink('authentication', true)|escape:'html'}" method="post" id="create-account_form" class="std"> <fieldset class="block"> <h3 class="title_block">{l s='Create an account'}</h3> <div class="form_content clearfix"> <!-- <p class="mar_b1">{l s='Please enter your email address to create an account.'}</p> --> <div class="error mar_b1" id="create_account_error" style="display:none"></div> <ul class="wrapper_block"> <li> <!-- <label for="email_create" class="required"><em>*</em>{l s='Email address'}</label> --> <div class="input-box"> <input type="text" id="email_create" name="email_create" value="{if isset($smarty.post.email_create)}{$smarty.post.email_create|stripslashes}{/if}" placeholder="Email" class="account_input input-text" /> </div> </li> </ul> </div> <div class="submit clearfix"> {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if} <input type="submit" id="SubmitCreate" name="SubmitCreate" class="button_large btn_primary btn-block" value="{l s='Sign up'}" /> <input type="hidden" class="hidden" name="SubmitCreate" value="{l s='Create an account'}" /> </div> </fieldset> </form> </div> </div> {/if} As you can see i added a if condition. Be aware that this will work only with quests option enabled. if condition determines when to show the login/ already registered part. If user is in orderProcess it wont show but when he tries to log in on a log in site then it will. Be noted, my code has probably been altered a lot, but I just wanted to show you how i used the if condition to get to solve the problem BR's Edited December 19, 2013 by senso321 (see edit history) Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 19, 2013 Author Share Posted December 19, 2013 So it wall now "save" proberly? Link to comment Share on other sites More sharing options...
senso321 Posted December 20, 2013 Share Posted December 20, 2013 what do you mean with your last post ? Link to comment Share on other sites More sharing options...
NemoPS Posted December 20, 2013 Share Posted December 20, 2013 The save button is likely not working because of a js error. Start the debug console (f12) and see if you get any error there once you hit save Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 20, 2013 Author Share Posted December 20, 2013 How do I debug with F12? Like this? http://msdn.microsoft.com/library/gg589507(VS.85).aspx Link to comment Share on other sites More sharing options...
NemoPS Posted December 20, 2013 Share Posted December 20, 2013 Access that page with google chrome, hit f12 and then try saving. You should see an error popup in the console tab, or a red mark in the bottom right of the console Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 20, 2013 Author Share Posted December 20, 2013 Is it this? Link to comment Share on other sites More sharing options...
NemoPS Posted December 20, 2013 Share Posted December 20, 2013 No, click on the 11 with the red mark in the bottom right Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 20, 2013 Author Share Posted December 20, 2013 This? Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 23, 2013 Author Share Posted December 23, 2013 No, click on the 11 with the red mark in the bottom right Could you help me? Link to comment Share on other sites More sharing options...
NemoPS Posted December 23, 2013 Share Posted December 23, 2013 The ajax cart for that theme is broken on line 214 Can you post those whereabouts? Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 24, 2013 Author Share Posted December 24, 2013 I got it fixed so it do not show the error anymore. But it still do not work when you clik "Gem" (save". Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 28, 2013 Author Share Posted December 28, 2013 The ajax cart for that theme is broken on line 214 Can you post those whereabouts? Could it be any of my changes I got advised in this topic to make the guest checkout come instant? Link to comment Share on other sites More sharing options...
NemoPS Posted December 28, 2013 Share Posted December 28, 2013 ...what? what do you mean? Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 28, 2013 Author Share Posted December 28, 2013 ...what? what do you mean? Could my problem with the "Save" button be caused by the edits I made so the checkout was instant? I did what you said in post number 2. Is there anything in that who can cause the problem? Link to comment Share on other sites More sharing options...
NemoPS Posted December 28, 2013 Share Posted December 28, 2013 No, I don't think so, but can you link the site so we can have a look? If you correctly fixed the issue, it's really weird Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 28, 2013 Author Share Posted December 28, 2013 The site is: www.dinsticker.dk Link to comment Share on other sites More sharing options...
Alexanderleo Posted December 31, 2013 Author Share Posted December 31, 2013 No, I don't think so, but can you link the site so we can have a look? If you correctly fixed the issue, it's really weird The URL is www.dinsticker.dk Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 It seems that submitGuestAccount is not linked to anything, the form is simply not being submitted. Is there a chance you can revert back the changes? Link to comment Share on other sites More sharing options...
Alexanderleo Posted January 6, 2014 Author Share Posted January 6, 2014 So i should only revert the changes in the "order-opc.js" or everything? Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 Try that first, yes. There are no errors so chances are you deleted something which was needed by mistake Link to comment Share on other sites More sharing options...
Alexanderleo Posted January 6, 2014 Author Share Posted January 6, 2014 Try that first, yes. There are no errors so chances are you deleted something which was needed by mistake Hello @Nemo1 i revertet everything and now it works fine. But the "instant guest chechkout" do not work so you have to press guest checkout. In your soloution on page 1 you said I nedded to first edit in the "order-opc-new-account" where I removed something and also removed another thing. I am correct the "#new_account_form" is in the "order-opc-new-account"? If so I did like you said. Could I maybe send this file and the .js file and you could try to make the changes? Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 I fear I don't have enough time to do it myself at the moment If you took that out, there is a chance you need a reference to that #new_account_form in the js, but I can't tell it for sure right now. Can you maybe look for that? Link to comment Share on other sites More sharing options...
Alexanderleo Posted January 6, 2014 Author Share Posted January 6, 2014 If you tell me what I need to look for i will do it? Link to comment Share on other sites More sharing options...
Recommended Posts