Posted by mradcliffe on November 12, 2009 at 2:02pm
Jump to:
| Project: | Ubercart Product Keys |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | freixas |
| Status: | closed (won't fix) |
Issue Summary
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.
Comments
#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.
#3
i am getting error in my products page :
warning: Invalid argument supplied for foreach() in /home/website/public_html/sites/all/modules/uc_product_keys/uc_product_keys.module on line 760.
Also, where do I configure uc_product_keys? i can't find it anywhere in drupal.
#4
ok, i found the menu to find in readme.txt.
Also, the error seems to be gone once I configured a product key.
I want to use the hook (dynamic gen key) method. But I have no idea where to start in creating my own script. Can you please help?
Would it be possible to do something like this :
1) customer buy product
2) select the item (let say this is new license)
3) then register account and make payment
4) payment approved by payment gateway
-- how does uc_product_keys handle this if payment failed?
5) hook_uc_product_keys_generate_keys() will execute which will actually call an external php script
6) the script will retrieve the key dynamically from license distributor's website
7) the script will return results back to hook_uc_product_keys_generate_keys()
8) the script will also send out email to user and administrator (with complete details of customer's purchases)
-- does uc_product_keys handle this?
Please email replies to my email account if possible. abubin at gmail.com
Thanks.
#5
I'm also very interested in doing the exact same thing here as abubin. Please help!
thanks a lot for your work on this, its great
will at blasthaus.com
#6
Sorry for the late response. I am still not getting any notifications when bugs are posted.
1) Please don't attach bug reports to existing, unrelated issues.
2) Did you see the release notes? "A sample extension module is included that should help you extend the module."
3) Product keys are generated only when the order successfully completes (using Ubercart's hook for order completion). There are a bazillion payment systems; you will need to verify that, for your payment system, the Ubercart order completion hook is only called if the payment is made.
4) The sample extension module demonstrates how to do everything you asked for. It's all possible. If you need hand-holding, however, I would be happy to help at my usual rate. :-)
#7
i"m not advanced enough yet with hooks to feel confident I could do it the best way and kind of anxious to get this part done. Please contact me will at blasthaus dotcom and if anything is useful we could include another sample extension for the module. thanks! -wil
#8
Changing the title back to what this issue originally was for.
It makes it hard to keep track of things if issues get hijacked.
As freixas mentioned before you should create a new issue if you
have an issue that is different to the original post.
Then that will also help other people that have your problem to find
an issue with a possible solution.
#9
Closed due to no activity in over 2 weeks.