View Single Post
  #6  
Old 02-07-2007, 03:57 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: How to display all products that do not have a thumbnail

Updated coding so it works in latest v4.1.x branch ... Do everything it says but use the following as your prodwithoutimg.php file:
Code:
<?php require "./auth.php"; require $xcart_dir."/include/security.php"; $productlisting = func_query("SELECT xcart_products.productid, xcart_products.product FROM xcart_products LEFT OUTER JOIN xcart_images_T ON xcart_products.productid = xcart_images_T.id WHERE xcart_images_T.id IS NULL"); $smarty->assign("productlisting",$productlisting); $smarty->assign("main","prodwithoutimg"); @include $xcart_dir."/modules/gold_display.php"; $smarty->display("provider/prodwithoutimg.tpl"); ?>

And if you want clickable links in your list ... use the following as your prodwithoutimg.tpl file:
Code:
{capture name=dialog} <table border=0> <TR> <TD height="10"><b>Product Number</b></TD> <TD height="10"><b>Product Name</b></TD> </TR> {section name=productlisting loop=$productlisting} <TR> <TD height="10"><a href="{$catalogs.provider}/product_modify.php?productid={$productlisting[productlisting].productid}&page=1">#{$productlisting[productlisting].productid}</a></TD> <TD height="10"><a href="{$catalogs.provider}/product_modify.php?productid={$productlisting[productlisting].productid}&page=1">{$productlisting[productlisting].product}</a></TD> </TR> {/section} </table> {/capture} {include file="dialog.tpl" title="Products Without Images" content=$smarty.capture.dialog extra="width=100%"}
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote