Interact
04-11-2010, 10:07 AM
Hi there I wonder if some of you bright sparks can help me please?
I have a simple shopping basket that doesn't provide a image preview tool its very basic as its free) and I wish to use lightbox as a preview; I'm not a coder but I wonder if someone could look at the code below and tell me how I can fix it so it works with lightbox?
This is the php code that collects the product image:
<?php
if (is_file($SETTINGS["path"]."products/".$PRODUCT["image"])) echo "<img src='".$SETTINGS["URL"]."products/".$PRODUCT["image"]."' class='ProductImage' border='0'>";
?>
This is the code for lightbox to work:
rel="lightbox"
I've had a go myself and managed to have the lightbox window open but no image shows, this is the code:
<a href="#" border="0" rel="lightbox">
<?php
if (is_file($SETTINGS["path"]."products/".$PRODUCT["image"])) echo "<img src='".$SETTINGS["URL"]."products/".$PRODUCT["image"]."' class='ProductImage' border='0'>";
?></a>
Of course I know the # should be the link for the image but I just can't get it to work.
Please can someone help me here?
Thanks
I have a simple shopping basket that doesn't provide a image preview tool its very basic as its free) and I wish to use lightbox as a preview; I'm not a coder but I wonder if someone could look at the code below and tell me how I can fix it so it works with lightbox?
This is the php code that collects the product image:
<?php
if (is_file($SETTINGS["path"]."products/".$PRODUCT["image"])) echo "<img src='".$SETTINGS["URL"]."products/".$PRODUCT["image"]."' class='ProductImage' border='0'>";
?>
This is the code for lightbox to work:
rel="lightbox"
I've had a go myself and managed to have the lightbox window open but no image shows, this is the code:
<a href="#" border="0" rel="lightbox">
<?php
if (is_file($SETTINGS["path"]."products/".$PRODUCT["image"])) echo "<img src='".$SETTINGS["URL"]."products/".$PRODUCT["image"]."' class='ProductImage' border='0'>";
?></a>
Of course I know the # should be the link for the image but I just can't get it to work.
Please can someone help me here?
Thanks