Forums / Addon Templates / Need help placing logo in the main page

Need help placing logo in the main page

Views: 2,481

Results 1 to 13 of 13
8 Jan 2012, 11:11 PM
#1
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

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>
8 Jan 2012, 11:33 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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.

20 years a Zencart User

8 Jan 2012, 11:44 PM
#3
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

Re: Need help placing logo in the main page

Thanks. I will try that.

8 Jan 2012, 11:58 PM
#4
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

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?

10 Jan 2012, 1:30 AM
#5
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Need help placing logo in the main page

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

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

10 Jan 2012, 2:59 AM
#6
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

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?

10 Jan 2012, 6:34 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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>';

10 Jan 2012, 1:14 PM
#8
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

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

10 Jan 2012, 2:05 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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 Jan 2012, 9:33 PM
#10
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

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:

14 Jan 2012, 7:04 PM
#11
gcarrier avatar

gcarrier

New Zenner

Join Date:
Jan 2012
Posts:
6
Plugin Contributions:
0

Re: Need help placing logo in the main page

I was searching for an existing thread and this is the closest and most recent thread to my problem.

I'm trying to lower my logo so that it's horizontal with "Home" and "Login" buttons on the right side of the page.

gamescarrier.com

Please help.

14 Jan 2012, 8:37 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Need help placing logo in the main page

Your Template Monster template has a div named .clear whose purpose is to keep the logo from displaying on the same line as the menu. Add to your stylesheet

.currencies+.clear {display: none;}