nlnl Posted October 20, 2011 Share Posted October 20, 2011 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 2 Link to comment Share on other sites More sharing options...
cyjambo Posted November 6, 2011 Share Posted November 6, 2011 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 More sharing options...
Chris Digas Posted December 20, 2011 Share Posted December 20, 2011 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! 2 Link to comment Share on other sites More sharing options...
weirdboy Posted January 27, 2012 Share Posted January 27, 2012 thank you, this helped a lot <3 Link to comment Share on other sites More sharing options...
tatygrassini Posted February 18, 2012 Share Posted February 18, 2012 If you have the Newsletter Block on a CMS page, this worked for me on v1.4.6.2: <form action="{$link->getPageLink('/ID-PAGE-TITLE')}" method="post"> Where /ID-PAGE-TITLE could be "/15-about-us". Link to comment Share on other sites More sharing options...
Pit Group Intech B.V. Posted December 12, 2012 Share Posted December 12, 2012 Nicer: FIND: <form action="{$link->getPageLink('index.php')}" method="post"> REPLACE: <form action="{$request_uri}" method="post"> 2 Link to comment Share on other sites More sharing options...
Rdev Posted January 18, 2013 Share Posted January 18, 2013 hi, this code doesn't work on prestashop 1.5 please help me and thank you Link to comment Share on other sites More sharing options...
dangee Posted January 29, 2013 Share Posted January 29, 2013 Tested on Prestashop v1.5.3.1 and works perfectly ! You need to edit blocknewsletter.tpl in /themes/default/modules/blocknewsletter (if you use default theme) 1 Link to comment Share on other sites More sharing options...
Rdev Posted January 29, 2013 Share Posted January 29, 2013 Thank you dangee Link to comment Share on other sites More sharing options...
afranco Posted February 3, 2013 Share Posted February 3, 2013 Nicer: FIND: <form action="{$link->getPageLink('index.php')}" method="post"> REPLACE: <form action="{$request_uri}" method="post"> Good job Pit Group Intech B.V.. Very concise and elegant solution. Link to comment Share on other sites More sharing options...
leowls Posted April 2, 2013 Share Posted April 2, 2013 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 More sharing options...
leowls Posted April 3, 2013 Share Posted April 3, 2013 Problem solved thanks. Link to comment Share on other sites More sharing options...
artofadornment Posted May 15, 2013 Share Posted May 15, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now