Closed (fixed)
Project:
Ubercart Option Images
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
25 Feb 2013 at 09:29 UTC
Updated:
24 Oct 2014 at 17:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
benitezv1ang commentedPlease check this image.
First image is wrong
Comment #2
minasshohdy commenteddid anyone find a solution for this yet?
Comment #3
UK_Rogue commentedSame problem here, well spotted - this was doing my head in. If I recall there used to be another way of updating the price and image before this option was introduced. I'll see if I can find the post!
Additional: Raised an issue with Ubercart. http://drupal.org/node/1974604
Comment #4
Colin @ PCMarket commentedHi UK_Rogue was just wondering if you ended up finding a work around for this conflicting behaviour.
Comment #5
antiflu commentedHi, I am working on a patch.
The problem is that Ubercart uses the Ajax API to overwrite the radio buttons with an up-to-date version, that however fails to include the images.
I was trying to solve it the IMO 'proper' way, by making the images render in Ajax mode as well, so that on regeneration of the radio buttons the images would be included. But somehow, this doesn't work. This is not because the module uses Javascript to add the images, because the Javascript just responds to
divandspanelements added to the radio buttons byuc_option_image_add_to_cart_prerender. I would say that the real problem is that Ubercart in Ajax-mode re-renders certain form elements, but not the whole form, and thus the prerender function is not executed properly. But I don't succeed to fix this.So my patch is based on another solution: to make the module modify Ubercart behaviour and not redraw the whole set of radio buttons but just the text associated with them, and leave the images as they are. When it is properly tested, I'll submit it here.
Comment #6
antiflu commentedThe patch is attached to this issue.
At the same time, we also came across another issue which is that when the uc_product_kit module is used, the option images were not displayed. This issue was also solved by creating an extra function
uc_option_image_kit_add_to_cart_prerenderas a prerender hook touc_product_kit_add_to_cart_form.Comment #8
liberatrI tested this out and it seems to work. I committed it and I am trying to make sure that "beta3" becomes the new recommended release on the project page.
Thanks Tom!
Comment #10
orkineo commentedHi,
I encountered the same problem with Beta3, I know that this module is not maintained anymore, just for info.
Maybe evolutions of ubercart...