Active
Project:
UC Profile
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Nov 2010 at 04:16 UTC
Updated:
12 Jul 2011 at 04:50 UTC
It sounds like this module only supports profile module (but not completely sure). It would be great if it also supported the content_profile module (and no dependency on which cprofile node or profile category).
I think something like realname where you can associate which fields from profile or content_profile fields are assigned to which ubercart billing info pane.
but i guess form_alter should work for now...
Comments
Comment #1
EvanDonovan commentedI think that this would probably be difficult to do since they are two very different architectures. Maybe that would be better as a separate module, since I don't think you can really be "agnostic" as to whether fields are coming from Profile.module or Content Profile.
Comment #2
EvanDonovan commentedI'm looking into the logic of the uc_checkout_pane_profile() function....let me know, @liquidcms, if you get working code that hook_form_alter's to use the fields from Content Profile instead of profile.module and does the submit handler correctly. That would save me a good bit of time.
Comment #3
EvanDonovan commentedComment #4
EvanDonovan commentedTagging.
Comment #5
liquidcms commentedi think it is likely something along the line of how realname works in that it has forms already to pick if using profile or cprofile.. but only assigns fileds to 1 thing... you would need to assign it various fields.
havent looked at the form_alter for this yet.. assuming it isn't too tricky.. in which case the admin to select fields would be the only tricky part of this... but maybe ubercart makes this trickier than most things.
Comment #6
EvanDonovan commented@liquidcms: The way that the uc_profile module works is that you select profile categories to use (or in the current version, create an "ubercart" category), and then those categories are displayed on the checkout pane.
In order to use Content Profile, you would have to add the ability in the admin screen to choose fields/groups from a Content Profile to use on the screen, and it would collect fields from Content Profile then as well as uc_profile. It wouldn't be inordinately difficult, but I do think it might be out of the scope of this module. It depends on how much complexity the maintainers want to add to the code.
Comment #7
liquidcms commentedok, didn't realize it was making a new pane.. i was only looking for something to fill the existing Billing Info pain.
have likely not used ucart enough yet to really know how big a deal that is.
Comment #8
EvanDonovan commented@liquidcms: Yea, it creates a new checkout pane.
Creating a checkout pane for Content Profile wouldn't be tremendously difficult I think. I just am saying it's probably out of scope for this module, since this module's integration is specifically with Profile module.
The main tricky thing with Content Profile is that a user can have more than one content profile. This would mean you would have to have a setting in the UI for which Content Profile to use in checkout (or, more advanced, to use multiple at once).
As for the integration, it would be much like Content Profile Registration, except implementing Ubercart's hook_checkout_pane() instead of hook_user(). hook_checkout_pane() is fairly easy to implement - just check out how this module does it for an example.
I've been working with this module via hook_form_alter() today - the problem with using hook_form_alter() on this module to add the Content Profile fields, would be that you would be removing everything this module has added to the new pane. Also, the form that you would be altering has a complex structure, since each checkout pane is a subsection of the form, and you would need to implement Ubercart's hook_uc_checkout_complete() to save the data.
So, in my opinion, it would be simpler to make as a separate module.
Comment #9
liquidcms commentedthanks for the info
Comment #10
EvanDonovan commented@liquidcms: Depending on my organization's needs, I may actually end up having to write that module... But yes, I spent 3+ hours today doing a hook_form_alter() on the code from this module (although I was using the version that is patched to allow multiple profile categories). It took so long since I had multiple conditional transformations that I needed to do on the form fields.
Contact me via my drupal.org contact form if you are interested in learning more about how this module works. I could give you a brief guided tour :) Have you much experience in using hook_form_alter()?
Comment #11
yesct commentedEvanDonovan, I'm looking for something that would save info to a content profile node.
Comment #12
yesct commentedSide note: http://mattrenfro.com/node/18 is another way that uses node checkout. But I'm not sure if it can populate information *from* a node.
Comment #13
AllyMediaGroup commentedHas this been worked on at all. This is exactly what I need, I had to have multiple registrations by role and could had to have content profile. A patch something. I am currently using the UC_profile extended version 1.3 (not official). It works perfectly except now I need the profile fields to come from content profile instead of profile.
Comment #14
EvanDonovan commented@AllyMediaGroup - the uc_profile 2.x version supersedes 1.3. And no, this has not been worked on at all. It would essentially be a different module, imo. A good module to have, but not the same code at all.