Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Social Bookmark Causes "page contains both secure and nonsecure items" message

    Quote Originally Posted by JE2009 View Post
    I was having a tuff time figuring out why I was getting the dreaded "page contains both secure and nonsecure items" on secure pages.

    I try everything I found on the forum:

    - check for absolute links
    - make sure you modify googele analytics
    _ Script referencing http


    Well I finally figure out the problem.

    I installed a social bookmark script which ran globally and was causing the message to appear. Found this article that mentioned "why would you want to bookmark a checkout". http://pro-webs.net/blog/2009/08/26/...ckout-suicide/

    I installed the script on the footer.php and was being called by alll pages including any secure pages e.g. checkout, my account, contact us.

    I am posting it here, so it helps someone else pullilng their hair how to get rid off the dreaded "secure/nosecure items" message. As the article states, it could be a suicide at checkout for your potential customers.



    I would like to use the social bookmarking, anyone know how to get around this problem?

    I use the "addthis" button at the start of the breadcrumbs line in \includes\templates\YOUR_TEMPLATE\common\tpl_main_page.php

    PHP Code:
    <!-- AddThis Button BEGIN -->
        <?php if ($request_type == 'NONSSL') { ?>

    Put your custom button code here

    <?php ?>
    <!-- AddThis Button END -->
    You don't want to bookmark your SSL pages or distract the customer during checkout.
    This keeps it off the checkout pages.

  2. #2
    Join Date
    Apr 2008
    Location
    Flint, Michigan
    Posts
    687
    Plugin Contributions
    0

    Default Re: Social Bookmark Causes "page contains both secure and nonsecure items" message

    Quote Originally Posted by gilby View Post
    I use the "addthis" button at the start of the breadcrumbs line in \includes\templates\YOUR_TEMPLATE\common\tpl_main_page.php

    PHP Code:
    <!-- AddThis Button BEGIN -->
        <?php if ($request_type == 'NONSSL') { ?>

    Put your custom button code here

    <?php ?>
    <!-- AddThis Button END -->
    You don't want to bookmark your SSL pages or distract the customer during checkout.
    This keeps it off the checkout pages.
    Ok. This worked for me for social buttons. Thank you so much!

    But now, My Live Help sidebox is causing secure/nonsecure error!

    Thanks, Kim

  3. #3
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: Social Bookmark Causes "page contains both secure and nonsecure items" message

    To be precise, the problem is not in the anchors themselves; it's the references to the .gif files on www.social-bookmark-script.de. I copied the files to my server, did a little more clean up, and all seems OK now.

  4. #4
    Join Date
    Nov 2010
    Location
    Vancouver, BC
    Posts
    108
    Plugin Contributions
    0

    Default Re: Social Bookmark Causes "page contains both secure and nonsecure items" message

    I'm using zen cart 1.3.9 (latest at time of post)

    I ran into this error when adding the facebook like button to our header - and with the help of a good friend, found a workaround which is very simple, and commonly used procedure:

    In INCLUDES/TEMPLATES/(yourtemplate)/COMMON/header.tpl
    (in my case at least, I wanted to add the button next to the header, under the login, customization will be required for your solution.)

    look for
    <!--bof-branding display-->
    <div id="logoWrapper">
    <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>

    Under this statement - I included some new php which recognizes the http or https state of the page we are on - and if on secure pages, displays an image instead of the facebook like button, dispelling the non secure elements from account pages, but displaying the facebook like button on the home and other http request pages.


    <!--bof-facebook like button/secure image-->
    <?php
    if ($_SERVER['HTTPS']) { ?>
    <img src="https://opticalnow.ca/secure.jpg">
    <?php
    }else{?>
    <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.opticalnow.ca&amp;layout=standard&amp;show_faces= false&amp;width=200&amp;action=recommend&amp;font=arial&amp;colorscheme=light&am p;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:35px;" allowTransparency="true"></iframe>
    <?php;
    }?>
    <!--eof-facebook like button/secure image-->

    You will of course, need to modify this to suit your needs - I used a hard link to image over https, which I'm sure could be improved on, but works for what it is intended for. You will also need to change the facebook source code (everything in iframe)

    this little script is to direct user's attention to the locked icon at the bottom of the browser, and confirm that the page is secure.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Social Bookmark Causes "page contains both secure and nonsecure items" message

    Using $request_type is much more reliable than $_SERVER['HTTPS'].
    .

    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.

  6. #6
    Join Date
    Nov 2010
    Location
    Vancouver, BC
    Posts
    108
    Plugin Contributions
    0

    Default Re: Social Bookmark Causes "page contains both secure and nonsecure items" message

    that's why i posted... gotta love this community, and thank you btw Dr Byte, for solving more than one of the other issues that came up in installation and customization of what we have so far. I think also a dynamic image link might be useful... but to be sure i hard coded the https. Correct me if I'm wrong, and thanks!

 

 

Similar Threads

  1. HCL (Help Center Live) - Page contains both secure and nonsecure items
    By Ruthless in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 5 Mar 2009, 07:41 AM
  2. Replies: 3
    Last Post: 8 Oct 2008, 01:53 AM
  3. Help with "page contains both secure and nonsecure items"
    By bpais in forum General Questions
    Replies: 4
    Last Post: 21 Jan 2008, 03:32 AM
  4. Replies: 10
    Last Post: 18 Apr 2007, 10:29 AM
  5. This page contains both secure and nonsecure items
    By superprg in forum General Questions
    Replies: 21
    Last Post: 21 Mar 2007, 08:26 PM

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