Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Detailed Product Images Popup on Thumbnail click.

 
Closed Thread
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 08-18-2003, 05:27 AM
 
Tye Tye is offline
 

eXpert
  
Join Date: Nov 2002
Location: Australia
Posts: 284
 

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

nm
__________________
Today is a beautiful day, grab it while you can and live it to the full

Version 4.2.3 UNIX
  #32  
Old 08-20-2003, 04:32 AM
 
Tye Tye is offline
 

eXpert
  
Join Date: Nov 2002
Location: Australia
Posts: 284
 

Default 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
__________________
Today is a beautiful day, grab it while you can and live it to the full

Version 4.2.3 UNIX
  #33  
Old 08-20-2003, 05:37 AM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default 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>
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
  #34  
Old 08-22-2003, 05:38 AM
 
Tye Tye is offline
 

eXpert
  
Join Date: Nov 2002
Location: Australia
Posts: 284
 

Default 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
__________________
Today is a beautiful day, grab it while you can and live it to the full

Version 4.2.3 UNIX
  #35  
Old 08-22-2003, 05:53 AM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default

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

Code:
$smarty->assign("productid",$productid);
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
  #36  
Old 08-22-2003, 06:41 AM
 
Tye Tye is offline
 

eXpert
  
Join Date: Nov 2002
Location: Australia
Posts: 284
 

Default 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!
__________________
Today is a beautiful day, grab it while you can and live it to the full

Version 4.2.3 UNIX
  #37  
Old 08-22-2003, 07:51 AM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default

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">
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
  #38  
Old 08-26-2003, 02:45 AM
 
Tye Tye is offline
 

eXpert
  
Join Date: Nov 2002
Location: Australia
Posts: 284
 

Default Fantastic!

You sir are a ledgend!

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

Regards

Tye
__________________
Today is a beautiful day, grab it while you can and live it to the full

Version 4.2.3 UNIX
  #39  
Old 09-03-2003, 07:45 AM
 
sabrina sabrina is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Indianapolis, IN., USA
Posts: 53
 

Default

This script not working in 3.4.5 version atall. Can you help inplement this script in 3.4.5? Thank you
  #40  
Old 09-03-2003, 08:15 AM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default

Quote:
Originally Posted by sabrina
This script not working in 3.4.5 version

What kind of error are you getting?
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
Closed Thread
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:46 AM.

   

 
X-Cart forums © 2001-2020