Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Help with define pages using zen_redirect()

    Maybe some one can help me with zen_redirect() will not work.
    Using define pages with this if statment:
    PHP Code:
      if ($answer == false) {
        
    zen_redirect(zen_href_link(FILENAME_DEFAULT));
      } 
    I have placed it in my /includes/templates/my_template/templates/tpl_test_default.php
    and also tried in /includes/languages/english/html_includes/my_templates/define_test.php

    Both give me the following error when zen_redirect() tries to run:
    PHP Warning: Cannot modify header information - headers already sent by
    (output started at \includes\templates\my_template\common\html_header.php:22)
    in \includes\functions\functions_general.php on line 44


    Skip
    • 446F63746F722057686F •

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Help with define pages using zen_redirect()

    You cannot do a redirect from a template file (and define-page files are loaded as part of template content), because it has already started output on the page. You'll have to do your redirect in a module file somewhere instead.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: Help with define pages using zen_redirect()

    Just what I needed to know.

    Thanks
    • 446F63746F722057686F •

 

 

Similar Threads

  1. Help with Define Pages Editor
    By mldesignworks in forum Basic Configuration
    Replies: 5
    Last Post: 17 Jan 2011, 04:36 AM
  2. I need help with DEFINE PAGES EDITOR
    By kennedykids in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Jul 2007, 12:39 PM
  3. Newby needing help with define pages
    By slclover in forum Installing on a Windows Server
    Replies: 4
    Last Post: 29 Mar 2007, 03:20 AM
  4. Using $messagestack with zen_redirect
    By s_p_ike in forum General Questions
    Replies: 1
    Last Post: 9 Nov 2006, 11:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg