Post by damian » Wed Sep 01, 2010 6:56 am

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?

New member

Posts

Joined
Thu Jul 01, 2010 4:22 pm

Post by SteveSherry » Wed Sep 01, 2010 7:30 am

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" /> 

My Website ¦ Summer Madness Special Offer ¦


Active Member

Posts

Joined
Thu Apr 08, 2010 7:47 am
Location - Wirral, UK

Post by SteveSherry » Wed Sep 01, 2010 7:31 am

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.

My Website ¦ Summer Madness Special Offer ¦


Active Member

Posts

Joined
Thu Apr 08, 2010 7:47 am
Location - Wirral, UK

Post by damian » Wed Sep 01, 2010 8:43 pm

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.

New member

Posts

Joined
Thu Jul 01, 2010 4:22 pm

Post by bobbyh » Wed Aug 10, 2011 11:47 pm

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

New member

Posts

Joined
Fri Jul 01, 2011 2:48 am

Post by supaflex » Sun Sep 18, 2011 1:56 am

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) { ?>

Newbie

Posts

Joined
Sun Sep 18, 2011 1:49 am

Post by picobo » Thu Feb 23, 2012 6:39 am

thank you supaflex!

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

Attachments


Newbie

Posts

Joined
Sat Feb 11, 2012 6:59 am

Post by jontycasson » Tue May 15, 2012 3:14 am

Brilliant vQmod!

Works perfectly on v.1.5.1.3

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by rofus » Fri Aug 10, 2012 7:51 pm

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

New member

Posts

Joined
Wed Feb 09, 2011 10:28 pm

Post by kays » Thu Sep 20, 2012 9:01 am

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.

Newbie

Posts

Joined
Tue Sep 11, 2012 7:32 pm

Post by kays » Sat Sep 29, 2012 4:16 am

Solved. Problem with where I placed the extension.

Newbie

Posts

Joined
Tue Sep 11, 2012 7:32 pm

Post by vaughy » Sun Oct 28, 2012 5:20 am

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)

Newbie

Posts

Joined
Sun Oct 14, 2012 6:55 pm
Who is online

Users browsing this forum: Semrush [Bot] and 18 guests