Jump to content

[SOLVED] Automatic Newsletter Subscription Prestashop


Recommended Posts

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 :)

Link to comment
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??
Link to comment
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
Link to comment
Share on other sites

  • 2 years later...
  • 6 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...