Hello,

I have a list view with one product. I'd like to have the option image appear in the view and change when different attributes are selected. is there views integration?

thanks

Comments

tjholowaychuk’s picture

Currently the image switching only works when a node's full page is being viewed and will not work for teasers. sorry!

scottrigby’s picture

Hi tjholowaychuk,
Is this still the case? If so, can I help with this? Any tips you have about where work needs to be done would be great -- I'm hoping it would be faster for you to point me in the right direction than go hunting because I'm also busy with other projects, but this would be a great feature for one D5 site I'm working on.
THanks :)
Scott

scottrigby’s picture

Hi tjholowaychuk,
I now see that this isn't an issue about teasers per se, but about displaying multiple nodes on the same page.
From README.txt

KNOWN ISSUES
When multiple nodes are displayed on the same page they will not switch
properly due to "call_user_func_array('array_merge_recursive', $data)" in
drupal_add_js();
This issue is being investegated, but for now this feature has been disabled.

I'm not sure how much help this will be, but another module that uses js to update the product node per attribute option is
Ubercart Ajax Attribute Calculations: http://drupal.org/project/uc_aac -- That module's js works ok with multiple nodes displayed on the same page. I wonder if there's any clues in there about how to deal with the drupal_add_js() issue you mention in the README (assuming this is the same issue as op?).

Thanks in advance for considering this issue, I know it's old - but since UC is not ready for D6, this D5 module is still a really great feature, if we could just get Views integration working :)

tjholowaychuk’s picture

there are ways around that issue for sure, they just seemed pretty hack-ish, and unfortunately I may be moving on from Drupal as a framework all together so I dont currently have time to work on some of my older modules.

donquixote’s picture

Title: uc_option_image inside views / with more than one product on one page » change option image inside a view
Category: feature » support
StatusFileSize
new24.85 KB

The problem is how array_merge_recursive (in drupal_get_js) behaves with numeric keys. See #208611-15: Add drupal_array_merge_deep() and drupal_array_merge_deep_array() to stop drupal_add_js() from adding settings twice.

The problem can be solved by using string keys instead of numeric keys:
[$nid][$aid][$oid] becomes ["node-$nid"]["attribute-$aid"]["option-$oid"]

This needs changes in uc_option_image.module and uc_option_image.js. Unfortunately my own version of uc_option_image is hacked so much that it would not make a nice patch. I attach a 7z of my hacked version. No guarantees whatsoever. It also has a slightly different fading effect (but you can change that back if you want).

donquixote’s picture

Title: change option image inside a view » uc_option_image inside views / with more than one product on one page
Category: support » feature

it's rather a feature request.

pcoughlin’s picture

Title: change option image inside a view » uc_option_image inside views / with more than one product on one page
Category: support » feature

We are looking into getting this fixed, any other suggestions will be appreciated and once we get it done, then we will submit a patch.

tika’s picture

It would be great if you could display option images within a 'view' and link them to their product node eg; Product: Option Image > Linked to Node

I don't use the default Catalog and use a custom view instead. I want multiple colour options to display in this view but all link to the one node (url).

I look forward to any progress on this

mrconnerton’s picture

Has anybody had progress exposing the option images to views?

nicholaspapazoglou’s picture

I need a very different way to display the images. The module hides the images and display only one. I need to display all the images perhaps in a table, with different prices and add to cart button per image (and an option to hide the default add to curt button for this product), or with only the default add to cart button, like this page: http://www.artmaterials.com.au/online.php?cPath=233_492_152
Has anybody tried something like this?

larowlan’s picture

Have you looked at uc_subproduct
http://drupal.org/project/uc_subproduct

acouch’s picture

Status: Active » Closed (won't fix)

The 5.x version is no longer being supported for this module. We are cleaning up the 6.x version and preparing for the 7.x version.