You are here:  » Force Image Size

Support Forum



Force Image Size

Submitted by Gobbo on Thu, 2011-12-01 19:25 in

Hi David,

We have three sizes of image, 100x100px, 200x200px and original image, we registered the original image thinking all retailers would optimise the image file size, we were wrong. So without re-registering all the feeds again how can we force PT only to select a 200x200px image?

Kind Regards,
Gobbo

Submitted by support on Fri, 2011-12-02 08:49

Hi Gobbo,

In order to avoid re-registering the field mapping would have to be changed with a modification directly to the database. This is straight forward but would require that all your feeds are of the same format (e.g. from the same affiliate network).

The following script will modify the image_url field for all registered feeds to image_200 - change this as required for your situation (if you're not sure exactly what field name to use, go to Feed Registration Step 2 for one of your feeds and copy the field name from the same data shown below the form....

<?php
  
require("includes/common.php");
  
$sql "UPDATE `".$config_databaseTablePrefix."feeds`
            SET field_image_url = 'image_200'"
;
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

Create the above as dbmod.php, upload to your main Price Tapestry installation folder and browse to the script once, then delete the file. Finally, re-import all feeds for the new field mapping to take effect...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com