Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Location
    Idaho
    Posts
    292
    Plugin Contributions
    0

    Default need php code advice

    Is there any way of nesting the call code, for a java popup window, within a php 'content' or 'define' element. I want to do this in a php template file --

    $content .= '<a href="#" onclick="javascript:window.open('https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');"><img src="includes/images/paypal_logo.gif" alt="We accept PayPal and Credit Cards" title="We accept PayPal and Credit Cards" width="140" height="162" border="0" /></a>
    -- but the punctuation inside the java code does not work well with the rest of the punctuation, and so it won't work. Is there a way of nesting or do I have to use traditional php echo to accomplish this?

    thank you..

  2. #2
    Join Date
    Oct 2010
    Location
    Idaho
    Posts
    292
    Plugin Contributions
    0

    Default Re: need php code advice -- solution

    escapes! Got it to work with escapes. Still need to check for compatibility w/ IE6 and IE7.

    http://www.vintage-adventures.com/

    There are still some extraneous attributes that I need to remove, but this calls a popup window with code (PayPal's suggested code) nested in the php $content element in the tpl file. It could also go in the 'define' element of the 'defines' file in languages, and then get called to the $content element in the tpl file.

    $content .= '<table border="0" cellpadding="0" cellspacing="0" align="center"><tr><td align="center"></td></tr><tr><td align="center"><a href="#" onclick="javascript:window.open(\'https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside\',\'olcwhatispaypal\',\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350\');"><img src="/images/icons/paypal_logo.gif" alt="We accept PayPal and Credit Cards" title="We accept PayPal and Credit Cards" width="140" height="162" border="0" /></a><br style="padding-bottom: 1px;" /></td></tr></table>';

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: need php code advice

    Isn't there already a PayPal sidebox for that?
    .

    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.

  4. #4
    Join Date
    Oct 2010
    Location
    Idaho
    Posts
    292
    Plugin Contributions
    0

    Default Re: need php code advice

    yes .. but it needs a bit of tweaking, and I wanted to use the trimmer popup window code suggested by PayPal, rather than the open whole browser code carried in Fowler's mod. I did start with Fowler's code, which I think was previously an effort of Kurori? I also blended the Fowler code a bit w/ the most recent iteration of the InstantSSL sidebox code, which I also adapted for PositiveSSL by Comodo ..

 

 

Similar Threads

  1. Need Advice on Php Version
    By rwoody in forum Installing on a Linux/Unix Server
    Replies: 23
    Last Post: 23 Mar 2010, 11:21 AM
  2. Php error need advice?
    By Treasuresbycaz in forum Basic Configuration
    Replies: 3
    Last Post: 8 Aug 2009, 07:03 PM
  3. Need a code for tpl_specials.php
    By Candylea in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 12 Nov 2008, 11:42 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