Hi,
Recently, Ubercart team released a drupal 6 version of ubercart that pretty usable with the support of the D6 version of imagefield, imagecache, etc... (download the latest bazaar version).
Do you plan to update your module to drupal 6, if yes, do you have an estimation about when it can be done (another thing that the current "when it's ready" ^^)
If you don't plan to update module, are you agree to review and implement if the review is good an eventually patch ?
zmove
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | Screenshot-5.png | 76.22 KB | johnflower |
| #17 | Screenshot-6.png | 32.57 KB | johnflower |
| #17 | Screenshot-7.png | 25.41 KB | johnflower |
| #13 | uc_option_image.5.x-to-6.x.diff | 10.78 KB | pillarsdotnet |
| #13 | uc_option_image-6.x.tar_.gz | 11.78 KB | pillarsdotnet |
Comments
Comment #1
tjholowaychuk commentedThey have a d6 release already? great! unfortunately I am busy at work with other projects but I welcome any maintainers that would like to work on uc_option_images as well.
Comment #2
pkej commentedI did a quick conversion with Deadwood, there were just an extra ) at line 407 a missing ) at line 411. Unfortunately the schema for files have changed so the uc_option_image_save and uc_option_image_load functions needs to be rewritten completly.
I'm not up to it at this time.
I've attached the converted files for whoever might continue.
The admin pages work well as well as the forms and the module selection in drupal 6.4
Comment #3
tjholowaychuk commentedReally should have its own table, but it was a quick module at the time so I never got around to it :)
Comment #4
pkej commentedIt also should have default images set in the admin part. For example, when I list colors I would like to have all the color images added in the admin part, b/c I can't take pictures of everything in all the 45 color variations I have available. For now I'll just hard code that into a template file.
Comment #5
tjholowaychuk commentedThat too, there are alot of variations with that which may be ideal depending on what the person is doing. Defaults as well as image-not-found images should all ideally be uploadable.
Comment #6
tjholowaychuk commentedComment #7
tmpearsall commentedIs anyone working on modifying the uc_option_image_save and uc_option_image_load functions so that they support Drupal6? If not, I'm going to give it a shot but wanted to know in advance if anyone had started already.
Comment #8
sammy-node commentedThis mod looks pretty good - looking forward to the 6 port :)
Comment #9
pillarsdotnet commentedWorking on a 6.x conversion -- started with deadwood and the 5.x/6.x upgrade guide.
Looking at the file schema now; can't be too hard...
Comment #10
pillarsdotnet commentedWell, the nid column doesn't exist; trying to use the filename column instead...
Comment #11
pillarsdotnet commentedWoo-hoo! It's working!
Patch relative to current CVS HEAD checkout.
Comment #12
pillarsdotnet commentedSlight changes.
Pretty much works for me now.
I have an idea for improvement that would eliminate a great deal of redundancy in the image uploads:
Comment #13
pillarsdotnet commentedHalfway there -- the logic is implemented but not the ui.
Added a default fallback image.
So the logic goes:
Load the specific node/attribute/option image if it exists,
else Load the attribute/option image if it exists,
else Load the default image.
Comment #14
tjholowaychuk commentedI dont have time to maintain this module guys, feel free to step up as a maintainer if you would like, and I will grant you CVS access.
Comment #15
pillarsdotnet commentedI'm interested.
Comment #16
tjholowaychuk commentedIts all yours :)
Comment #17
johnflower commentedHi,
I've tried out uc_option_image-6.x.zip from post 12 & 13.
#13 causes product nodes to load up as a blank page.
#12 Allows me to choose option images and will display the default image. If I choose one of the option from the select field the option image vanishes. What do I need to do to make this module work for me?
I'm using drupal 6.8 and Ubercart 6.x-2.0. I've ticked yes to switching option images and selected the right attribute.
Any suggestions?
Cheers,
John
Comment #18
johnflower commentedProblem fixed. Using module from post #12 I changed the image option size, in the attribute settings menu, from Original to Product. Now the module works as it should.
Thanks for writing and updating a great module.
Comment #19
johnflower commentedIt appears that I can only have one option displaying it's images at a time. Is it, or could it be made, possible to have an image displayed for each option with images?
Comment #20
pillarsdotnet commentedworking on that. hang on a couple more days...
Comment #21
johnflower commentedsweet :), thank you.
Comment #22
pillarsdotnet commentedQuestions for comment:
1. Should each option image be located (a) before or (b) after the option selection form?
2. Should we skip attributes with fewer than two options?
Comment #23
pkej commented#22
1. Is it possible to have it selectable?
2. Of course, there are no actual options to select if there is only one option. It is good user interface to not confuse people with the impression of options where there are none.
3. It has been a long while since I tried out the module, so just ignore this if question 1 is exactly what I am asking about ;) Could the option image, if it is small enough, be inlined in the option tags of a drop down? I think that might need some stylesheet magic, but it would be nice if it is possible.
Comment #24
johnflower commented1) Pepsi & Coke - some people will prefer one, some the other. Both are valid choices.
2) Yes, simplicity works. Possibly this is easiest achieved by not having a 'no image' picture if no images have been uploaded for the option.
As an aside. I've broken my install of the module posted in #12. I did have pictures working. Now the picture are no longer visible and I see the words 'no image' in their place. Even after uploading new pictures to the options they don't appear. Any clues as to what I may be doing wrong?
Comment #25
pkej commented#13? Try it again. Do you have any caching on your site? Have you tried uninstalling and reinstalling the module (if it have the proper uninstall hook)?
Apart from that, no idea, especially if you have been modifying it yourself. Try diffing your version with the one you downloaded to see the changes you have done, and try to work from that.
Comment #26
johnflower commentedI'll give #13 another go. And I'll try uninstalling (if possible)
I do have caching. In trying to fix this problem I flushed both the image_cache caches and the caches in the performance menu. I haven't modified the module.
Comment #27
ccshannon commentedI just tried the .zip file at post #13.
I copied the uc_option_image folder to my modules folder at sites/all/modules/.
At admin/build/modules I checked 'Option Images' and Save.
(Dev site is running on my laptop) after about 2-3 minutes of hanging for a return page, I get a blank page in response.
I go back to my site's homepage, and all seems fine.
Go back to admin/build/modules and 'Option Images' is unchecked.
Turned on devel.module query logging, tried enabling the module again, got back a whole lots of these (edited my pathnames but the log is otherwise the same):
Missing argument 2 for drupal_get_path(), called in /Users/me/Sites/example.com/sites/all/modules/uc_option_image/uc_option_image.install on line 5 and defined in /Users/me/Sites/example.com/includes/common.inc on line 1669.\";}}', timestamp = 1232483532 WHERE sid = 'kil654ok4nmjj8i60ik0tl8757'
This error is repeated dozens and dozens of times. Not sure if anyone else is seeing this when enabling the module.
Comment #28
pillarsdotnet commentedUse the one in #12 not the one in #13.
Comment #29
johnflower commentedI tried the module from #13. Here's the error message I get. Along with the relevant function.
Fatal error: Call to undefined function _t() in /var/www/html/sites/all/modules/uc_option_image/uc_option_image.module on line 395
Line 395:- _t('uc_option_image_load',array('nid'=>$nid,'aid'=>$aid,'oid'=>$oid));
Relevant code:-
/**
* Load image file.
*
* @todo: static cache
*/
function uc_option_image_load($nid, $aid, $oid) {
_t('uc_option_image_load',array('nid'=>$nid,'aid'=>$aid,'oid'=>$oid));
static $files;
$filename = uc_option_image_id($nid, $aid, $oid);
if (empty($files[$filename])){
$files[$filename] = db_fetch_object(db_query("SELECT * FROM {files} WHERE filename = '%s'", $filename));
if (empty($files[$filename])) {
if ($nid) {
return uc_option_image_load(0, $aid, $oid);
}
elseif ($aid && $oid) {
return uc_option_image_load(0, 0, 0);
}
}
}
_t('uc_option_image_load',array($filename => $files[$filename]));
return $files[$filename];
}
Comment #30
pillarsdotnet commentedyup. Take those lines out; I had them in for debugging; sorry. the _t() function is one I wrote myself -- not part of Drupal.
Right now my priority is to make uc_option_images and uc_aac work together. Until then, uc_option_images is kinda useless for me.
Comment #31
Bobuido commentedStarted porting this myself before gradually realising I'm slightly out of my depth. Looking at this patch, seems you've already gotten further than me.
Have you made any more progress? Tomorrow I'll look at seeing if I can make any further progress with the patches you've pasted.
Comment #32
johnflower commentedHave you had any joy getting option_images working with aac?
Comment #33
warrenscott commentedI get the server error as well with both #12 and #13 versions. Drupal 6.9. Thoughts?
Comment #34
johnflower commentedAny news?
Comment #35
pillarsdotnet commentedShould be able to work on it this week.
Comment #36
johnflower commentedSweet :)
Comment #37
pkej commentedpillarsdotnet, would it be possible to base the options on CSS sprites in 6.x?
Comment #38
pkej commentedI tested number #12 and it seems to work well. The only thing I noticed is that it requires each product to have specialized images for each option. It would be nice if one could add a default image for each option. Thus, for example if I use color, I could upload a color for each option in the settings, and thus there will be a list of colors available by default; then, when the photographer has the time we can add images gradually.
Comment #39
pkej commentedI also realized it is possible to upload images for text attributes if I add an option. I added an option measurement, and of course the image I uploaded didn't show up. It would be nice to be able to add one image for a text box, for example for measurements, these kinds of images are used to show the customer how to measure for what they want to order.
Of course there is no big deal in adding those images via for example css, but it would be very convinient to add one image for each type of measurement attributes available.
EDIT: Forgot to write "text" in front of "attributes", big difference ;)
Comment #40
encho commentedAny news on this?
Comment #41
cybertoast commentedAny further action on this? As far as adding the Drupal 6 port to CVS I mean.
Comment #42
johnflower commentedI used to have Option 12 working. Now it doesn't, the first option image shows but there is no image once the ption is changed, not sure why. Looking forward to the new version coming out
Comment #43
jerry commentedI had a similar problem - a working test installation of #12 stopped working for no apparent reason. It turned out that the uploaded image files had disappeared. A bit of digging suggested that it might be due to the fact that the files weren't marked permanent in the files table. Changing this code around line 429:
$file->filename = $nid . $aid . $oid;
$file->uid = $user->uid;
to this:
$file->filename = $nid . $aid . $oid;
$file->uid = $user->uid;
$file->status = FILE_STATUS_PERMANENT;
seems to have corrected that problem for me.
Comment #44
pillarsdotnet commentedGood catch. Commited patch in #12 and Jerry's correction to HEAD.
Comment #45
pillarsdotnet commentedPlease post problems with 6.x version as separate issues rather than adding to this one. Thank you.