| Project: | Signup Integration for Ubercart |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | signup status |
Issue Summary
I am using Signup Integration for Ubercart 6.x-1.x-dev (2010-Nov-12) and Signup Status 6.x-1.x-dev (2010-Jul-11).
Although they both work well together, but there are some hitches.
When I set up a status of "registered" as the default status for signups, and without being paid for yet they appear on the sign up admin menu with the correct status, but there is no name listed. Will the emails sent to "registered" go to the correct recipients?
Is there currently a way to integrate these two modules so I can use the default status instead of temporary sign ups?
And where should I ask for help in building conditional actions for uc_sign ups and signup_status?
These two modules are such a good fit but it could be so much better IMO.
I am willing to hack, but I am not sure where to begin ...
Comments
#1
Scratching my own itch, I create the attached support module uc_signup_status and modified uc_signup with the following.
I added the following code to function uc_signup_settings_form
$form['uc_signup_use_placeholders'] = array('#type' => 'checkbox',
'#title' => t('Set up placeholders when new signups are created'),
'#description' => t("When enabled placeholders are used instead of the actual sign up data."),
'#default_value' => variable_get('uc_signup_use_placeholders', 1),
);
I added the following function to enter the signup regularly and input the info into uc_signup_log for further processing
/** CUSTOM FUNCTION
* Create a regular signup for a user.
*/
function uc_signup_create_regular_signup($nid, $uid, $oid) {
$signup_form = array(
'uid' => $uid,
'nid' => $nid,
);
$sid = signup_sign_up_user($signup_form, TRUE);
if (is_numeric($sid)) {
db_query("INSERT INTO {uc_signup_log} (oid, sid, type, uid) VALUES (%d, %d, %d, %d)", $oid, $sid, 1, $uid);
}
}
And added the following to the end of function uc_signup_order to replace
foreach ($uids as $key => $uid) { // CUSTOM CONDITIONAL PROCESSINGuc_signup_create_placeholder_signup($nid, $uid, $arg1->order_id);
with
foreach ($uids as $key => $uid) { // CUSTOM CONDITIONAL PROCESSINGif (variable_get(uc_signup_use_placeholders, 1)) {
uc_signup_create_placeholder_signup($nid, $uid, $arg1->order_id);
}
else {
uc_signup_create_regular_signup($nid, $uid, $arg1->order_id);
}
}
This allows me to turn off the placeholder processing and instead use signup_status
The attached module adds a ubercart conditional action to modify the signup status which I added to predicate "Update order status on full payment" which allowed me to change the signup status from "registered" to "confirmed".
If folks find this useful, maybe the modifications can be added to uc_signup and the attached can act as an optional support module or something.
#2
#3
Here is a patch I created for uc_signup.module using diff.
#4
subscribing
#5
subscribing. was looking for something like this.
#6
Thanks for the patch here.
* CUSTOM FUNCTION+ * Create a regular signup for a user.
+ */
In general "custom" code doesn't belong in a contributed module.
The purpose of placeholder signups is that they avoid granting the user a full signup (and any priviliges that might be associated with being signed up, like with signup_roles), until the user has paid. So, I'm not sure why we would skip the creation of placeholder signups when using signup_status.
Instead, I could see how it would make more sense to integrate with signup_status by having a status of "placeholder", provided by the signup_status module.
Let me know if I'm missing something here :).
#7
Related issue #1193216: uc_signup does not close event when multiple signups should close.