Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Help me add a Clickable Image to my sidebox

Help me add a Clickable Image to my sidebox

Views: 811

Results 1 to 6 of 6
19 Aug 2016, 9:15 PM
#1
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Help me add a Clickable Image to my sidebox

Hi
I am trying to insert a image onto my sidebox ..It's a image size of 121x61 px.Then when someone clicks on that image it will open a another image of a certificate I have for my website..
I have found some that do other things but can't find 1 that does this ... I suppose is it possible and 2 can someone point me to a page that can help me achieve this as am happy to try figure it out myself

thanks

19 Aug 2016, 10:12 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,799
Plugin Contributions:
15

Re: Help me add a Clickable Image to my sidebox

You might try searching thru the Plugins using the term sidebox. Many options.

19 Aug 2016, 11:15 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help me add a Clickable Image to my sidebox

Usually when someone says "sidebox" and "image" and "certificate" in the same post they're wanting (but not telling that they want) to display something to suggest that their site uses SSL or some other thingy to make their site secure or trustworthy.

There are dozens of sidebox plugins already geared specifically to that.

Or you can write your own. In that case a good starting point could be: https://www.zen-cart.com/downloads.php?do=file&id=80

You said: "clickable link" which will "open another image". That involves 4 parts:
a) the clickable image file uploaded someplace on your server
b) the "another image" file uploaded someplace on your server
c) the sidebox HTML to contain the clickable image:

<a href="destination_url"><img src="clickable image filename"></a>

d) and a decision about what exactly you want to happen when they click (a new page to open, or a javascript popup) ... and all the corresponding code for that destination action to occur

20 Aug 2016, 11:10 AM
#4
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: Help me add a Clickable Image to my sidebox

Hi,I am already using the blank sidebox add on as that's where I want to place it
I have already done A & B ,it is just trying to figure out how to do it..
Suppose the best example I can find is on "that software guy" website the green review button on the right.

Is there anything wrong with doing what I am wanting to do ..Or should I just leave it off and forget it

20 Aug 2016, 1:56 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help me add a Clickable Image to my sidebox

Iterate.

  1. for destination_url just put the URL to your image file. ie: <img src="//your_domain.com/images/filename.jpg">
    Done.

  2. Then if you wanted that to load in a popup window instead, you could make further alterations by using something akin to:```

<script type="text/javascript"> function popupImageWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=550,screenX=150,screenY=100,top=100,left=150') } </script>

<a href="javascript:popupWindow(\'images/filename.jpg\')"><img src="//your_domain.com/images/filename.jpg"></a>

These are just ideas taken from the ZC shopping_cart page template components.
20 Aug 2016, 3:40 PM
#6
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: Help me add a Clickable Image to my sidebox

Thanks , that's exactly what I needed ,had to remove 1 of the backslashes in the last line.
Just trying to get the pop up bigger as it is very small :)