Jump to content

Remove a field and check Newsletter from Registration Process


hurray

Recommended Posts

Hi,

I have prestashop 1.5.6.2 and would like to make a couple of changes from customer registration process.

1) I would like to have the newsletter checkbox "checked" by default.

2) I would like to get rid of the option "Receive special offers from our partners."

 

I have looked around the web as well as in this forum and from the solutions provided did not see any relating to version 1.5.6.2.

 

Thanks in advance.

 

Link to comment
Share on other sites

Hi COTOKO,

Your solution did not work.

Here's the code with your suggested solution:

 

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

Link to comment
Share on other sites

Ok, my mistake, use this code below:

<p class="checkbox" style="display: none;">
    <input type="checkbox" name="newsletter" id="newsletter" value="1" checked="checked">
    <label for="newsletter">{l s='Sign up for our newsletter'}</label>
</p>
Link to comment
Share on other sites

Hi COTOKO,

Your solution did not work at all. I cleared the smarty cache from the back-office and also of the browser and checked.

 

And what about the solution to get rid of the option "Receive special offers from our partners."? May be I can just comment our some codes. Where would that be and how would I do it?

Link to comment
Share on other sites

The code should works, maybe you has edited only one and there is 2 blocks with similar code, be sure edit both.

 

Use this code to get result you want:

{if $newsletter}
	<div class="checkbox" style="display: none;">
		<input type="checkbox" name="newsletter" id="newsletter" value="1" checked="checked" />
		<label for="newsletter">{l s='Sign up for our newsletter!'}</label>
	</div>
	<div class="checkbox" style="display: none;">
		<input type="checkbox"name="optin" id="optin" value="1" {if isset($smarty.post.optin) AND $smarty.post.optin == 1} checked="checked"{/if} />
		<label for="optin">{l s='Receive special offers from our partners!'}</label>
	</div>
{/if}

I repeat, be sure to edit both blocks.

Link to comment
Share on other sites

Hi COTOKO, Thanks I didn't see that I had to change it in two places.

Ok now it worked for my second problem 2) I would like to get rid of the option "Receive special offers from our partners."

But this is not what I want for my 1st problem. I want the newsletter checkbox checked by default and take if off like for the 2nd problem.

 

So do you have a solution?

Link to comment
Share on other sites

  • 3 months 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...