prestafreak1 Posted May 29, 2017 Share Posted May 29, 2017 How can I make the "Sign up for our newsletter!" and "Receive special offers from our partners" boxes checked by default? Link to comment Share on other sites More sharing options...
NemoPS Posted May 29, 2017 Share Posted May 29, 2017 What's your prestashop version? Link to comment Share on other sites More sharing options...
prestafreak1 Posted May 29, 2017 Author Share Posted May 29, 2017 Oh sorry, I forgot to mention this. It's 1.6.1.13 Link to comment Share on other sites More sharing options...
NemoPS Posted May 29, 2017 Share Posted May 29, 2017 If you use the opc, look for the "optin" and "newsletter" strings in order-opc-new-account.tplOtherwise try identity.tplBoth in the theme folder Link to comment Share on other sites More sharing options...
prestafreak1 Posted May 29, 2017 Author Share Posted May 29, 2017 Ok, got it: <div class="checkbox"> <label for="optin"> <input type="checkbox" name="optin" id="optin" value="1"{if isset($guestInformations) && isset($guestInformations.optin) && $guestInformations.optin} checked="checked"{/if} autocomplete="off"/> {l s='Receive special offers from our partners!'}</label> {if array_key_exists('optin', $field_required)} <sup> *</sup> Not sure what to do next, tried setting autocomplete="on" but without effect Link to comment Share on other sites More sharing options...
NemoPS Posted May 29, 2017 Share Posted May 29, 2017 checked="checked" Link to comment Share on other sites More sharing options...
prestafreak1 Posted May 29, 2017 Author Share Posted May 29, 2017 (edited) Well, I did add the checked="checked" attribute but nothing changed <div class="checkbox"> <label for="newsletter"> <input type="checkbox" name="newsletter" id="newsletter" checked="checked" value="1"{if isset($guestInformations) && isset($guestInformations.newsletter) && $guestInformations.newsletter} checked="checked"{/if} autocomplete="off"/> {l s='Sign up for our newsletter!'}</label> {if array_key_exists('newsletter', $field_required)} <sup> *</sup> {/if} </div> {/if} {if isset($optin) && $optin} <div class="checkbox"> <label for="optin"> <input type="checkbox" name="optin" id="optin" checked="checked" value="1"{if isset($guestInformations) && isset($guestInformations.optin) && $guestInformations.optin} checked="checked"{/if} autocomplete="off"/> {l s='Receive special offers from our partners!'}</label> {if array_key_exists('optin', $field_required)} <sup> *</sup> {/if} </div> Edited May 29, 2017 by prestafreak1 (see edit history) Link to comment Share on other sites More sharing options...
prestafreak1 Posted May 30, 2017 Author Share Posted May 30, 2017 Tried everything, any ideas? Link to comment Share on other sites More sharing options...
NemoPS Posted May 31, 2017 Share Posted May 31, 2017 Strange, Are you using the opc or 5-steps checkout? Did you try setting the performance option to force compile in the back office? Link to comment Share on other sites More sharing options...
prestafreak1 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) Not sure I understand what you mean, where should I check for the opc or 5-step checkout mode? And also how do I set the performance option in the back office? All these files have the checked="checked" attribute set up and still the options are not checked by default. This is where I'm having issues: https://tiarstudio.ro Edited June 8, 2017 by prestafreak1 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted June 9, 2017 Share Posted June 9, 2017 Is the checkout 5 steps or one page?As for the performance options, it's under advanced parameters in the back office Link to comment Share on other sites More sharing options...
prestafreak1 Posted June 11, 2017 Author Share Posted June 11, 2017 Is the checkout 5 steps or one page? Yes, it's a 5 steps checkout page Did you try setting the performance option to force compile in the back office? Yes, it was already checked Link to comment Share on other sites More sharing options...
prestafreak1 Posted June 11, 2017 Author Share Posted June 11, 2017 (edited) I have also added a <strong>test</strong> between the optin option for order-opc-new-account.tpl | order-opc-new-account-advanced.tpl and identity.tpl file and this doesn't show either. Any ideeas? So the question now becomes - How do I edit the "02. Sign In" step from the checkout 5 steps page? <div class="checkbox"> <label for="optin"> <input type="checkbox" name="optin" id="optin" checked="checked" value="1"{if isset($guestInformations) && isset($guestInformations.optin) && $guestInformations.optin} checked="checked"{/if} autocomplete="off"/> <strong>test2</strong> {l s='Receive special offers from our partners!'}</label> {if array_key_exists('optin', $field_required)} <sup> *</sup> {/if} </div> Edited June 11, 2017 by prestafreak1 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted June 12, 2017 Share Posted June 12, 2017 For the 5 steps it's identity.tpl, the only guess I have is that the template is stuck and you need to clear cache Link to comment Share on other sites More sharing options...
Xpert-Idea Posted June 14, 2017 Share Posted June 14, 2017 {if isset($newsletter) && $newsletter} <div class="checkbox"> <label for="newsletter"> <input type="checkbox" name="newsletter" id="newsletter" value="1" checked="checked" autocomplete="off"/> {l s='Sign up for our newsletter!'}</label> {if array_key_exists('newsletter', $field_required)} <sup> *</sup> {/if} </div> {/if} {if isset($optin) && $optin} <div class="checkbox"> <label for="optin"> <input type="checkbox" name="optin" id="optin" value="1" checked="checked" autocomplete="off"/> {l s='Receive special offers from our partners!'}</label> {if array_key_exists('optin', $field_required)} <sup> *</sup> {/if} </div> {/if} you can try to use this code. Link to comment Share on other sites More sharing options...
prestafreak1 Posted June 15, 2017 Author Share Posted June 15, 2017 Thank you @xpert-idea for your reply. Could you please tell me what's the file that needs this code? Link to comment Share on other sites More sharing options...
NemoPS Posted June 16, 2017 Share Posted June 16, 2017 That totally looks like identity.tpl, line 150 onwards Link to comment Share on other sites More sharing options...
Xpert-Idea Posted June 17, 2017 Share Posted June 17, 2017 The file name is authentication.tpl 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