xxjames1975xx Posted August 7, 2013 Share Posted August 7, 2013 Hi I have the newsletter block installed inside the footer of my site, when someone types in their email address to subscribe i would like them to be redirected to a thank you page, instead of just seeing the success message appear within the newsletter block as this could be over looked by the user, however i'm unsure how to go about setting this up correctly? I have tried playing with the form action code within the blocknewsletter.tpl file but so far no joy, it does redirect but says 'Page can not be found' Any help would be greatly appreciated. Version 1.5.3.1 Link to comment Share on other sites More sharing options...
xxjames1975xx Posted August 9, 2013 Author Share Posted August 9, 2013 Anyone else had this situation arise? Link to comment Share on other sites More sharing options...
vekia Posted August 9, 2013 Share Posted August 9, 2013 1) what theme you use? default one? 2) what newsletter block? default too? Link to comment Share on other sites More sharing options...
xxjames1975xx Posted August 9, 2013 Author Share Posted August 9, 2013 Hi Vekia Thank you for your response, the theme is the original default theme that i have customised to suit my design. The newsletter block is the default one supplied with the original install. Inside the blocknewsletterblock.tpl file i have been trying to change this part of the form to try to redirect to a thank you page: <form action="{$link->getPageLink('index')}" method="post"> but so far i can't get it working. Link to comment Share on other sites More sharing options...
vekia Posted August 9, 2013 Share Posted August 9, 2013 to the form action $link function add additional param: ?back=url_to_the_thank_you_page then in the php file, where the post form is under the validation process - prepare the redirection with default object Tools, take a look: Tools::redirect($_POST['back']); Link to comment Share on other sites More sharing options...
xxjames1975xx Posted August 12, 2013 Author Share Posted August 12, 2013 Unfortunately i'm still a newbie when it comes to php and i'm struggling with your recommendation, would you be able to supply the necessary code and line number within the newsletterblock.php ? Sorry for my ignorance. Link to comment Share on other sites More sharing options...
xxjames1975xx Posted August 16, 2013 Author Share Posted August 16, 2013 Just wondered if you have had any more thoughts on 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