You are here:  » Main and Thumb Image

Support Forum



Main and Thumb Image

Submitted by Gobbo on Sun, 2011-12-18 20:17 in

Hi David,

How is it possible to place a new field in feed registration so in the search it shows a tumbnail pic of the product, but it then shows a product picture on the product page?

Kind Regards,
Gobbo

Submitted by support on Mon, 2011-12-19 09:18

Hello Goboo,

Sure - first of follow the normal instructions for adding a new field to your database called thumbnail.

With that in place, re-register your feeds with the thumbnail image URL in the thumbnail field and the normal image URL as the Image URL field.

Finally, all that's required is to edit html/searchresults.php and perform a search and replace using your text editor to replace

image_url

with:

thumbnail

You may also want to make the same modification in html/featured.php if using Featured Products...

Cheers,
David.
--
PriceTapestry.com

Submitted by Gobbo on Sat, 2011-12-24 18:30

Hi David,

I did add thumbnail to my DB, but I delete it as the field I added to admin was was called Thubmnail_url so it did not link up.

I renamed dbmod.php and called it thubmnail_url, but it is not running the php file at all when I access it, would you know why?

Gobbo

Submitted by support on Sat, 2011-12-24 20:10

HI Gobbo,

There doesn't actually need to be an exact match between the name of the thumbnail field you add to the database, and the field names from feeds that you wish to map to if (on Feed Registration Step 2, just like any other fields)

For a .php file to execute it would need to be named something.php but there wouldn't actually be any correlation between the name of the dbmod.php file and the field to be added to the database.

So I think what I would suggest, as you say you have deleted the field would be to rename the database mod file back to dbmod.php and re-run that to add the field.

Next return to re-register one of your feeds that contains thumbnail images and re-register, and on Step 2 map the Thumbnail_url field to your new field and then register and import; and it should then show assuming changes made as above...

If it's still not working correctly, if you could perhaps email me your modified

config.php
...and also the dbmod.php that you used;

...and I'll double check everything and then can send you back some debug code to run that should indicate anything that's not quite right...

Cheers,
David.
--
PriceTapestry.com