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>
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.
Re: Need help placing logo in the main page
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?
Re: Need help placing logo in the main page
Javascript is fine in sideboxes. Does the box apppear without the coding installed?
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?
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>';
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
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.
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.:clap: