X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Detailed Product Images Popup on Thumbnail click. (https://forum.x-cart.com/showthread.php?t=202)

Tye 08-18-2003 05:27 AM

ignore last post! I am so stupid at times! nm
 
nm

Tye 08-20-2003 04:32 AM

So Far So Good!
 
I have the detailed products working ok but I would like the thumbnail to link to a pdf...

You can see where I am up to live at:

http://www.cableeducational.com/xcart/customer/product.php?productid=20357&cat=328&page=1


Any suggestions welcome!


Tye

finestshops 08-20-2003 05:37 AM

Re: So Far So Good!
 
Quote:

Originally Posted by Tye
I have the detailed products working ok but I would like the thumbnail to link to a pdf...


If your "product_images.tpl" template add <a href... tag like this:

change:

Code:

[img]../product_image.php?imageid={$images[image].imageid}[/img]

to

Code:

<a href="http://www.yourdomain.com/pdf_files/{$productid}.pdf" target="_new">
[img]../product_image.php?imageid={$images[image].imageid}[/img]</a>


Tye 08-22-2003 05:38 AM

Thanks for the replies!
 
I have edited the /modules/Detailed_Product_Images/product_images.tpl

and it is half way there but still some glitches on the page:

the image is now linkable but it is not picking up the {$productid}. in the link.

also the thumbnail has vanished.

http://www.cableeducational.com/xcart/customer/product.php?productid=20357&cat=328&page=1


The script i have is as follows:

{* $Id: product_images.tpl,v 1.6 2002/05/20 06:55:24 lucky Exp $ *}
{if $images ne ""}
{capture name=dialog}
{section name=image loop=$images}


{if $images[image].avail eq "Y"}



<a href="http://www.cableeducational.com/pdf_files/{$productid}.pdf" target="_new">
[img]../product_image.php?imageid={$images[image].imageid}[/img]</a>



<a>For further information, please contact:

Andrew Sellers or Kim Franks at Cable Educational Ltd
Telephone 01723 890351
[b]andrew@cableeducational.com
kim@cableeducational.com



{/if}
{/section}
{/capture}
{if $smarty.capture.dialog ne ""}
{include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra="width=100%"}
{/if}
{/if}


Regards

Tye :?

finestshops 08-22-2003 05:53 AM

in the "xcart/customer/product_detailed_images.php" you have to add

Code:

$smarty->assign("productid",$productid);

Tye 08-22-2003 06:41 AM

done that!
 
<?
require "../smarty.php";
require "../config.php";

#
# Collect product images
#
$images = func_query("select * from $sql_tbl[images] where productid='$productid' order by imageid");

$smarty->assign("productid",$productid);

$smarty->assign("images",$images);
$smarty->display("modules/Detailed_Product_Images/product_images.tpl");

?>


Whats the next step!

finestshops 08-22-2003 07:51 AM

I did not know you are not using popup for detailed images.

in product_images.tpl change

Code:

<a href="http://www.cableeducational.com/pdf_files/{$productid}.pdf" target="_new">

to

Code:

<a href="http://www.cableeducational.com/pdf_files/{$product.productid}.pdf" target="_new">

Tye 08-26-2003 02:45 AM

Fantastic!
 
You sir are a ledgend!

Now is it possible to have more than one detailed image per product!

Regards

Tye

sabrina 09-03-2003 07:45 AM

This script not working in 3.4.5 version atall. Can you help inplement this script in 3.4.5? Thank you

finestshops 09-03-2003 08:15 AM

Quote:

Originally Posted by sabrina
This script not working in 3.4.5 version


What kind of error are you getting?


All times are GMT -8. The time now is 05:20 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.