6 replies [Last post]
backdrifting's picture
Offline
Joined: 10/04/2008
Juice: 373
Was this information Helpful?

I have a weird issue where 2 images are showing up on my product page. They are the same identical product image. One is mapped to the /files directory. the other is showing up in /files/imagecache/product.

I'm using the main product content type to create my products. The image field is the default and the field data name is:

field_image_cache

My main Drupal config is putting all files in the /files directory. I had Ubercart set the image configuration automatically but now it appears to be uploading the product image twice per my notes above. One copy goes in the /files, and the other into the /files/imagecache/product. If I check the main Ubercart store administration page, it states that Product image support has been automatically configured by Ubercart.

How can I force Ubercart's/Drupal's Product content type to only upload one copy of the image, and to only one folder on the server?

Additionally, my display fields for the Image field on the Product type are:

Teaser = product as link to node

Full = default

One idea I have is to just delete the default Product type image field since it appears to be using the "field_image_cache"? I could just add another image field and then delete the default one? Would this solve the issue?

Any suggestions would be most helpful!

Thanks.

-backdrifting

Dave Kopecek's picture
Offline
Joined: 10/09/2008
Juice: 32
Same Problem Here... Just

Same Problem Here...

Just updated a site to:
imagecache-5.x-1.6
thickbox-5.x-1.2
ubercart-5.x.-1.5

Tried flushing preset images for all preset namespaces, but no dice.

Here's part of the product page display as rendered in garland:

<DIV class="content">
<DIV class="field field-type-image field-field-product-large-image">
<DIV class="field-items">
<DIV class="field-item odd"><IMG src="http://MYDOMAIN/files/images/imagecache/product/files/images/11E_0.JPG" alt="11E.JPG" title="11E"/>
</DIV>
</DIV>
</DIV>
<DIV class="product_image">
<A href="http://MYDOMAIN/files/images/11E.JPG" title="11E" class="thickbox" rel="field_image_cache_0">
  <IMG src="http://MYDOMAIN/files/images/imagecache/product/files/images/11E.JPG" alt="11E.JPG" title="11E"/>
</A><BR/>
</DIV>
<DIV class="model"> 11E</DIV>
<P>18kt yellow</P>
<P>Diamond</P>
<P>Pair</P>
...

Any Thoughts ?

itsallamit's picture
Offline
Joined: 08/06/2008
Juice: 53
Re: Same Problem Here... Just

I have the same problem with 5.4.

Dave Kopecek's picture
Offline
Joined: 10/09/2008
Juice: 32
Re: Same Problem Here... Just

Here's how I solved this...

Went to:

/admin/store/settings/products/edit/fields

UNCHECKED "Enable Image".

Yup. Disable image display.

Then edited of my product cck types (i.e. Necklace, Bracelet)'s Image fields:

"Products Catalog Thumbnail" - (name field_image_cache)
"Product Large Image" - (name field_product_large_image)

Using the CCK display field controls ( /admin/content/types/necklace/display ) I set:

"Product Catalog Thumbnail" to label = hidden, teaser = hidden, full = hidden
"Product Large Image" to label = hidden, teaser = hidden, full = "product as image"

Even with image display DISABLED for the product, "Product Large Image" still displays for the page.

graper's picture
Offline
Joined: 06/27/2008
Juice: 60
it's really a configuration issue

the reason you find the image file in 2 folders is because imagecache is re-sizing the file and placing the re-sized file into a folder inside the imagecache folder. This is by design as it allows for the browsers to be served the file from the imagecache folder which should be smaller then the file that is uploaded.

I don't believe you need to delete the default imagecache field from the cck "product" type. You can tell ubercart to not show the imagecache version of the image and tell the "product" cck type to show the file that was uploaded directly, which you've already done inside the "product" cck type display fields tab. You just need to go to Administer > Store administration > Configuration > Product Settings > "edit" tab > "Product Fields" Tab and uncheck "enabled" for the image.

dkopecek explained how they did it and it appears that the the default imagecache field was not deleted but just just renamed the label for it and had it show only in a teaser view and added another image field to the "product" cck type and uses it for the full view

The only issue I see with these changes is will thickbox or lightbox still work and how would you add more then one image to the product and have it themed properly

Granville
---
I'm thirsty and I need more juice

loocher's picture
Offline
Joined: 02/21/2009
Juice: 211
Re: it's really a configuration issue

I had the same problem. I was using the "field_image_cache" field in my Product Content Type, and found that if the Image field was enabled under Administer > Store administration > Configuration > Product Settings > Product Fields then I got two images displaying in the product node. So I disabled that.

But it seems a bit counter-intuitive. Surely that Ubercart Image field should recognise that it is now referring to the "field_image_cache" field?

isibbot's picture
Offline
Joined: 03/02/2010
Juice: 36
GOT IT

Anyone who stumbles on this thread or even the orignal contribs, I think I have found this issue and resolve.

I to had the same problem.

I wanted, only, the UC image output "" to be displayed and not the extra image field markup that was appearing "' or what ever it was.

Check your content_permissions, permissions. If you've got "view field_image_cache" then the cck content permissions module decides to show the output of this image field to! Untick and your back to how UC wants it.

Disabling the Display image checkbox in the products confrig screen as suggested above, removes the native product. Meaning its not shown on the catalog page either which is counter productive.

Just thought this stumper might help peeps in future projects.

Hola if you found it useful!!

Sbot