15 replies [Last post]
lyle.pratt's picture
Offline
Joined: 07/04/2008
Juice: 37
Was this information Helpful?

I recently installed a test of Drupal/Ubercart on one of my test servers. I added a test product and uploaded 3 pictures for the product. My problem is that the 3 pictures are displayed in Full Size on every page that the product is listed. How do I enable thumbnails for these product images? I am quite sure that I have all modules that are required installed, but I see no place to enable thumbnails on product pages, cart pages, etc.

It is highly plausible that I am just an idiot and am missing something on a configuration page.

Thanks for any help!!

-sunsu

PreviewAttachmentSize
bigpics.JPGbigpics.JPG122.2 KB
lyle.pratt's picture
Offline
Joined: 07/04/2008
Juice: 37
Re: having trouble getting product thumbnails to work

I suppose that the thumbnails are dependent on the theme one is using. But is that the only dependency? Do you have to go in an explicitly set an image thumbnail size? How do you know what size to set for a theme?

If this is too broad, I sincerely apologize.

-sunsu

littly_kitty's picture
Offline
Bug Finder
Joined: 01/20/2008
Juice: 155
Re: Re: having trouble getting product thumbnails to work

Thumbnails are controlled by Imagecache (yoursite.com/admin/build/imagecache) and not the theme you are using.

If you see no options on the image cache page, then check that image support has been set up properly by looking at the status message on yousite.com/admin/store.
If you haven't installed image cache yet, be sure to install version 1.6 (and not 2.1). Smiling

10o
10o's picture
Offline
Joined: 11/18/2008
Juice: 33
Imagecache 2.2

I have Imagecache 2.2 installed and am experiencing the same problem. There was a list of presets though:

Preset Name Acties
cart bewerken    verwijderen    flush
product bewerken    verwijderen    flush
product_list bewerken    verwijderen    flush
uc_category bewerken    verwijderen    flush
uc_thumbnail bewerken    verwijderen    flush

All of which were empty. After trying to install Imagecache 1.7 no pictures were show at all and there were several warnings. After reinstalling 2.2 the (large) product images are back, but the list of presets is gone.

What's the best route to follow to get things working properly?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Imagecache 2.2

If the product module just won't set this up properly, you can make the presets yourself. Use the exact names as listed here, and give them each a Scale action to start off with. The exact sizes don't really matter as long as you like them. "product" and "product_list" are the same size by default, and uc_thumbnail is typically pretty small, like 50 by 50 pixels.

10o
10o's picture
Offline
Joined: 11/18/2008
Juice: 33
Re: Re: Imagecache 2.2

Thanks Lyle for your quick response.
Does Imagecache 2.2 work with Übercart now or is it necessary to use 1.7 or even 1.6?

10o
10o's picture
Offline
Joined: 11/18/2008
Juice: 33
Fatal error!

I removed Imagecache 2.2 and installed 1.7 and for the first time I saw some thumbnails.
But after clicking a thumbnail I got a fatal error:
Fatal error: Call to undefined function imagecache_presets() in /usr/home/-----/modules/thickbox/thickbox.module on line 176
The site is not accesible anymore because of this error. Only when I remove the imagecache folder, I can access the site again.
Ok, uploaded Imagecache again and got things up and running.
When I click a thumbnail now, I enter the product details instead of Thickbox showing the original image.
What can I do?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Fatal error!

The problem you ran into is related on the Thickbox project page. Thickbox 2.x is only compatible with ImageCache 2.x, so you should be using the latest versions of the 1.x branches for both modules.

10o
10o's picture
Offline
Joined: 11/18/2008
Juice: 33
Solved!

Thanks Ryan, downgraded to Thickbox 1.2 and all is working just fine now! Smiling

smlswhl's picture
Offline
Joined: 12/08/2008
Juice: 4
Re: Solved!

