Author Topic: Subscribe to newsletter as default on registration page  (Read 3732 times)

Offline buddahboy

  • Full Member
  • ***
  • Posts: 234
  • Karma: +32/-0
    • View Profile
Subscribe to newsletter as default on registration page
« on: November 28, 2013, 12:30:07 PM »
Good Morning,

When a customer subscribes they have an option to subscribe or not to the newsletter - I would like the "yes" checkbox to have a check in it as default - possible? 

Thanks much
Ron
AbanteCart is one hell of a shopping cart.  Donate once in a while and keep the development plus support going.  --  That's my opinion and I'm stickin' to it!

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4152
  • Karma: +251/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Subscribe to newsletter as default on registration page
« Reply #1 on: November 30, 2013, 10:44:16 AM »
File: /storefront/controller/pages/account/newsletter.php

Line:
Code: [Select]
        $this->data['form']['newsletter'] = $form->getFieldHtml( array(
                                                 'type' => 'radio',
                                         'name' => 'newsletter',
                                         'value' => $this->customer->getNewsletter(),
                                         'options' => array(
                                                                    '1' => $this->language->get('text_yes'),
                                                                    '0' => $this->language->get('text_no'),
                                                                      ) ));

You need to add logic between saved value and default and set
Code: [Select]
'value' => to it.
We need your help to build better free open source eCommerce platform for everyone.
See how you can help

Offline buddahboy

  • Full Member
  • ***
  • Posts: 234
  • Karma: +32/-0
    • View Profile
Re: Subscribe to newsletter as default on registration page
« Reply #2 on: November 30, 2013, 10:57:09 AM »
Thank you very much.  I am not sure where to add this value, if it's not too much trouble might you show that?  Much appreciated. 

All the best
Ron
AbanteCart is one hell of a shopping cart.  Donate once in a while and keep the development plus support going.  --  That's my opinion and I'm stickin' to it!

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4152
  • Karma: +251/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Subscribe to newsletter as default on registration page
« Reply #3 on: November 30, 2013, 04:58:39 PM »
Something like:

Code: [Select]
if ($this->customer->getNewsletter()) {
 $value = $this->customer->getNewsletter();
} else {
  $value = 1;
}
We need your help to build better free open source eCommerce platform for everyone.
See how you can help

Offline uncoolthreads

  • Newbie
  • *
  • Posts: 20
  • Karma: +3/-0
    • View Profile
Re: Subscribe to newsletter as default on registration page
« Reply #4 on: September 03, 2014, 06:28:01 AM »
I would also like the newsletter checkbox to be checked by default.

Please let me get this right:

I replaced the line:

Quote
$value = $this->customer->getNewsletter();

with

Quote
if ($this->customer->getNewsletter()) {
 $value = $this->customer->getNewsletter();
} else {
  $value = 1;
}

Is that correct?
I did this and still it's not checked...

Any help on this please would be well appreciated!   8)

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1469
  • Karma: +382/-2
    • View Profile
Re: Subscribe to newsletter as default on registration page
« Reply #5 on: September 03, 2014, 10:45:37 AM »
I don't know which country or countries you may be selling to,  but as of January 2014 the canned spam laws got updated in the European countries,  Canada,  and the U.S.   There are lots of "rules" now but the one about the default check box is:
  • When requesting consent, checkboxes cannot be pre-filled to suggest consent. Each subscriber must check the box themselves for consent to be valid.
This rule applies to customers who interacting with your site,  and overrides what your country may allow.  Since lots of us sell lots of places  the best practice IMO is to not have the check box  set to a default - but as a standard practice the customer MUST choose.
Now after they have purchased something from you,  you can send emails over the next 12 months,  BUT they must have an unsubscribe link on each email.
Lee



Offline uncoolthreads

  • Newbie
  • *
  • Posts: 20
  • Karma: +3/-0
    • View Profile
Re: Subscribe to newsletter as default on registration page
« Reply #6 on: September 04, 2014, 04:50:06 AM »
I don't know which country or countries you may be selling to,  but as of January 2014 the canned spam laws got updated in the European countries,  Canada,  and the U.S.   There are lots of "rules" now but the one about the default check box is:
  • When requesting consent, checkboxes cannot be pre-filled to suggest consent. Each subscriber must check the box themselves for consent to be valid.
This rule applies to customers who interacting with your site,  and overrides what your country may allow.  Since lots of us sell lots of places  the best practice IMO is to not have the check box  set to a default - but as a standard practice the customer MUST choose.
Now after they have purchased something from you,  you can send emails over the next 12 months,  BUT they must have an unsubscribe link on each email.
Lee

I sell in the UK only and there are many Major companies in the UK that still have the checkbox pre-filled so I would like to do the same..


Anybody know how to implement this and have I done it wrong (above)?

thanks
« Last Edit: September 04, 2014, 09:56:35 AM by uncoolthreads »

Offline buddahboy

  • Full Member
  • ***
  • Posts: 234
  • Karma: +32/-0
    • View Profile
Re: Subscribe to newsletter as default on registration page
« Reply #7 on: September 05, 2014, 09:16:26 AM »
A bit of clarification that I thought was posted a while back but was not - I abandoned this request for the reasons laid out by llegrand above.  This is info I got some time after posting this thread and llegrand is 100% right.  So as not to waste time with this I decided to simply import my customer list into my MailChimp list (MC removes all duplicates automatically) and have had no complaints or detrimental effects since doing so.  I'm sure it is not a desired work around but it has worked nicely for me in the meantime - very low tech, right?  Better than nothing says me. 

Sorry for not posting this sooner. 

All the best,
Ron
AbanteCart is one hell of a shopping cart.  Donate once in a while and keep the development plus support going.  --  That's my opinion and I'm stickin' to it!

Offline Trendslink

  • Newbie
  • *
  • Posts: 21
  • Karma: +1/-0
    • View Profile
Re: Subscribe to newsletter as default on registration page
« Reply #8 on: April 28, 2016, 10:21:35 AM »
im using the latest version i can't find newsletter.php

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4309
  • Karma: +202/-0
    • View Profile
Re: Subscribe to newsletter as default on registration page
« Reply #9 on: April 29, 2016, 09:38:13 AM »
im using the latest version i can't find newsletter.php

This topic is 2 years old. AbanteCart newsletter process is modified New page for newsletter http://demo.abantecart.com/index.php?rt=account%2Fsubscriber&email=
“Chuck Norris is so amazing.”
― Mother Teresa

 

Powered by SMFPacks Social Login Mod