Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2009
    Location
    New York
    Posts
    125
    Plugin Contributions
    0

    Default Need help placing logo in the main page

    In one of my stores I use the Ccavenue payment module. Their website offers the following code for placing the logo. I placed the code in tpl_main_page.php in common under custom template. The logo appears but below the lower navigation bar and to the left of everything. I tried using a blank column sidebox but I am not sure where to place the code. Any suggestions?
    <script language='JavaScript'>
    function openLogo(ClientID)
    {
    var attributes = 'toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars=1,resizable=1,width=550,height=600,left=0,top=0';
    sealWin=window.open('http://www.ccavenue.com/verifySeal.jsp?ClientID='+ClientID ,'win',attributes);
    self.name = 'mainWin';
    }
    </script>
    <table border=0 width="118" cellpadding="0" cellspacing="0">
    <tr>
    <td align=center valign="top" >
    <a href = "javascript:openLogo('Place Your Merchant ID Here')">
    <img src="http://www.ccavenue.com/images/129.gif" >
    </a>
    </td>
    </tr>
    </table>
    <font face="Verdana, Arial, Helvetica, sans-serif" size=1><b>
    <a href="http://www.ccavenue.com/">Merchant account,</a>
    <br>
    <a href="http://www.ccavenue.com/content/credit_card_processing.jsp">Credit
    Card Processing</a>
    <br>
    <a href="http://www.ccavenue.com/">Payment Gateway</a></b>
    </font>

  2. #2
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,952
    Plugin Contributions
    3

    Default Re: Need help placing logo in the main page

    Best place to put this is probably in a sidebox. Use the BLANK SIDEBOX add-on, and insert the html and code there, and then make the sidebox active as you would with any other sidebox.
    Our latest project is Pet Tags.

  3. #3
    Join Date
    Mar 2009
    Location
    New York
    Posts
    125
    Plugin Contributions
    0

    Default Re: Need help placing logo in the main page

    Thanks. I will try that.

  4. #4
    Join Date
    Mar 2009
    Location
    New York
    Posts
    125
    Plugin Contributions
    0

    Default Re: Need help placing logo in the main page

    I installed and activated the blank sidebox but there is no trace of the box anywhere. Is Java Script a "no,no" here?

  5. #5
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,650
    Plugin Contributions
    1

    Default Re: Need help placing logo in the main page

    Javascript is fine in sideboxes. Does the box apppear without the coding installed?
    Bumble Bee Template - my first contribution!

    The best way to learn is to try stuff. But, back it up first.

  6. #6
    Join Date
    Mar 2009
    Location
    New York
    Posts
    125
    Plugin Contributions
    0

    Default Re: Need help placing logo in the main page

    When I put the jscript in tpl_main_page.php everything works fine except the location of the logo is below the lower navigation bar to the left of left column. When I put it in blank box nothing is there neither the box nor the logo. I noticed that the html code expects some text but the output of jscript is a flashing logo. May be there is a conflict there?

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,819
    Plugin Contributions
    25

    Default Re: Need help placing logo in the main page

    No, you can have any HTML output you like from a blank sidebox, including javascript code. It's just a matter of how you handle it. One possibility is that there are nested single or double quotes that are causing a fatal error.
    This would be something like

    $content .= 'Some HTML content <script blah="something.nothing 'broken.here' " ></script>';

    If you repeat quotes nested inside other quotes, you need to escape the inner ones with a backslash \.

    $content .= 'Some HTML content <script blah="something.nothing \'broken.here\' " ></script>';

  8. #8
    Join Date
    Mar 2009
    Location
    New York
    Posts
    125
    Plugin Contributions
    0

    Default Re: Need help placing logo in the main page

    I have given my jscript above. As you say single script before javascript may be causing the problem. Can't wait to go home from work and check it out

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,819
    Plugin Contributions
    25

    Default Re: Need help placing logo in the main page

    You do have both single and double quotes in your code, so whatever kind of quotes you used to enclose it for assigning the string to $content you would have problems. If your file looks like

    $content .= '...your code...';

    then escape all single quotes inside your code with backslashes.

  10. #10
    Join Date
    Mar 2009
    Location
    New York
    Posts
    125
    Plugin Contributions
    0

    Default Re: Need help placing logo in the main page

    That was it. Once I added \ before quotes everything works fine. You are a genius. Thanks a million.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Placing an image on the main page wont align correctly
    By jaidee in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 11 Jul 2009, 07:26 AM
  2. Making an imagemap or placing links to the right of the logo?
    By yelow in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 16 Oct 2008, 03:28 PM
  3. Placing a link directly on the Main Page
    By wwwursa in forum General Questions
    Replies: 6
    Last Post: 1 Aug 2008, 12:45 PM
  4. Placing My Top header (Logo)
    By classact in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Nov 2007, 11:13 PM
  5. Logo & Main page help please
    By frugalscrapper in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 29 May 2006, 09:29 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
  •