support

Subscribe to newsletter as default on registration page

Started by buddahboy, November 28, 2013, 12:30:07 PM

Previous topic - Next topic

buddahboy

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!

abantecart

File: /storefront/controller/pages/account/newsletter.php

Line:

        $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 'value' => to it.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

buddahboy

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!

abantecart

Something like:


if ($this->customer->getNewsletter()) {
$value = $this->customer->getNewsletter();
} else {
  $value = 1;
}
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

uncoolthreads

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

Quoteif ($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)

llegrand

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



uncoolthreads

#6
Quote from: 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:

       
  • 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

buddahboy

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!

Trendslink

im using the latest version i can't find newsletter.php

Basara

Quote from: Trendslink on April 28, 2016, 10:21:35 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=

Forum Rules Code of conduct
AbanteCart.com 2010 -