barrystein Posted August 30, 2012 Share Posted August 30, 2012 How do I change themes/prestashop/authentication.tpl to make the Newsletter check box default to checked.... Link to comment Share on other sites More sharing options...
shokinro Posted August 31, 2012 Share Posted August 31, 2012 (edited) try this Before change <input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.newsletter) && $smarty.post.newsletter == '1'}checked="checked"{/if}> After change <input type="checkbox" name="newsletter" id="newsletter" value="1" {if !isset($smarty.post.newsletter) || $smarty.post.newsletter == '1'}checked="checked"{/if}> Edited August 31, 2012 by shokinro (see edit history) 1 Link to comment Share on other sites More sharing options...
tdr170 Posted November 19, 2012 Share Posted November 19, 2012 This option while it does have the newsletter option already checked the customer will not actually be added to the newsletter list. The customer will show as opting for the newsletter but when you view the list no one who registered since changing this code will have actually been added to the list. Strange I know but I found out the hard way. Sorry shokinro not trying to step on any toes here. Link to comment Share on other sites More sharing options...
Arkadia Posted November 29, 2012 Share Posted November 29, 2012 Hey guys do any of you know how to add a newsletter opt-in checkbox for the 5-step checkout process...I created a thread here. Link to comment Share on other sites More sharing options...
kenkomuri Posted October 5, 2013 Share Posted October 5, 2013 try this Before change <input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.newsletter) && $smarty.post.newsletter == '1'}checked="checked"{/if}> After change <input type="checkbox" name="newsletter" id="newsletter" value="1" {if !isset($smarty.post.newsletter) || $smarty.post.newsletter == '1'}checked="checked"{/if}> It does not work for me. I have set Force Compile in Performance but the checkbox is not checked. I also have add the following instead of the what you recommend: <input type="checkbox" name="newsletter" id="newsletter" value="1" checked="checked" /> Link to comment Share on other sites More sharing options...
innercode Posted November 7, 2013 Share Posted November 7, 2013 (edited) This option while it does have the newsletter option already checked the customer will not actually be added to the newsletter list. The customer will show as opting for the newsletter but when you view the list no one who registered since changing this code will have actually been added to the list. Strange I know but I found out the hard way. Sorry shokinro not trying to step on any toes here. It works for newsletters, haven't tried for opt-ins but I guess it should be the same. Edited November 7, 2013 by innercode (see edit history) Link to comment Share on other sites More sharing options...
thewordsmith Posted January 7, 2014 Share Posted January 7, 2014 I would also like to know how to make a form input field readonly? Link to comment Share on other sites More sharing options...
jenishfaldu Posted August 13, 2016 Share Posted August 13, 2016 here is perfect coding for default newsletter :- <input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.guest_email) && $smarty.post.newsletter == '1'} checked="checked" {elseif isset($smarty.post.guest_email) && $smarty.post.newsletter == ''} {else} checked="checked" {/if} /> happy selling !! 1 Link to comment Share on other sites More sharing options...
prestashop.pp Posted June 16, 2017 Share Posted June 16, 2017 How to do it in Prestashop v 1.7? Link to comment Share on other sites More sharing options...
Club Vapea! Posted July 26, 2017 Share Posted July 26, 2017 How to do it in Prestashop v 1.7? did you find a solution? Link to comment Share on other sites More sharing options...
Club Vapea! Posted July 26, 2017 Share Posted July 26, 2017 For PS 1.7 I found a solution here: https://stackoverflow.com/questions/44591989/how-to-make-the-newsletter-checkbox-checked-by-default-in-prestashop-1-7-in-chec/45324414#45324414 B Link to comment Share on other sites More sharing options...
Recommended Posts