AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: buddahboy on November 28, 2013, 12:30:07 PM

Title: Subscribe to newsletter as default on registration page
Post by: buddahboy 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
Title: Re: Subscribe to newsletter as default on registration page
Post by: abantecart 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.
Title: Re: Subscribe to newsletter as default on registration page
Post by: buddahboy 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
Title: Re: Subscribe to newsletter as default on registration page
Post by: abantecart on November 30, 2013, 04:58:39 PM
Something like:

Code: [Select]
if ($this->customer->getNewsletter()) {
 $value = $this->customer->getNewsletter();
} else {
  $value = 1;
}
Title: Re: Subscribe to newsletter as default on registration page
Post by: uncoolthreads 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)
Title: Re: Subscribe to newsletter as default on registration page
Post by: llegrand 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:
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


Title: Re: Subscribe to newsletter as default on registration page
Post by: uncoolthreads 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
Title: Re: Subscribe to newsletter as default on registration page
Post by: buddahboy 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
Title: Re: Subscribe to newsletter as default on registration page
Post by: Trendslink on April 28, 2016, 10:21:35 AM
im using the latest version i can't find newsletter.php
Title: Re: Subscribe to newsletter as default on registration page
Post by: Basara 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=