This module exists to give site-builders the ability to sell ubercart products from within a webform. They are not limited as to the type of product that they include in a webform (although, I have not yet added support for attributes and options), but this module can easily be used to create a registration system.
I was inspired to write this module after I built a hacked-together registration system for a client using the webform module and ubercart. Initially, I followed instructions (with some tweaking of my own) that I found here:
http://openconcept.ca/blog/ethan/ubercart_event_registration
I since came across this post, providing yet another way to create a registration system with ubercart:
http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart
Both of those posts are now over a year old, and since then, quicksketch has released the 3.x branch of the webform module. The most important new feature, from my perspective, was the addition of an API that allows integrators to create their own, custom components. At that point, I figured that I'd write my own module so that I wouldn't have to go through the hassle of writing custom code each time we needed a new registration form.
The concern about duplicating existing work will naturally come up at this point, since my module is yet another solution to the problem of how to handle online registration. The projects signup and uc_signup both already exist, so why add my module to the list?
I certainly need to justify why I chose not to create patches for the uc_signup module, but do keep in mind that my module doesn't have to be used as a registration system. In other words, it has broader application than simply a registration system, and those other uses may alone justify its existance. It simply allows site creators to embed products within their webform, and sell those products directly after the form is submitted. Period. That aside, however, what follows is my defense of why my module is unique and beneficial to the community at large.
First, here are a few modules that I found that try to solve *similar* problems (I'm not aware of others, but it's likely that there are a few others out there):
- http://drupal.org/project/signup
- http://drupal.org/project/uc_signup
- http://drupal.org/project/cck_signup
- Joachim's fork of the signup module that is currently on github: http://github.com/joachim-n/signup
Here are a few links to discussions about this topic, most of which are in the issue queues of the above modules:
- http://drupal.org/node/29568 - Really loooong thread in which Joachim provides a patch for the signup module, and then begins fielding support questions.
- http://drupal.org/node/623900 (duplicate found here: http://drupal.org/node/527700) - Discussion with ezra-g about adding support for collecting other information from other modules from the uc_signup side of things.
- http://drupal.org/node/29568 - Discussion of adding flexible fields in signup module.
In one of the threads, Joachim mentions that he and dww were supposed to talk things over at Drupal Con Copenhagen, but I don't know what ever became of that.
With that information as a background, I will admit that I have not contacted any of these module maintainers about my work. Even if we focus solely on the registration aspect of my module, I'm convinced that the base assumptions that I make about how a site-builders want to build registrations is different enough to warrent a separate module. The signup module, for instance, assumes that each attendee will have an account on the website (see the signup and uc_signup project pages). My module makes no such assumption. The signup module (and therefore the uc_signup module as well) requires that every distinct registration form is also a distinct content type. A site that handles many registrations will end up with an increasingly large number of content types. Again, my module has no such requirement: if you need a new registration form, you simply create a new webform node.
Finally, and I think that this is the real kicker, there is a fundamental dependency within the signup and uc_signup modules on the core profile module. All the "extra" information about signing up for an event would go into the core profile module. That is not a viable solution for a site that wants to offer registration for many different events. To handle that, as far as I know, I'd have to continually be editing the profile fields on my site, presumably deleting old info whenever I create a new registration form.
Admittedly, this is precisely the problem that Joachim (and perhaps others?) are working on in Joachim's fork of the signup module on github. However, fundamental limitations remain in the signup module even *if* you can collect data with other modules (like not being able to purchase multiple products when you fill out the registration form, for instance).
So, ultimately, I'm convinced that we're coming at the problem of registration from two fundamentally different perspectives, and that my module would be a benefit to the drupal ecosystem.
My code is over on github: http://github.com/ldweeks/uc_webform. I have done my best to follow drupal coding standards and security best practices. This is my first full-fledged module, though, so I'm sure that I've made mistakes. Thanks for taking the time to review my submission!
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | uc_webform.zip | 17.89 KB | ldweeks |
| #8 | uc_webform.zip | 17.63 KB | ldweeks |
| #7 | uc_webform.zip | 13.1 KB | ldweeks |
| #1 | uc_webform.zip | 10.87 KB | ldweeks |
| #4 | uc_webform.zip | 10.86 KB | ldweeks |
Comments
Comment #1
ldweeks commentedPlease see comment #4.
Comment #2
avpadernoHello, and thank you for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
Comment #3
ldweeks commentedFYI: I hadn't thought of running my module through coder, but I just did. I have cleaned up all of the 'normal' and 'critical' warnings, but there were too many 'minor' warnings for me to tackle it tonight. I'll hit those early next week.
And by the way: I didn't do it myself, cuz I don't want to screw up your system, but I'd think that you'd want to add the tag "webform" to this issue, since my module is basically a bridge between webform and ubercart.
Thanks,
Comment #4
ldweeks commentedI ran my module through coder, and it now has a clean bill of health.
Comment #5
ldweeks commentedIt's probably people like me who make you reviewers want to pull your hair out... sorry about that. I'm going to mark this as postponed. The module that I uploaded definitely works, but I'm still actively developing it. I still would like to post the module on drupal.org, but I'll uploaded an updated version when things have gotten more stable.
I apologize for any inconvenience. Thanks for your work!
Comment #6
summit commentedSubscribing, interested in module, when it is alpha, beta.
greetings, Martijn
Comment #7
ldweeks commentedOkay, ready for review.
Thanks in advance!
Lucas
Comment #8
ldweeks commentedI've added some new features and cleaned up some bugs. Ran it through coder and got a clean sheet. Thanks!
Comment #9
WebNewCastle commentedHi Lucas,
Wow. That was a pretty detailed and awesome introductory post that you had back in September.
Thanks for your work on this. I, too, have seen that a lot of great things can be done with the Webform module, and I've probably thought about some of the same (or similar) things that you were talking about earlier.
I'm just here volunteering a bit. I downloaded the file, and I'm looking forward to reviewing it and testing it out. Based on my understanding of what you're doing here and the level of effort on it, please ping me when this is released as a module. Unless my understanding is different at a later time, I think it might be good to point users to this from the Ubercart ECO module which I maintain.
Sincerely,
Matt Winters
Comment #10
ldweeks commentedHey Matt,
Thanks for the encouragement! I'm not sure what I need to do next to get my module on D.O, but I imagine that the guys working hard on these applications are just swamped. In any case, you can always download the latest code from my github repository. As far as I can tell, it works just fine. This is my first module, so I'd be very grateful to you if you found bugs and told me about them! :-)
Incidentally, the patch to ubercart that I depend on for my module was recently committed here.
Warmly,
Lucas
Comment #11
tr commentedVery interesting submission! I don't have any concern about this replicating other Ubercart modules - it addresses a significantly different need in a significantly different manner than other existing modules.
Submission passed all my checks with flying colors. The initial description and motivation are excellent, and the contributed module passes all Coder checks without even a minor problem reported (!). I think @ldweeks has demonstrated that he knows what is expected of a Drupal contributor/contribution, and I don't see any reason to delay approving this application.
Comment #12
ldweeks commentedThanks very much for the favorable review, TR. I would be remiss, however, if I didn't point out quicksketch's (the maintainer of the webform module) kind review of my module. His review is found here. His biggest criticism was my use hook_theme_registry_alter(). He correctly diagnosed my reasons for using that function, and suggested that I submit patches to the webform module itself to get around the issue. So that's what I'll work on next.
I'm posting my latest code here now, but I'll check back once I've figured out a good work-a-round to his concern.
And, of course, you can always see my latest code over on github.
Comment #13
tr commentedIt's not necessary that a module be 100% bug-free and perfect before a CVS application is accepted. My understanding of the process is it is mainly geared towards educating contributors about what is expected of something that goes into Drupal CVS. Specifically, avoid duplication and look for ways to cooperate or contribute to existing projects before creating your own, conform to Drupal coding standards and best practices, be very aware of security-related issues, etc. You have done all that. I *expect* any module in CVS to be continually evolving based on community input, which is what you have done in response to quicksketch's review - but that doesn't mean you have to be omniscient and implement everything the "best way" in your initial code.
Your module is ready to be added to CVS right now. I don't know what the approvers near-term plans are for creating new CVS accounts, since the transition to GIT will occur later this week. They may be holding off on approvals until after the switch.
Comment #14
ldweeks commentedThank you git migration team! The official repository for this project is now on drupal.org: http://drupal.org/sandbox/ldweeks/1072634
Comment #15
avpadernoThank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #17
summit commentedHi link in post 14 gives a 404 error. I think this one is the correct on, right? http://drupal.org/project/uc_webform
greetings, Martijn
Comment #18
avpaderno