Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Add redirect after newsletter signup

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-15-2011, 11:55 AM
 
gatordp gatordp is offline
 

Advanced Member
  
Join Date: Aug 2009
Posts: 72
 

Default Add redirect after newsletter signup

I have a newsletter signup box in the footer of my store. It is just the default one built into x-cart.

When someone signs up and hits send ... you will see this in the URL:

/home.php?mode=subscribed&email=jacob32344%40gmail. com


Instead of returning the person back to the homepage (where they signed up) ... how can I add a redirect so after the user hits send they will be taking to a new URL (like a thank you page I've built with a discount code on it) ?

Here is my current news.tpl code

Code:
{* $Id: news.tpl,v 1.5 2008/10/29 16:50:11 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} {if $active_modules.News_Management} {insert name="gate" func="news_exist" assign="is_news_exist" lngcode=$shop_language} {if $is_news_exist} {capture name=menu} <!-- <div class="news item"> {* include file="today_news.tpl" *} </div>--> {insert name="gate" func="news_subscription_allowed" assign="is_subscription_allowed" lngcode=$shop_language} {if $is_subscription_allowed} <form id="subscribe_form" action="news.php" name="subscribeform" method="post"> <input type="hidden" name="subscribe_lng" value="{$store_language|escape}" /> Sign-up for our emails and get special coupon codes, advance sale notices and more. <div id="subscribe_email"> <div style="padding: 6px 0px;"> {$lng.lbl_your_email} <input type="text" class="text2" name="newsemail" /> </div> </div> {if $active_modules.Image_Verification && $show_antibot.on_news_panel eq 'Y'} {include file="modules/Image_Verification/spambot_arrest.tpl" mode="simple_column" id=$antibot_sections.on_news_panel} {/if} <div><a class="button21" href="javascript:document.getElementById('subscribe_form').submit();"><span class="button_right">{$lng.lbl_subscribe}</span></a></div> {* include file="customer/buttons/subscribe_menu.tpl" style="button" type="input" additional_button_class="menu-button" *} </form> {/if} {/capture} {include file="customer/menu_dialog.tpl" title=$lng.lbl_newsletter content=$smarty.capture.menu additional_class="menu-news"} {/if} {/if}
__________________
X-Cart Gold 4.5.4
Reply With Quote
  #2  
Old 10-15-2011, 01:29 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Add redirect after newsletter signup

You need to look in news.php and add the redirect in there after successful registration
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 10-18-2011, 03:24 AM
 
gatordp gatordp is offline
 

Advanced Member
  
Join Date: Aug 2009
Posts: 72
 

Default Re: Add redirect after newsletter signup

This is my news.php

I'm not really seeing a spot to place a redirect

Code:
<?php /*****************************************************************************\ +-----------------------------------------------------------------------------+ | X-Cart | | Copyright (c) 2001-2009 Ruslan R. Fazliev <rrf@rrf.ru> | | All rights reserved. | +-----------------------------------------------------------------------------+ | PLEASE READ THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" | | FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE | | AT THE FOLLOWING URL: http://www.x-cart.com/license.php | | | | THIS AGREEMENT EXPRESSES THE TERMS AND CONDITIONS ON WHICH YOU MAY USE | | THIS SOFTWARE PROGRAM AND ASSOCIATED DOCUMENTATION THAT RUSLAN R. | | FAZLIEV (hereinafter referred to as "THE AUTHOR") IS FURNISHING OR MAKING | | AVAILABLE TO YOU WITH THIS AGREEMENT (COLLECTIVELY, THE "SOFTWARE"). | | PLEASE REVIEW THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT | | CAREFULLY BEFORE INSTALLING OR USING THE SOFTWARE. BY INSTALLING, | | COPYING OR OTHERWISE USING THE SOFTWARE, YOU AND YOUR COMPANY | | (COLLECTIVELY, "YOU") ARE ACCEPTING AND AGREEING TO THE TERMS OF THIS | | LICENSE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THIS | | AGREEMENT, DO NOT INSTALL OR USE THE SOFTWARE. VARIOUS COPYRIGHTS AND | | OTHER INTELLECTUAL PROPERTY RIGHTS PROTECT THE SOFTWARE. THIS | | AGREEMENT IS A LICENSE AGREEMENT THAT GIVES YOU LIMITED RIGHTS TO USE | | THE SOFTWARE AND NOT AN AGREEMENT FOR SALE OR FOR TRANSFER OF TITLE.| | THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY GRANTED BY THIS AGREEMENT. | | | | The Initial Developer of the Original Code is Ruslan R. Fazliev | | Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2009 | | Ruslan R. Fazliev. All Rights Reserved. | +-----------------------------------------------------------------------------+ \*****************************************************************************/ # # $Id: news.php,v 1.6.2.1 2009/04/02 06:50:19 ferz Exp $ # require "./auth.php"; if (empty($active_modules["News_Management"])) func_header_location("home.php"); require $xcart_dir."/include/categories.php"; if ($active_modules["Manufacturers"]) include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php"; if ($active_modules["Bestsellers"]) include $xcart_dir."/modules/Bestsellers/bestsellers.php"; include $xcart_dir."/modules/News_Management/news_manage.php"; func_display("customer/home.tpl",$smarty); ?>
__________________
X-Cart Gold 4.5.4
Reply With Quote
  #4  
Old 10-18-2011, 11:01 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Add redirect after newsletter signup

Look in "/modules/News_Management/news_manage.php"
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:48 PM.

   

 
X-Cart forums © 2001-2020