Problem With Newsletter Checkbox In Checkout

I modified my “extra_payment_info.pre.tpl” code to make the newsletter checkbox default to checked. I have something wrong, though. What is occurring is when someone un-checks the box, the page refreshes and the box becomes checked again. Essentially, they are unable to opt-out of the newsletter sign-up when checking out. Can someone please review my code and offer suggestions to fix? Thanks a lot.



{capture name=“mailing_lists”}

{assign var=“show_newsletters_content” value=false}







{foreach from=$page_mailing_lists item=list}

{if $list.show_on_checkout}

{assign var=“show_newsletters_content” value=true}

{/if}



{$list.object}



{/foreach}



{/capture}



{if $show_newsletters_content}

{include file=“common/subheader.tpl” title=__(“text_signup_for_subscriptions”)}



{$smarty.capture.mailing_lists nofilter}

{/if}

I'm not trying to be a pain - can anyone help?



Thanks

If you can provide us with the temporary FTP access, we can check the issue.

Thanks for the reply, but that's ok. I thought someone might be able to see an issue with the code I posted.



Thanks again

[quote name='hurls187' timestamp='1425995180' post='207582']

Thanks for the reply, but that's ok. I thought someone might be able to see an issue with the code I posted.

[/quote]



We do not see any issues. It should work

thanks again

I have a new issue. I reverted the file back to it's original state, and for some reason the checkbox is still automatically checked and does not allow a user to un-check. Any ideas?



Thanks

Cache?

I tried just the “clear cache” and no change. I ended up just disabling the checkbox on the checkout page.

Is it possible to “hide” the checkbox so buyers are automatically added to the newsletter mailing list, and then can opt-out later?

[quote name='hurls187' timestamp='1426799332' post='208461']

Is it possible to “hide” the checkbox so buyers are automatically added to the newsletter mailing list, and then can opt-out later?

[/quote]

I'm sure you can hide it with css, but this type of Opt-Out newsletter strategy is a huge invitation for people to report you as a spammer and get your email server blacklisted so no will receive the newsletter. Not recommended.

Try to add the following rule in the CSS section of the Theme editor:



.ty-newsletters subscription-container {
display: none;
}




Note: checkbox should be checked by default