Community Forums

Newsletter subscribe

Please post any issues you are having concerning installation or upgrade of OpenCart v1.x

Newsletter subscribe

Postby damian » Tue Aug 31, 2010 10:56 pm

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?
damian
 
Posts: 25
Joined: Thu Jul 01, 2010 8:22 am

Re: Newsletter subscribe

Postby SteveSherry » Tue Aug 31, 2010 11:30 pm

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" /> 
SteveSherry
 
Posts: 583
Joined: Wed Apr 07, 2010 11:47 pm
Location: Wirral, UK

Re: Newsletter subscribe

Postby SteveSherry » Tue Aug 31, 2010 11:31 pm

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.
SteveSherry
 
Posts: 583
Joined: Wed Apr 07, 2010 11:47 pm
Location: Wirral, UK

Re: Newsletter subscribe

Postby damian » Wed Sep 01, 2010 12: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.
damian
 
Posts: 25
Joined: Thu Jul 01, 2010 8:22 am

Re: Newsletter subscribe

Postby bobbyh » Wed Aug 10, 2011 3: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
bobbyh
 
Posts: 26
Joined: Thu Jun 30, 2011 6:48 pm

Re: Newsletter subscribe

Postby supaflex » Sat Sep 17, 2011 5:56 pm

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) { ?>
supaflex
 
Posts: 1
Joined: Sat Sep 17, 2011 5:49 pm

Re: Newsletter subscribe

Postby picobo » Wed Feb 22, 2012 10:39 pm

thank you supaflex!

here's the vQmod in case anybody needs it...
Attachments
picobo_newsletter_default_suscribe.xml
(545 Bytes) Downloaded 122 times
picobo
 
Posts: 10
Joined: Fri Feb 10, 2012 10:59 pm

Re: Newsletter subscribe

Postby jontycasson » Mon May 14, 2012 7:14 pm

Brilliant vQmod!

Works perfectly on v.1.5.1.3
Image
Vidal Cassoon - Hair and Beauty Specialists
jontycasson
 
Posts: 59
Joined: Tue Apr 12, 2011 6:01 pm
Location: Cheshire

Re: Newsletter subscribe

Postby rofus » Fri Aug 10, 2012 11:51 am

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=extension/extension/info&extension_id=7681

R
rofus
 
Posts: 52
Joined: Wed Feb 09, 2011 2:28 pm

Re: Newsletter subscribe

Postby kays » Thu Sep 20, 2012 1: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.
kays
 
Posts: 7
Joined: Tue Sep 11, 2012 11:32 am

Re: Newsletter subscribe

Postby kays » Fri Sep 28, 2012 8:16 pm

Solved. Problem with where I placed the extension.
kays
 
Posts: 7
Joined: Tue Sep 11, 2012 11:32 am

Re: Newsletter subscribe

Postby vaughy » Sat Oct 27, 2012 9:20 pm

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)
vaughy
 
Posts: 6
Joined: Sun Oct 14, 2012 10:55 am


Return to Installation, Upgrade, & Config Support

Who is online

Users browsing this forum: No registered users and 20 guests

Hosted by Arvixe Web Hosting