Aaaa... So I just rewrote uc_license_keys a week or so ago...
mradcliffe - November 12, 2009 - 14:02
| Project: | Ubercart Product Keys |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
So I pretty much rewrote uc_license_keys for an internal site just the other day. I didn't really care much for the 6.x port that was posted on the comments page. I'm glad I was pointed to this recently released module as I was about to create a new project myself. ;-)
uc_license_keys has an odd schema imo hooking into order_id and model (sku) though you're probably already familiar with it. Using the model runs into a few issues like trying to use the same license key on a different sku purchase although that's solved via a sub-module to shift things over at sku change (out of scope of uc_license_keys).
Some other random thoughts:
- I decided to rewrite and use views to generate admin and key pages. Though as mentioned, the sku/model schema made it kind of weird
- the api I added let other developers return a custom form rather than keys... not sure which is better
- mmmm... conditional actions...
- is the robust schema necessary in all use cases or should you leave that to sub-modules and customization? Some fields are redundant like uid, which is already associated via the order_id. Pkid seems redundant. The unique number is the serial/product key, right? You don't want the same product key sold that would unlock multiple products? Or maybe that's an option with product sequerences..?
- Activations? Great idea.
- Upgrade paths for older modules like uc_license_keys...
- uc_license_keys assumes that keys associate with a sku version of a product node. So any of the keys would work with that sku. Is the idea behind activations and product sequences so you can manage product/license keys and track usage all on the same web site?
Interested in maybe collaborating a bit.

#1
A new module appears, licensing.
I'm going to create a post on groups.drupal.org Similar Module Review (formerly hall of shame) for collaboration.
#2
Sorry, but I never received your posting. I have no idea why. I have another module, uc_addresses, and I seem to get all the messages posted there. I also checked all my email (I don't delete much) and couldn't find your postings.
Regarding your random thoughts:
Regarding the multiplicity of Drupal modules dealing with licensing: uc_license_keys is not an official Drupal module, so when I created uc_product_keys, there was no duplication.
It may be possible to rework the code to use the Licensing module. I don't know much about it yet and the author has never contacted me (as far as I know—the email system may be flaky). The description seems to claim it does not duplicate uc_product_keys.
Sorry for the later reply and thanks for your input.