hurray Posted November 12, 2015 Share Posted November 12, 2015 Hi, I have prestashop 1.5.6.2 and would like to make a couple of changes from customer registration process. 1) I would like to have the newsletter checkbox "checked" by default. 2) I would like to get rid of the option "Receive special offers from our partners." I have looked around the web as well as in this forum and from the solutions provided did not see any relating to version 1.5.6.2. Thanks in advance. Link to comment Share on other sites More sharing options...
Rolige Posted November 12, 2015 Share Posted November 12, 2015 You can achieve this by editing the authentication.tpl file of you theme, just add selected="selected" to the newsletter checkbox and add style="display: none;" both the newsletter as partners. Link to comment Share on other sites More sharing options...
hurray Posted November 13, 2015 Author Share Posted November 13, 2015 Hi COTOKO, Your solution did not work. Here's the code with your suggested solution: <p class="checkbox"> <input type="checkbox" name="newsletter" id="newsletter" value="1" selected="selected" {if isset($smarty.post.newsletter) && $smarty.post.newsletter == '1'}checked="checked"{/if}> <label for="newsletter">{l s='Sign up for our newsletter'}</label> </p> Link to comment Share on other sites More sharing options...
Rolige Posted November 13, 2015 Share Posted November 13, 2015 Ok, my mistake, use this code below: <p class="checkbox" style="display: none;"> <input type="checkbox" name="newsletter" id="newsletter" value="1" checked="checked"> <label for="newsletter">{l s='Sign up for our newsletter'}</label> </p> Link to comment Share on other sites More sharing options...
hurray Posted November 13, 2015 Author Share Posted November 13, 2015 Hi COTOKO, Your solution did not work at all. I cleared the smarty cache from the back-office and also of the browser and checked. And what about the solution to get rid of the option "Receive special offers from our partners."? May be I can just comment our some codes. Where would that be and how would I do it? Link to comment Share on other sites More sharing options...
Rolige Posted November 13, 2015 Share Posted November 13, 2015 The code should works, maybe you has edited only one and there is 2 blocks with similar code, be sure edit both. Use this code to get result you want: {if $newsletter} <div class="checkbox" style="display: none;"> <input type="checkbox" name="newsletter" id="newsletter" value="1" checked="checked" /> <label for="newsletter">{l s='Sign up for our newsletter!'}</label> </div> <div class="checkbox" style="display: none;"> <input type="checkbox"name="optin" id="optin" value="1" {if isset($smarty.post.optin) AND $smarty.post.optin == 1} checked="checked"{/if} /> <label for="optin">{l s='Receive special offers from our partners!'}</label> </div> {/if} I repeat, be sure to edit both blocks. Link to comment Share on other sites More sharing options...
hurray Posted November 14, 2015 Author Share Posted November 14, 2015 Hi COTOKO, Thanks I didn't see that I had to change it in two places. Ok now it worked for my second problem 2) I would like to get rid of the option "Receive special offers from our partners." But this is not what I want for my 1st problem. I want the newsletter checkbox checked by default and take if off like for the 2nd problem. So do you have a solution? Link to comment Share on other sites More sharing options...
hurray Posted November 14, 2015 Author Share Posted November 14, 2015 Ok, I found the solution for the Newsletter opt-in by default. Here it is: https://dh42.com/blog/double-prestashop-mailing-list/ Link to comment Share on other sites More sharing options...
AAmoros Posted March 1, 2016 Share Posted March 1, 2016 Also See: Preferences > Customers > Activate Opt-in > NO 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