View Single Post
  #36  
Old 02-20-2004, 08:56 AM
 
Darren Darren is offline
 

Member
  
Join Date: Dec 2002
Posts: 19
 

Default

This is a great mod, but how would we add a thumbnail picture?

Thanks!

Quote:
Originally Posted by cyberactive
Here's my php code to create a product list.

I've made a seperate php file for this. But I don't know how to integrate it into the look and feel of X-cart....

Code:
<TABLE ALIGN=CENTER VALIGN=TOP WIDTH=100%> <? $db = mysql_connect("address","username","password"); mysql_select_db("datasename",$db); $cats = mysql_query("SELECT * FROM xcart_categories order by category"); while ($row1 = mysql_fetch_array($cats)) { $currentcat = $row1["category"]; echo " <tr> <td> </td> </tr> <tr> <td width=\"300\"> <font face=\"arial\">$currentcat:</font> </td> </tr> "; $result = mysql_query("SELECT xcart_categories.category, xcart_pricing.price, xcart_products.product, xcart_products.descr FROM (xcart_categories INNER JOIN xcart_products ON xcart_categories.categoryid=xcart_products.categoryid) INNER JOIN xcart_pricing ON xcart_pricing.productid=xcart_products.productid WHERE xcart_categories.category = \"$currentcat\""); while ($myrow = mysql_fetch_array($result)) { $product = $myrow["product"]; $prijs = $myrow["price"]; $desc = $myrow["desc"]; echo " <tr> <td> <font face=\"arial\">$product</font> </td> <td width=\"100\" align=\"right\"> <font face=\"arial\">$prijs</font> </td> </tr> "; } } ?> </table>
Reply With Quote