Jump to content
Luca S.

[SOLVED] Automatic Newsletter Subscription Prestashop

Recommended Posts

Hello,
how to set the automatic subscription to newsletter for new users during the registration?

Thanks

Share this post


Link to post
Share on other sites

Open identity.tpl in your themes folder

Find this code



               <input type="checkbox" id="newsletter" name="newsletter" value="1" {if $smarty.post.newsletter == 1} checked="checked"{/if} />
{l s='Sign up for our newsletter'}



and change it into

<input type="hidden" id="newsletter" name="newsletter" value="1" />






Same thing goes with authentication.tpl

find this code



           <input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.newsletter) AND $smarty.post.newsletter == 1} checked="checked"{/if} />
{l s='Sign up for our newsletter'}



and change it into

<input type="hidden" id="newsletter" name="newsletter" value="1" />



Hope that works :)

Share this post


Link to post
Share on other sites

Ok i will try now, however i will put some words into "terms & condition" to be legal, for example "joining this website you'll accept the weekly newsletter, ect ect" right?

Share this post


Link to post
Share on other sites
Open identity.tpl in your themes folder

Find this code


               <input type="checkbox" id="newsletter" name="newsletter" value="1" {if $smarty.post.newsletter == 1} checked="checked"{/if} />
{l s='Sign up for our newsletter'}



and change it into

<input type="hidden" id="newsletter" name="newsletter" value="1" />






Same thing goes with authentication.tpl

find this code



           <input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.newsletter) AND $smarty.post.newsletter == 1} checked="checked"{/if} />
{l s='Sign up for our newsletter'}



and change it into

<input type="hidden" id="newsletter" name="newsletter" value="1" />



Hope that works :)




Don't work... :(
Why??

Share this post


Link to post
Share on other sites

Ok, it works now! My error!

In authentication.tpl, this code is repeated 2 times:



           <input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.newsletter) AND $smarty.post.newsletter == 1} checked="checked"{/if} />
{l s='Sign up for our newsletter'}



Replace both, with <input type="hidden" id="newsletter" name="newsletter" value="1" /> and it will works!

In identity.tpl, that code is repeated only 1 time ;-)

  • Like 1

Share this post


Link to post
Share on other sites

A tip for interested users:
Edit also order-opc-new-account.tpl, if you have enabled One Page Checkout, ehehee, if not you'll see the checkboxes of newsletter...

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More