| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to display all products that do not have a thumbnail | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
How to display all products that do not have a thumbnail
As I'm always here asking questions, I thought I would offer what I can, I added this code to my version of xcart 3.5.10 so I can see what products need a thumbail. This page lists them all in one big list, and links the product number to the product_modify page for that product.
I cannot guarantee the safety of this mod, all I know is it works for me, on my system. Add the following to common_templates.tpl: {elseif $main eq "prodwithoutimg"} {include file="provider/prodwithoutimg.tpl"} create a file called prodwithoutimg.tpl containing: {capture name=dialog} <table border=0> <TR> <TD height="10">Product Number</TD> <TD height="10">Product Name</TD> </TR> {section name=productlisting loop=$productlisting} <TR> <TD height="10">{$productlisting[productlisting].productid}</TD> <TD height="10">{$productlisting[productlisting].product}</TD> </TR> {/section} </table> {/capture} {include file="dialog.tpl" title="Products Without Images" content=$smarty.capture.dialog extra="width=100%"} Upload prodwithoutimg.tpl to skin1/provider/ create a file called prodwithoutimg.php containing: <?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_thumbnails ON xcart_products.productid = xcart_thumbnails.productid WHERE xcart_thumbnails.productid IS NULL"); $smarty->assign("productlisting",$productlisting); $smarty->assign("main","prodwithoutimg"); @include $xcart_dir."/modules/gold_display.php"; $smarty->display("provider/prodwithoutimg.tpl"); ?> Upload this file to provider/ create a link to provider/prodwithoutimg.php somewhere to access the page, I have it in my provider/menu.tpl file: Products Without Images so it appears in the products menu when I log in. hth Amy
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#2
|
|||||||
|
|||||||
Moving to Custom Mods...thanks for sharing
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||||
|
|||||||||
Re: How to display all products that do not have a thumbnail
Works GREAT! Any chance you could modify this to show which products do not have a detail image. I suspect it's fairly simple but a I don't want to take a chance and screw it up.
__________________
x-cart gold ver 4.1.9 Customized / XAOM ver 4.1.19 / XAOM / XAFFIL |
|||||||||
#4
|
|||||||
|
|||||||
Re: How to display all products that do not have a thumbnail
anyway to make the product code a link so it takes you directly to the product?
__________________
version 4.0.17 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: How to display all products that do not have a thumbnail
Quote:
I'd really like that feature too but I am very happy with what I have so far. I'd still like to see a version that shows which products don't have a detailed image associated with them.
__________________
x-cart gold ver 4.1.9 Customized / XAOM ver 4.1.19 / XAOM / XAFFIL |
|||||||||
#6
|
|||||||||
|
|||||||||
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:
And if you want clickable links in your list ... use the following as your prodwithoutimg.tpl file: Code:
__________________
Darren Kierman Carlisle Glass (http://www.carlisleglass.co.uk/) ... running X-Cart Gold 4.4.5 [unix] |
|||||||||
#7
|
|||||||
|
|||||||
Re: How to display all products that do not have a thumbnail
Hi, would you be able to tell me where I find the prodwithoutimg.tpl file:
and do I replace the whole file or just add the html to the file?
__________________
4.1.8 |
|||||||
#8
|
|||||||||
|
|||||||||
Re: How to display all products that do not have a thumbnail
You have to create that file - it doesn't exist in x-cart.
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#9
|
|||||||||
|
|||||||||
Re: How to display all products that do not have a thumbnail
Quote:
HI Amy, Done all but confuse with Step 6 just add following to provider/menu.tpl ? <a href="{$catalogs.provider}/prodwithoutimg.php" </a> Then where can i see it? |
|||||||||
#10
|
|||||||||
|
|||||||||
Help Help
HI,
Can someone help please? Now i found how to do above <a href="{$catalogs.provider}/prodwithoutimg.php" target="_blank"><b>Products Without Images</b></a> But i got this error? INVALID SQL: 1146 : Table 'netit_xcart.xcart_thumbnails' doesn't exist SQL QUERY FAILURE:SELECT xcart_products.productid, xcart_products.product FROM xcart_products LEFT OUTER JOIN xcart_thumbnails ON xcart_products.productid = xcart_thumbnails.productid WHERE xcart_thumbnails.productid IS NULL How do i search Images in Skin1\images folder? Thanks, |
|||||||||
|
|||
X-Cart forums © 2001-2020
|