How to add a text link to the full size image

Mutant

Avatar: Mutant

2011-08-31 12:49

In Quick.Cart 2.0, I added this code to product_details.tpl (line 38)

<a href="javascript:windowNew( '/$aList[sPhotoBig]' )">View large image...</a>

in order to add a text link to the full size image (request from my client).

In Quick.Cart 4.1, products_default.tpl seems to be the place (line 21) but the above code doesn't work anymore.

How should it be written?

» Quick.Cart v4.x

cgan

Avatar: cgan

2011-08-31 15:42

You can try this:
<a href="#" onClick="window.open('$config[dir_files]/$aData[sFileName]')" >View large image...</a>

cgan

Mutant

Avatar: Mutant

2011-09-01 10:49

Thanks.

However, that gives me a "403 Forbidden: You don't have permission to access /QC41/files// on this server" in a new window.

No way to invoke the same LightBox script as the thumbnail image does?

rzyber

Avatar: rzyber

2011-09-01 15:55

Try

<a href="$config[dir_files]$aData[sFileName]" rel="lightbox-product" title="$aData[sDescription]">View large image...</a>

Mutant

Avatar: Mutant

2011-09-01 19:48

Thanks rzyber - this loads LightBox but it just keeps spinning (probably the image can't be found). Any idea how to set it straight?

Mutant

Avatar: Mutant

2011-09-01 19:52

I think it just tries to load files/ meaning the file name is not included. Any ideas?

Mutant

Avatar: Mutant

2011-09-03 14:29

Could this be some sort of permissions issue? My files folder is set to 777.

Mutant

Avatar: Mutant

2011-09-05 12:56

<a href="$config[dir_files]$aData[sFileName]" rel="lightbox-product" title="$aData[sDescription]">View large image...</a>

OK, something must be wrong with this code after all.

When I hover over the text link, the URL only points to http://www.example.com/files/

When I hover over the image, the URL points to http://www.example.com/files/image.jpg

Any ideas?

cgan

Avatar: cgan

2011-09-06 08:27

You got to put the link in products_default.tpl in some of the images blocks, line 51 to 54.

cgan

Mutant

Avatar: Mutant

2011-09-06 10:56

Thanks!

Finally, this works (line 52):

<!-- BEGIN IMAGES_LIST_DEFAULT --><li><a href="$config[dir_files]$aData[sFileName]" rel="lightbox-product" title="$aData[sDescription]"><img src="$config[dir_files]$aData[iSizeValue2]/$aData[sFileName]" alt="$aData[sDescription]" /></a>$aData[sDescriptionContent]<br><a href="$config[dir_files]$aData[sFileName]" rel="lightbox-product" title="$aData[sDescription]">View large image...</a></li><!-- END IMAGES_LIST_DEFAULT -->

Back to top
about us | contact