View Full Version : product previews
web9000
September 9th, 2003, 01:50 PM
on the product detail page, i have no previews
i have removed the nav section completely and im assuming that has something to do with the previews?
i would like to have the preview thumbnails accross the bottom, is there some code i can use to call that info from the database and make the thumbs in a row instead of a column?
thanks
Jamie
September 9th, 2003, 03:14 PM
Hi,
This line in your cart page controls the product preview, which will display other items in the category of an item that was just clicked on:
<? include "$cart_isp_root/product_preview.php" ?>
You can accomplish the same with this code:
<? show_product_preview($crn) ?>
The difference between the 2 is the first method will be displayed in a navigation box (window.php), and the second method will not.
The templates that control the display of each item in the preview is show_product_image_bar.php. You may notice these files in the default theme folder as well:
show_product_image_bar_header.php
show_product_image_bar_footer.php
They are not currently used, so don't let them confuse you. :squirrel:
Thanks,
Jamie
web9000
September 10th, 2003, 03:09 PM
i used this code
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td valign="top">
Other Items in this Category<br>
<? show_product_preview($crn) ?>
</td>
</tr>
</table>
and i get this error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/home/machineryexchange/html/squirrelcart/functions/show_product_preview.func on line 18
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/home/machineryexchange/html/squirrelcart/functions/show_products.func on line 42
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/home/machineryexchange/html/squirrelcart/functions/show_products.func on line 42
Jamie
September 10th, 2003, 03:40 PM
That is probably because $crn is not always present. Try this instead:
<? if ($crn) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td valign="top">
Other Items in this Category<br>
<? show_product_preview($crn) ?>
</td>
</tr>
</table>
<? } ?>
Thanks,
Jamie
web9000
September 10th, 2003, 03:46 PM
ok, no more error, but no previews either :)
heres my entire show_product_detail.php
<center>
<form action="<?=$Form_Action?>" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td valign="top">
<?=$Image_in_Large_Image_Link?>
</td>
<td align="left" valign="top" style="width: 100%; vertical-align: top; text-align:left; margin-left: 2">
<div class="product_name" style="margin-bottom: 10; width: 100%">
<?=$Name?>
</div>
<div class="product_price" style="margin-bottom: 10; width: 100%">
<?=$Base_Price?><br><br>
<?=$Description?>
</div>
</td>
</tr>
</table>
<? if ($crn) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td valign="top">
Other Items in this Category<br>
<? show_product_preview($crn) ?>
</td>
</tr>
</table>
<? } ?>
</form>
</center>
Jamie
September 10th, 2003, 04:34 PM
Ah...I see. You actually need to put that code into your cart page, not in the show_product_detail.php.
-Jamie
web9000
September 10th, 2003, 07:02 PM
ok i give up
ill leave it on the right side where it was
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.