So on my customer account registration form: domain.com/customer/account/create/
I would like to set the newsletter subscription checkbox, so it is already checked.
So I have looked in the register.phtml
code app/design/frontend/base/default/template/customer/form/register.phtml
and at lines 60 to 76 it has this code:
Added code to make registration box have the tick box automatically ticked
<?php
$checked = true;
if($this->getFormData()->getEmail()) {
if(!$this->getFormData()->getIsSubscribed()) {
$checked = true;
}
}
?>
and
<li class="control">
<div class="input-box">
/* added with the additional code above */
<input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed" checked="checked" class="checkbox" />
...
It looks as though this should do what I want but on my live site, it isn't working. I even took out the /* text */ as I thought this may have an effect but it had no effect.
Any suggestions are most welcome. Thank you.