I wanted to use the category functionality to list Б─°give awayБ─² stuff, but not have to force my customers to the product detail page and scroll down to see a larger image.
This a quick and dirty way of dealing with providing detail images on the category pages. I only have a few products I need this for, so if youБ─≥re implementing detail images for a whole mess of products there are better solutions out there.
The images used are on the file system (not in the SQL database)
You need four images, the Б─°click to enlargeБ─² button, Б─°click to closeБ─² button, Б─°click to closeБ─² backgroundБ─² and your detailed image. Upload to your images folder.
http://www.ecartstore.com/skin1/images/gpis/CLICKTOENLARGE.gif
http://www.ecartstore.com/skin1/images/gpis/CLICKTOCLOSE.gif
http://www.ecartstore.com/skin1/images/gpis/CLICKTOCLOSEbann.gif
Add the follow code between the <HEAD> and </HEAD> section in customer/home.tpl
Code:
{literal}
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
{/literal}
From the administration backend Add the following code to the Б─°Short DescriptionБ─² field of the product.
Code:
<div id="Layerpix1" style="position:absolute; border: 1px solid #666666;width:auto; height:auto; z-index:1000; background-image: url('skin1/images/CLICKTOCLOSEbann.gif'); visibility: hidden; overflow: hidden;">
[img]skin1/images/CLICKTOCLOSE.gif[/img]
[img]skin1/images/templates/basicyello_500.gif[/img]
</div>
[img]skin1/images/CLICKTOENLARGE.gif[/img]
any text you want to show up in the short description
Admin screen should appear as follows;
http://www.ecartstore.com/skin1/images/gpis/exDesc.gif
This is what you should get;
Not clicked
http://www.ecartstore.com/skin1/images/gpis/exclickoff.gif
Clicked
http://www.ecartstore.com/skin1/images/gpis/exclickon.gif
NOTE: use the Б─°topБ─² and Б─°leftБ─² modifiers if you want the image to appear in a specific location on the screen.
The name of the Layers MUST be different for every occurance of a detail image e.g. Layerpix1, Layerpix2, etc.[/img]