Newsletter – default Subscribe for opencart

Tested for version 1.5.x
Edit: catalog/view/theme/default/template/account/register.tpl

Find the code

<td><?php if ($newsletter == 1) { ?>
<input type="radio" name="newsletter" value="1" checked="checked" />
<?php echo $text_yes; ?>
<input type="radio" name="newsletter" value="0" />
<?php echo $text_no; ?>
<?php } else { ?>
<input type="radio" name="newsletter" value="1" />
<?php echo $text_yes; ?>
<input type="radio" name="newsletter" value="0" checked="checked" />
<?php echo $text_no; ?>
<?php } ?></td>

Replace by

<td><?php if ($newsletter == 0) { ?>
<input type="radio" name="newsletter" value="1" />
<?php echo $text_yes; ?>
<input type="radio" name="newsletter" value="0" checked="checked" />
<?php echo $text_no; ?>
<?php } else { ?>
<input type="radio" name="newsletter" value="1" checked="checked" />
<?php echo $text_yes; ?>
<input type="radio" name="newsletter" value="0" />
<?php echo $text_no; ?>
<?php } ?></td>

Edit: catalog/view/theme/default/template/checkout/register.tpl

Find the code

<input type="checkbox" name="newsletter" value="1" id="newsletter" />

Replace by

<input type="checkbox" name="newsletter" value="1" id="newsletter" checked="checked" />

Leave a Reply

Your email address will not be published. Required fields are marked *


*