Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    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
    Cumbria, UK
    Posts
    10,262
    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.
    19 years a Zencart User

  3. #3
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    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
    157
    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,678
    Plugin Contributions
    3

    Default Re: Need help placing logo in the main page

    Javascript is fine in sideboxes. Does the box apppear without the coding installed?

  6. #6
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    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
    22,010
    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
    157
    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
    22,010
    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
    157
    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. HELP!!!!!....Need to center My logo hench logo.gif on my main page
    By Robert Cooper in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Jul 2013, 01:33 PM
  2. 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
  3. 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
  4. Placing a link directly on the Main Page
    By wwwursa in forum General Questions
    Replies: 6
    Last Post: 1 Aug 2008, 12:45 PM
  5. Page Hangs After Placing Order (Need Help)
    By tmcashan in forum General Questions
    Replies: 7
    Last Post: 7 Jun 2007, 09:14 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