Jump to content

Unsubscribe to newsletters [ Solved ]


Recommended Posts

front office-->login-->my accounts-->my personal information

 

down at the bottom you can subscribe or unsubscribe

 

That would mean the customer would need to register so they can unsubscribe from the newsletter which i doubt many would want to do.

It looks like i will need to delete them manually from the database.

Link to comment
Share on other sites

  • 5 weeks later...

[i realize this has already been solved, I just wanted to add an alternative action should anyone prefer to try something different.[/size]]

 

Since my PS 1.5.3.1 newsletter block module didn't have the drop-down list with subscribe/unsubscribe on it (like older versions of PS apparently did), I got suspicious and decided to check the code to see if there was a way to add it back.

 

First back up a copy of blocknewsletter.tpl in themes > (theme name) > modules > blocknewsletter > blocknewsletter.tpl (because it's always good to have a copy of the original). :)

 

Change this section:

<p> {* @todo use jquery (focusin, focusout) instead of onblur and onfocus *}
<input type="text" name="email" size="18" value="{if isset($value) && $value}{$value}{else}{l s='your e-mail' mod='blocknewsletter'}{/if}" onfocus="javascript:if(this.value=='{l s='your e-mail' mod='blocknewsletter' js=1}')this.value='';" onblur="javascript:if(this.value=='')this.value='{l s='your e-mail' mod='blocknewsletter' js=1}';"  class="inputNew" />
<!--<select name="action">
<option value="0"{if isset($action) && $action == 0} selected="selected"{/if}>{l s='Subscribe' mod='blocknewsletter'}</option>
<option value="1"{if isset($action) && $action == 1} selected="selected"{/if}>{l s='Unsubscribe' mod='blocknewsletter'}</option>
</select>-->
<input type="submit" value="ok" class="button_mini" name="submitNewsletter" />
<input type="hidden" name="action" value="0" />
</p>

 

To this:

<p>
<input type="text" name="email" size="18" value="your e-mail" onfocus="javascript:if(this.value=='your e-mail')this.value='';" onblur="javascript:if(this.value=='')this.value='your e-mail';" /></p>
<p><select name="action">
<option value="0">Subscribe</option>
<option value="1">Unsubscribe</option> </select>
<input type="submit" value="ok" class="button_mini" name="submitNewsletter"/>
</p>

 

Originally I tried removing the comments around the <select> tags but that didn't work.

 

Anyway, I tested both subscribe and unsubscribe with the code change and it worked great. Frankly, I'd rather customers not have to bug me to unsubscribe them, and as a customer I know I'd be annoyed to have to do that or create an account just so I could unsubscribe.

Edited by artofadornment (see edit history)
  • Like 6
Link to comment
Share on other sites

  • 1 year later...

[i realize this has already been solved, I just wanted to add an alternative action should anyone prefer to try something different.]

 

Since my PS 1.5.3.1 newsletter block module didn't have the drop-down list with subscribe/unsubscribe on it (like older versions of PS apparently did), I got suspicious and decided to check the code to see if there was a way to add it back.

 

First back up a copy of blocknewsletter.tpl in themes > (theme name) > modules > blocknewsletter > blocknewsletter.tpl (because it's always good to have a copy of the original). :)

 

Change this section:

<p> {* @todo use jquery (focusin, focusout) instead of onblur and onfocus *}
<input type="text" name="email" size="18" value="{if isset($value) && $value}{$value}{else}{l s='your e-mail' mod='blocknewsletter'}{/if}" onfocus="javascript:if(this.value=='{l s='your e-mail' mod='blocknewsletter' js=1}')this.value='';" onblur="javascript:if(this.value=='')this.value='{l s='your e-mail' mod='blocknewsletter' js=1}';"  class="inputNew" />
<!--<select name="action">
<option value="0"{if isset($action) && $action == 0} selected="selected"{/if}>{l s='Subscribe' mod='blocknewsletter'}</option>
<option value="1"{if isset($action) && $action == 1} selected="selected"{/if}>{l s='Unsubscribe' mod='blocknewsletter'}</option>
</select>-->
<input type="submit" value="ok" class="button_mini" name="submitNewsletter" />
<input type="hidden" name="action" value="0" />
</p>
To this:

<p>
<input type="text" name="email" size="18" value="your e-mail" onfocus="javascript:if(this.value=='your e-mail')this.value='';" onblur="javascript:if(this.value=='')this.value='your e-mail';" /></p>
<p><select name="action">
<option value="0">Subscribe</option>
<option value="1">Unsubscribe</option> </select>
<input type="submit" value="ok" class="button_mini" name="submitNewsletter"/>
</p>
Originally I tried removing the comments around the <select> tags but that didn't work.

 

Anyway, I tested both subscribe and unsubscribe with the code change and it worked great. Frankly, I'd rather customers not have to bug me to unsubscribe them, and as a customer I know I'd be annoyed to have to do that or create an account just so I could unsubscribe.

 

Thanks!! it worked!

Link to comment
Share on other sites

×
×
  • Create New...