Here's a simple script that may help with the updating of existing products:
Code:
<?php
# grab all images paths and redefine and copy to new field
# cart-lab.com
require "./auth.php";
$sql=func_query("SELECT productid,image_path,image_type FROM $sql_tbl[thumbnails] WHERE image_type = 'image/pjpeg'");
foreach($sql as $k=>$v) {
$small_thumb = eregi_replace("thumb","small",$v[image_path]);
if(file_exists($small_thumb)) {
db_query("UPDATE $sql_tbl[thumbnails] SET thumb_path='$small_thumb' WHERE productid='$v[productid]'");
print "Updating $v[productid]...
";
} else {
db_query("UPDATE $sql_tbl[thumbnails] SET thumb_path='' WHERE productid='$v[productid]'");
print "File Not Found.
";
}
}
print "Done.";
?>