Jump to content

remove company name newsletter and special offers from customer registration


Recommended Posts

  • 2 weeks later...

It comes up by default on my setup?  I don't want company name the business is exclusively B2C.I have amended the address format, under localization > countries  > edit and removed the company name. (I found out how to do this by Googliing on another site and not in the Prestashop documentation b.t.w. but I still cant find anywhere in the documentation if I can remove the checkboxes for newsletter and special offers,  I have tried removing the module for newsletter but the checkbox remains under customer registration

Link to comment
Share on other sites

There are 5 files that do this 'somewhere' (one page check out, 5 steps, mobile etc.

 

To cover all, edit the files:

themes/<theme folder>/mobile/authentication-create-account.tpl

themes/<theme folder>/authentication.tpl

themes/<theme folder>/mobile/identity.tpl

themes/<theme folder>/identity.tpl

themes/<theme folder>/order-opc-new-account.tpl

 

I show authentication.tpl as example:

 

edit the file (make backup!) themes/<theme folder>/authentication.tpl

Find text: newsletter (Use Ctrl-F) and comment out using {* and *}

				</p>

{*                <--- comment out begin bracket here
				{if isset($newsletter) && $newsletter}
					<p class="checkbox">
						<input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.newsletter) && $smarty.post.newsletter == '1'}checked="checked"{/if} autocomplete="off"/>
						<label for="newsletter">{l s='Sign up for our newsletter!'}</label>
					</p>
					<p class="checkbox">
						<input type="checkbox" name="optin" id="optin" value="1" {if isset($smarty.post.optin) && $smarty.post.optin == '1'}checked="checked"{/if} autocomplete="off"/>
						<label for="optin">{l s='Receive special offers from our partners!'}</label>
					</p>
				{/if}
*}                <--- comment out end bracket here

				<h3>{l s='Delivery address'}</h3>

There are two newseletter block in Authentication.tpl, so search for the second one and do the same trick.

save the file.

 

Do this for all files.

 

This should do the trick.

pascal

Link to comment
Share on other sites

  • 2 weeks later...

I found an error in:

 

\controllers\front\AuthController.php

 

which I fixed by changing

 

$this->context->smarty->assign('newsletter', 0);

 

to

 

$this->context->smarty->assign('newsletter', (int)Module::getInstanceByName('blocknewsletter')->active);

 

That way it enabled with the newsletter module.

 

This follows how it's done in \controllers\front\IdentityController.php

 

I'm using 1.5.6.0

Link to comment
Share on other sites

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...