Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    18
    Plugin Contributions
    0

    Default Quick question about messagStack

    I have this in the tpl_header file.
    PHP Code:
    <?php
      
    // Display all header alerts via messageStack:
      
    if ($messageStack->size('header') > 0) {
        echo 
    $messageStack->output('header');
      }
      if (isset(
    $_GET['error_message']) && zen_not_null($_GET['error_message'])) {
      echo 
    htmlspecialchars(urldecode($_GET['error_message']));
      }
      if (isset(
    $_GET['info_message']) && zen_not_null($_GET['info_message'])) {
       echo 
    htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>
    The only time I notice this is getting called is when I successfully tell a friend about a product.

    All the other errors/warnings/success's all display in the center column where I want them to. This one when called however, is pushing the whole layout down, thus making the site look like poo. I moved this code into the tpl_product_info_display.php inside the center column under my heading, where I want it.

    It's working. But was I just wondering if I am going to run into problems later. I can't seem to find any though.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Quick question about messagStack

    If you want to move it, I might suggest that the better place to relocate it would be to your custom tpl_main_page.php file, next to the other messageStack output for 'upload'.
    That will force all those messages to appear in the center area, which may or may not be appropriate for errors. It's up to you -- it's your site.
    .

    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
    Dec 2006
    Posts
    18
    Plugin Contributions
    0

    Default Re: Quick question about messagStack

    Quote Originally Posted by DrByte View Post
    If you want to move it, I might suggest that the better place to relocate it would be to your custom tpl_main_page.php file, next to the other messageStack output for 'upload'.
    That will force all those messages to appear in the center area, which may or may not be appropriate for errors. It's up to you -- it's your site.
    I'll try that, thanks

    edit: It works. It appears over the title heading, but thats ok. I can live with that. I'm just not sure where else I might need that in the main page. And only having it in the product info page made me leary.

    Thanks

    Josh
    Last edited by jrhame; 22 Jan 2007 at 09:02 AM.

 

 

Similar Threads

  1. Quick question about contact us
    By leisbi in forum General Questions
    Replies: 3
    Last Post: 14 May 2011, 12:14 AM
  2. Quick Question About Google Analytics???
    By hcd888 in forum General Questions
    Replies: 0
    Last Post: 4 Jan 2010, 04:18 AM
  3. Quick question about version
    By Meshach in forum Contribution-Writing Guidelines
    Replies: 2
    Last Post: 21 Jul 2009, 06:12 PM
  4. a quick question about attributes
    By marglar in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 14 Dec 2007, 07:16 PM
  5. quick question about installation
    By section1 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 15 Oct 2007, 07:11 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR