Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Need Help with Implementing Code

    I am trying to display my bizrate code inside another sidebox. The code is:
    Code:
    <a href="http://www.bizrate.com/ratings_guide/cust_reviews__mid--76686.html" target="www.bizrate.com"><img src="http://medals.bizrate.com/medals/dynamic/76686_medal.gif" alt="BizRate Customer Certified (GOLD) Site" width="125" height="73" border="0" /></a>
    Because the image display from this code is not secure, I want to only display this image on secure page.

    I changed the code to the following:
    Code:
    <?php if($request_type=="NONSSL") {?><a href="http://www.bizrate.com/ratings_guide/cust_reviews__mid--76686.html" target="www.bizrate.com"><img src="http://medals.bizrate.com/medals/dynamic/76686_medal.gif" alt="BizRate Customer Certified (GOLD) Site" width="125" height="73" border="0" /></a><a href="http://seals.squaretrade.com/cW054/706059633.map" target="_blank"><img src="http://seals.squaretrade.com/cW054/706059633.gif" alt="Smarter, Safer, Easier Online Shopping" border="0" ismap="ismap"  /></a>
    I placed the code inside the template file where I wanted it to appear like this:
    Code:
    $content .= '<?php if($request_type=="NONSSL") {?>
    <a href="http://www.bizrate.com/ratings_guide/cust_reviews__mid--76686.html" target="www.bizrate.com"><img src="http://medals.bizrate.com/medals/dynamic/76686_medal.gif" alt="BizRate Customer Certified (GOLD) Site" width="125" height="73" border="0" /></a><a href="http://seals.squaretrade.com/cW054/706059633.map" target="_blank"><img src="http://seals.squaretrade.com/cW054/706059633.gif" alt="Smarter, Safer, Easier Online Shopping" border="0" ismap="ismap"  /></a>';
    Unfortunately, this does not work. So I need help doing this the right way.

    Thanks!

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

    Default Re: Need Help with Implementing Code

    You have the logic inside-out...
    Code:
    if($request_type=="NONSSL") $content .= '<a href="http://www.bizrate.com/ratings_guide/cust_reviews__mid--76686.html" target="www.bizrate.com"><img src="http://medals.bizrate.com/medals/dynamic/76686_medal.gif" alt="BizRate Customer Certified (GOLD) Site" width="125" height="73" border="0" /></a><a href="http://seals.squaretrade.com/cW054/706059633.map" target="_blank"><img src="http://seals.squaretrade.com/cW054/706059633.gif" alt="Smarter, Safer, Easier Online Shopping" border="0" ismap="ismap"  /></a>';
    However, as an aside, I'd be inclined to put the IF($request_type ... ) in a place that turns the sidebox off altogether, rather than create an empty sidebox on SSL pages due to blank content...
    .

    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
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Need Help with Implementing Code

    Quote Originally Posted by DrByte
    You have the logic inside-out...
    Code:
    if($request_type=="NONSSL") $content .= '<a href="http://www.bizrate.com/ratings_guide/cust_reviews__mid--76686.html" target="www.bizrate.com"><img src="http://medals.bizrate.com/medals/dynamic/76686_medal.gif" alt="BizRate Customer Certified (GOLD) Site" width="125" height="73" border="0" /></a><a href="http://seals.squaretrade.com/cW054/706059633.map" target="_blank"><img src="http://seals.squaretrade.com/cW054/706059633.gif" alt="Smarter, Safer, Easier Online Shopping" border="0" ismap="ismap"  /></a>';
    However, as an aside, I'd be inclined to put the IF($request_type ... ) in a place that turns the sidebox off altogether, rather than create an empty sidebox on SSL pages due to blank content...
    Thank you so much that works... actually the sidebox will not be empty. There are more content inside the box. You can take a look at the implementation here: http://www.clevershoppers.com it's the last side box on the left.

    Thanks Again!

 

 

Similar Threads

  1. v151 Need Help with Google Certified Shopping Code
    By riolas in forum General Questions
    Replies: 13
    Last Post: 20 Feb 2015, 07:34 PM
  2. several manufactures, need help with code
    By oberheimer in forum General Questions
    Replies: 4
    Last Post: 3 Feb 2011, 09:59 AM
  3. Desperatley Need Help with PHP / MYSQL code
    By philip937 in forum General Questions
    Replies: 19
    Last Post: 7 Oct 2009, 06:47 PM
  4. Help need to set up per zip code shipping module with 5 zip code areas flat fee
    By cshart in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 11 Feb 2009, 06:31 AM

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