Jump to content

Newsletter Block - how to disable the redirection to Home page after subscribe/unsubscribe


nlnl

Recommended Posts

Dear All,

 

About the newsletter block, I'm looking for a solution that cancel the action of redirection to Home Page after subscribe/unsubscribe at newsletter block.

May I know how to cancel the redirect?

 

Thanks help

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

Hi Everyone,

 

I am also looking for this solution. At the moment I have my newsletter block in the Footer, but each time someone does a subscribe or unsubscribe it gets redirected to the homepage. I would need it to stay on the same page.

 

Does anyone know how to do this?

 

Thanks a lot!

Link to comment
Share on other sites

  • 1 month later...

Hi all!!!

 

This can be done by editing file "/modules/blocknewsletter/blocknewsletter.tpl" in the line that sets the action of the form.

 

Instead of: <form action="{$link->getPageLink('index.php')}" method="post">

I use: <form action="http://{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" method="post">

 

where HTTP_HOST is the name of the host (for me www.korfufoods.de)

and REQUEST_URI is the full path to the current page (for me /newsletter.php)

 

After the form submits it stays on the same page without redirecting to the homepage.

 

Hope it helps! :)

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 9 months later...
  • 1 month later...
  • 2 weeks later...
  • 1 month later...

Hi, I have an issue where the newsletter block does not display an error message like "invalid email" when I enter an invalid email.

 

And when I enter an legitimate email, there is also no message prompting the subscription is successful.

 

Please advise!

Link to comment
Share on other sites

  • 1 month later...

Just wondering: when the page loads after someone uses the form, should it also scroll down to where the newsletter block is (have some sort of anchor I guess?), or should the page just load normally and that's it? I don't know if it's supposed to do that or not, or if it is and something in my custom theme is messing it up, but I wish it would. My newsletter block is located quite low down in the menu so without scrolling back down to it automatically, it would be very easy for someone to miss the "invalid email" warning (etc.) if there was an error. Can anyone help with this?

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