Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    30
    Plugin Contributions
    0

    Default php command for "if this is an SSL page"

    i'd like to embed a stats script in my footer, so i can track visitors from elsewhere on my site who come over to the zencart shop.

    the stats script (sitemeter) requires an image that links off-site, which breaks the SSL cert on SSL pages.

    i've defined it a separate FOOTER_STATS in english.php (paralleling FOOTER_TEXT_BODY) that includes the script. i'd like to have tpl_footer.php call FOOTER_STATS only on non-SSL pages.

    so i need a php command with this logic:
    if (not SSL page) { echo FOOTER_STATS } else { (rest of footer) ... }

    any idea how to do that? i've been trying some of the variable strings i found by searching the developers toolkit (mostly from init_sessions.php), but nothing's worked.

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

    Default Re: php command for "if this is an SSL page"

    $request_type will be either 'SSL' or 'NONSSL'
    .

    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
    Sep 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: php command for "if this is an SSL page"

    thanks! that works perfectly.

    i ended up with this:

    Code:
    <?php if ( ($request_type == 'NONSSL')) { echo FOOTER_TEXT_SITEMETER;
    } else { echo FOOTER_TEXT_BODY; }?>
    embedded in the site copyright display div in tpl_footer.php.

 

 

Similar Threads

  1. Replies: 9
    Last Post: 3 Feb 2015, 09:36 PM
  2. "You are seeing this page for one or more reasons:""
    By cogmios in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 28 Dec 2010, 01:54 AM
  3. Replies: 7
    Last Post: 30 Jun 2009, 04:43 AM
  4. can I link 2 define pages? trying to use php "header()" command doesn't work
    By Derek Bryant in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Jan 2009, 03:01 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