Hi!
On the page http://site.ru/user//affiliate/links/export// I get html code for a products, but instead of product picture showing Only local images are allowed. misc/watchdog-error.png.

What I do wrongly?

Comments

alexd73’s picture

I noticed what array $product not contain any elements named field_image_cache, only field_image. I must rename field Image?

alexd73’s picture

Title: Why I can see watchdog-error.png instead of product picture? » How I can display a certian preset of Image Cache?

It dawned on me! :) My Image field name is not standart for ubercart.

Now I have another question: How to display Image such as $product->field_image_cache[0]['view']

vlooivlerke’s picture

version 2 has the same problem

my cck field is field_images

what now?

vlooivlerke’s picture

Found solution

First find and replace field_image_cache[0]['view'] with field_images[0]['view']

in 2.x dev line 377:

      $image = $GLOBALS['base_url'] .'/'. file_directory_path() .'/'. rawurlencode(basename($product->field_images[0]['filepath']));

TO
      $image = $GLOBALS['base_url'] .'/'. file_directory_path() .'/imagecache/product/images/'. rawurlencode(basename($product->field_images[0]['filepath']));

point the "/imagecache/product/images/" section to any preset folder.

j0rd’s picture

It appears that nearly none of uc_affiliate2 uses theme() templates when it probably should.

This makes hacking the module the only option unfortunately.

It really needs to be re-written to make more use of theme hooks.