i too am having trouble with thumbnails (on http://brazealhome.com/). when i try to download to thickbox 1.2 i get an error on any page of the site. any suggestions?

smlswhl's picture
Offline
Joined: 12/08/2008
Juice: 4
Re: Re: Solved!

okay actually after searching around more the problem is more likely imagecache 2.1. how do i downgrade to imagecache 1.7 or up to 2.2?

Jay Adan's picture
Offline
Joined: 06/30/2009
Juice: 39
Re: Re: Re: Solved!

Sorry about the thread necromancy, but I'm having a similar issue... though it seems more configuration related than anything.

Here's the dilemma:

I have ubercart 2 installed, all is working well. Images appear just fine everywhere but in product grids. Here's an example:

http://greenfieldgames.com/catalog/83

As you can see, no product thumbnails appear in this list. But if you go here:

http://greenfieldgames.com/node/1381?size=thumbnail

You can see that the thumbnails are actually there. They just aren't appearing on the grid and "N/A" appears in their place (well, only when you show the list in a single column, not in the previous example).

What am I doing wrong?

Thanks for the help!

plasticlax's picture
Offline
Joined: 10/22/2008
Juice: 45
missing thumbs in grid

Jay i am having the same issue. when i look at the page source, there isn't even a reference to the image (which i can see fine when i browse it directly, as can you), so i guess drupal is deciding that the picture is "n/a" before it even renders the page. all other images on the site worked fine after some imagecache flushing and so on, including the same preset used for other node types and including the product pictures in the detailed view, as well as the catalog images. in my case i just upgraded from drupal5/uc1.

recently when trying to edit a product, i got the following error:
Column 'field_image_cache_fid' cannot be null query: INSERT INTO usa_content_field_image_cache (vid, nid, delta, field_image_cache_fid, field_image_cache_list, field_image_cache_data) VALUES (1529, 341, 0, NULL, NULL, NULL) in /var/www/example.com/sites/all/modules/cck/content.module on line 1213.

even newly created products do this.

i can only trace the problem to line 1323 (or so) of uc_product/uc_product.module, the if statement fails:

if (($field = variable_get('uc_image_'. $node->type, '')) && isset($node->$field) && file_exists($node->{$field}[0]['filepath'])) {

i don't even think the first phrase is succeeding and i don't think there is a "uc_image_product" in the variable table

which leads me to http://drupal.org/node/427658 where i learned that in fact the problem is:

Administer - Content Type - Product - Ubercart Product Settings - Product image field (Select the image field from the list)

(thanks to http://drupal.org/node/427658#comment-2094034 for pointing this out. I don't think there is an equivalent setting in D5/UC1)

Jay Adan's picture
Offline
Joined: 06/30/2009
Juice: 39
Re: missing thumbs in grid

Well, it turned out that my problem was user error, not Ubercart error. I never set up the permissions correctly then I compounded the error by using IMAGE to set up the image classes for Ubercart (instead of ImageCache). This is why I could never figure out the problem. Using Image mostly worked... just not for the product list thumbnails.

Anyway, after two full days of upgrading everything I finally stumbled across my initial error and fixed it up.

plasticlax's picture
Offline
Joined: 10/22/2008
Juice: 45
images in UC2

i still think i am having a problem. UC2 seems to handle images differently with that special setting in the Product content type, you set the image that ubercart uses. if you do not do this, then the grid views have no thumbnails and show n/a. HOWEVER, once this IS set, you have to set all the display fields for product images to "Hidden" otherwise you will get TWO images showing in teasers. HOWEVER, hiding display fields and enabling the product image does not allow you to set the preset that is used in the teaser. in UC1 i could control the size, in UC2 i can't, unless i change the preset itself, but that changes it for the Product view as well.
does anyone else know what i am talking about? does anyone have a solution? i like the way images were handled in UC1, no special setting, just imagecache.

plasticlax's picture
Offline
Joined: 10/22/2008
Juice: 45
still no solution to this

Other people must have this problem!
Either the product grid works and you turn off all display fields and let ubercart handle all the images, which sucks because in teaser and node view the imagecache preset used is the SAME!
OR you turn off the content types->product->edit->ubercart product setting which turns off those duplicates but also eliminates images from the catalog view AND from the cart!

surely this is not right?

the only way i have figured to easily fix this is to add this to my theme's css file:

  .product-image img
  {
    display:none;
  }

which eliminates the duplicate images on both teasers and node view of products.