Page 1 of 1

Newsletter subscribe

Posted: Wed Sep 01, 2010 6:56 am
by damian
By default in 1.48b when creating account radio button for newsletter subscription is set to "No", is it possible to set it to "Yes" by default?

Re: Newsletter subscribe

Posted: Wed Sep 01, 2010 7:30 am
by SteveSherry
EDIT: /catalog/view/theme/default/template/account/create.tpl

Change: (aprox line 138)

Code: Select all

              <input type="radio" name="newsletter" value="1" /> 
to:

Code: Select all

              <input type="radio" name="newsletter" value="1" checked="checked" /> 
and

change: (approx line 140)

Code: Select all

              <input type="radio" name="newsletter" value="0" checked="checked" /> 
to:

Code: Select all

              <input type="radio" name="newsletter" value="0" /> 

Re: Newsletter subscribe

Posted: Wed Sep 01, 2010 7:31 am
by SteveSherry
I don't know where you are based, but I suggest that you should check what your country's policy is regarding opt-in by default.

Re: Newsletter subscribe

Posted: Wed Sep 01, 2010 8:43 pm
by damian
Thanks for providing solution.
I'm based in UK. Is it forbidden by law to leave newsletter opt in in "yes" by default? I thought that as long as opt out option is provided at the same time(when registering) then it doesn't matter which one is ticked by default as customer still has a clear chance to opt in or out as he wishes. Please tell me the source of this information.

Re: Newsletter subscribe

Posted: Wed Aug 10, 2011 11:47 pm
by bobbyh
Hi,

I'm running 1.5.X and the changes don't seem to have any effect. Can anyone tell me how I can change this code so that it will default to sign up 'yes' for the newsletter please.

(I am aware of the legals on this and it's OK in the UK as long as you give people a choice and unsubscribe option - we do)

What should I change at line 166 in: /catalog/view/theme/shoppica/template/account/create.tpl

Code: Select all

   <?php if ($newsletter == 1) { ?>
            <label class="s_radio"><input type="radio" name="newsletter" value="1" checked="checked" /> <?php echo $text_yes; ?></label>
            <label class="s_radio"><input type="radio" name="newsletter" value="0" /> <?php echo $text_no; ?></label>
          <?php } else { ?>
            <label class="s_radio"><input type="radio" name="newsletter" value="1" /> <?php echo $text_yes; ?></label>
            <label class="s_radio"><input type="radio" name="newsletter" value="0" checked="checked" /> <?php echo $text_no; ?></label>
          <?php } ?>
And what should I change at line 179 in: /catalog/view/theme/shoppica/template/account/create.tpl

Code: Select all

 <?php if ($text_agree) { ?>

        <?php if ($agree) { ?>
        <label class="s_checkbox left"><input type="checkbox" name="agree" value="1" checked="checked" /> <?php echo $this->document->text_agree_account; ?></label>
        <?php } else { ?>
        <label class="s_checkbox left"><input type="checkbox" name="agree" value="1" /> <?php echo $this->document->text_agree_account; ?></label>
        <?php } ?>
        <a class="s_button_1 s_main_color_bgr" onclick="$('#create').submit();"><span class="s_text"><?php echo $button_continue; ?></span></a>
        <?php } else { ?>
        <a class="s_button_1 s_main_color_bgr" onclick="$('#create').submit();"><span class="s_text"><?php echo $button_continue; ?></span></a>
        <?php } ?>
And finally I think I also need to changes in this file as well around line 290 in file: /catalog/controller/account/create.php

Code: Select all

	if (isset($this->request->post['newsletter'])) {
    		$this->data['newsletter'] = $this->request->post['newsletter'];
		} else {
			$this->data['newsletter'] = '';
		}	
Additionally, I would like people who don't wish to sign up for an account to be able to subscribe for a newsletter. Does a module exist for this or does anyone know if its possible to do? I have the add subscribers to mailchimp module added and would like it to work with this as well please.

And finally - how do I see who has added themselves to the newsletter? A list of subscribers in the back end - can't seem to find any of them?

May thanks

Bob
Letterfest.com

Re: Newsletter subscribe

Posted: Sun Sep 18, 2011 1:56 am
by supaflex
To make Newsletter sign up 'yes' by default, you can change at line 133 in: /catalog/view/theme/default/template/account/register.tpl

Code: Select all

<td><?php if ($newsletter == 1) { ?>
change to

Code: Select all

<td><?php if ($newsletter == 0) { ?>

Re: Newsletter subscribe

Posted: Thu Feb 23, 2012 6:39 am
by picobo
thank you supaflex!

here's the vQmod in case anybody needs it...

Re: Newsletter subscribe

Posted: Tue May 15, 2012 3:14 am
by jontycasson
Brilliant vQmod!

Works perfectly on v.1.5.1.3

Re: Newsletter subscribe

Posted: Fri Aug 10, 2012 7:51 pm
by rofus
I had the same need and I developed a quick free VQMOD to work with my Sellegance-derived custom theme and also for the default theme OC 1.5.3.1

http://www.opencart.com/index.php?route ... on_id=7681

R

Re: Newsletter subscribe

Posted: Thu Sep 20, 2012 9:01 am
by kays
I'm having difficulty with this. I'm working with OC 1.5.4.1. I tried changing the 1 to checked and the 0 to unchecked. I've tried adding the extension but when I go to create a new account it still has newletter as no? Any ideas for me? Obviously not a programmer - sorry.

Re: Newsletter subscribe

Posted: Sat Sep 29, 2012 4:16 am
by kays
Solved. Problem with where I placed the extension.

Re: Newsletter subscribe

Posted: Sun Oct 28, 2012 5:20 am
by vaughy
kays wrote:Solved. Problem with where I placed the extension.
What did you do I have tried every thing and it doesn't work (am using latest version)