9 replies [Last post]
rsm08's picture
Offline
Joined: 01/28/2009
Juice: 50
Was this information Helpful?

I've created 2 new product classes for my UC installation.

One of them was created correctly and automatically contained a field_image_cache field that works as product image and which makes the product images show up in the catalog, just like they do for the standard "product" content type.

But the other one didn't get an imagecache field automatically?! So I added one manually by adding the existing field_image_cache field in the content type form.

However, UC hasn't automatically set this field up, like it did with the other product class, so although I can add images to products of this class, the images don't show up in the catalog.

In the store settings, the status message says that image support is automatically configured and working.

So my question is:
How do I manually configure UC to accept my manually added imagecache field as the product image for this product class (content type)?

Hope someone can help!

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Image field wasn't ported to new product class (node type)

It should just work. If the image field is called field_image_cache, then Ubercart should find it and use it. Maybe there is invalid information in your cache or something. Is there nothing being displayed for the image on the catalog page, or is there "n/a"?

rsm08's picture
Offline
Joined: 01/28/2009
Juice: 50
Hi Lyle It is called

Hi Lyle

It is called field_image_cache. In fact it's an instance of the same field_image_cache field from the standard product class.

On the catalog page there's "n/a" displayed.

In the product node itself, the themed image section, that would normally be under:
$node->content['image']['#value']
isn't there. Of course the field_image_cache is there with whatever images has been added, but it's not taken care of by ubercart.

So for some odd reason, this field just hasn't been configured by ubercart. It could be a bug in Ubercart - it could be my own fault - it could be a conflicting module?! - We can't tell.

So what I though I'd do is to just make the "connection" myself. So I hope you can tell me, what I need to manually do to setup this field as the product image for this product class. Is it in the database, in a drupal variable, ...?

Thanks!

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Hi Lyle It is called

On the node type's settings page, there's supposed to be a fieldset for Ubercart product settings. It contains a setting to choose the image field that Ubercart uses for that product type. Unfortunately, in beta5, it wasn't actually visible, even though the code was using it. You can get the latest dev version to get access to it.

Sorry about the difficulties.

PatW's picture
Offline
Joined: 03/31/2009
Juice: 138
Re: Re: Hi Lyle It is called

Lyle, I'm having the same problem. I installed Drupal 6.10 and Ubercart 2.0 beta5 last week. As a newbie, this image error has been quite frustrating. To install the latest dev version, do I just put it in the modules directory and overwrite the previous files? Any help will be appreciated. Thanks.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Hi Lyle It is called

You should backup your site first, and then delete the ubercart folder that is there. Then you can put new version of Ubercart in its place. You want to do it this way so that files that were removed don't cause problems with code that expects them not to be there.

PatW's picture
Offline
Joined: 03/31/2009
Juice: 138
Re: Re: Re: Re: Hi Lyle It is called

Thanks Lyle. I'm making some headway. I did as you suggested and I finally have Image browse and upload buttons appearing. New problem now. When I click to upload an image, I get this error: HTTP error 0 filefield/ahah/product/field_image_cache/0.

AttachmentSize
imageUploadErr.jpg 17.11 KB
Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Re: Re: Hi Lyle It is called

Check the Recent log entries page. The last time I saw that, there was a PHP error on the AHAH callback. Cause that error again before you go look so it will be at the top of the list again.

PatW's picture
Offline
Joined: 03/31/2009
Juice: 138
Re: Re: Re: Re: Re: Re: Hi Lyle It is called

Just found out that the error occurs with Firefox, but the upload works fine using IE. Guess I'll work with IE for now just to keep moving along.

rsm08's picture
Offline
Joined: 01/28/2009
Juice: 50
Re: Re: Re: Re: Re: Re: Re: Hi Lyle It is called

I upgraded to the dev version, and that solved it!

Thanks Lyle!