X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add redirect after newsletter signup (https://forum.x-cart.com/showthread.php?t=61239)

gatordp 10-15-2011 11:55 AM

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}


cflsystems 10-15-2011 01:29 PM

Re: Add redirect after newsletter signup
 
You need to look in news.php and add the redirect in there after successful registration

gatordp 10-18-2011 03:24 AM

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);

?>


cflsystems 10-18-2011 11:01 AM

Re: Add redirect after newsletter signup
 
Look in "/modules/News_Management/news_manage.php"


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.