Thanks for your help

Now we are using uc_signup beta2 version it is not showing any error in completing order. But when I check sign up list for the product there is no value in signup log.
So I checked the uc_signup.module file and figured it out that in uc_signup_order() (Implementation of hook_order) Method we have case where $op= 'submit'

/**
* Implementation of hook_order().
*/
function uc_signup_order($op, &$arg1, $arg2) {
switch ($op) {
case 'submit':

But at any submit I did’t get $op Value to 'submit'. So I have made some modification to case I have ad new case ‘Can_update’ and paste the same code in that. Now it is saving the details of attendees into signup_log ,uc_signup_log and into users table.

And my 2nd Issue is when we select 2 products in cart and both have signup enabled. But when we complete the order then it only save the signup log only for one product.

So can anyone please help us to fix these issues?

Thanks

Comments

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

Did you install the required version and patches for the signup module?

puneet63’s picture

Yes we have installed the 3 patches with the 481134-revised.patch as described on website for beta2 version.

abhishek.dabas’s picture

hi puneet,
After applying all required patches for signup.module , still i am facing the same problem.
Attendees information is not inserting in the database.
My case is :
1. User can select multiple events at same time.
2. More than 1 qty can be purchased for single event.

The proble is that, attandees data are not inserting into the database after complete checkout/payment with paypal.

I have work around for the problem & find that there is no 'submit' value found in $op variable befor or after checkout in function uc_signup_order($op, &$arg1, $arg2).

but If i changed the case value to 'can_update' it will work fine for me , but just inserting only attendees info for single event, not for multiple events.

But for the second issue I have again look into the uc_signup.module file & modify uc_signup_order($op, &$arg1, $arg2) function a bit.

Here is the modified code:

foreach ($_SESSION['uc_signup']['nids'] as $nid => $attendees) {

foreach ($attendees as $key => $mail) {
$account = user_load(array('mail' => $mail));
if (empty($account->uid)) {
$new_account['mail'] = $mail;
$namenew = preg_replace('/@.*$/', '', $mail);
// From the email registration module:
if (db_result(db_query("SELECT count(*) FROM {users} WHERE LOWER(name) = LOWER('%s')", $namenew)) > 0) {
// Find the next number available to append to the name
$sql = "SELECT SUBSTRING_INDEX(name,'_',-1) FROM {users} WHERE name REGEXP '%s' ORDER BY CAST(SUBSTRING_INDEX(name,'_',-1) AS UNSIGNED) DESC LIMIT 1";
$nameidx = db_result(db_query($sql, '^'. $namenew .'_[0-9]+$'));
$namenew .= '_'. ($nameidx + 1);
}
$new_account['name'] = $namenew;

$profile_form = array_values(module_invoke('profile', 'user', 'register', array(), (object)array()));
if (!empty($profile_form)) {
$profile_form = $profile_form[0];
foreach ($profile_form as $key => $value) {
if ($key[0] != '#') {
$new_account[$key] = $_SESSION['uc_signup']['profile'][$key .'_'. $mail];
}
}
}

$account = user_save(NULL, $new_account);
}
$to_signup[$nid][] = $account->uid;
}

// First, create accounts for emails that don't have accounts.
//uc_signup_cancel_temporary_signups($order);
$placeholders = '';
global $user;
// TODO: check if there are any signups to create.
//Make sure that there are enough spots before continuing. If there are not enough spots, the order should fail.
foreach ($to_signup as $nid => $value) {
$spots_remaining = uc_signup_spots_remaining(array('nid' => $nid));
if (count($to_signup[$nid]) > $spots_remaining) {
$insufficient_space[] = $nid;
$message .= _uc_signup_limit_reached_message($spots_remaining, array('nid' => $nid));
}
if (!empty($insufficient_space)) {
$message .= t("Events can fill up rapidly, and people may have signed up since you added these events to your cart. Please adjust the quantity before checking out.");
return array(array('pass' => FALSE, 'message' => t($message)));
}
}

foreach ($to_signup[$nid] as $key => $uid) {
$signup_form = array(
'nid' => $nid,
'uid' => $uid,
);
$sid = NULL;
$sid = signup_sign_up_user($signup_form, FALSE);
drupal_set_message($sid);
if (is_numeric($sid)) {
db_query("INSERT INTO {uc_signup_log} (oid, sid, type) VALUES (%d, %d, %d)", $arg1->order_id, $sid, 0);
}
}
}
}

In the above code I have put
foreach ($to_signup[$nid] as $key => $uid) {
$signup_form = array(
'nid' => $nid,
'uid' => $uid,
);
$sid = NULL;
$sid = signup_sign_up_user($signup_form, FALSE);
drupal_set_message($sid);
if (is_numeric($sid)) {
db_query("INSERT INTO {uc_signup_log} (oid, sid, type) VALUES (%d, %d, %d)", $arg1->order_id, $sid, 0);
}
}
Part of code inside the
foreach ($_SESSION['uc_signup']['nids'] as $nid => $attendees) {
loop for inserting multiple attendees information for multiple events.It work fine for me, but i am not sure if it works for all condition's. please can anyone help me to guide if it is ok or I have to do somthing more.

abhishek.dabas’s picture

In my previous post, I have also commented the
uc_signup_cancel_temporary_signups($order) function coz this function will delete data from uc_signup_log,singup_log tables against a Order_id.

puneet63’s picture

Status: Postponed (maintainer needs more info) » Active
ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

I have no idea what you are talking about when you say there is no 'submit' op for hook_order. See http://www.ubercart.org/docs/api/hook_order .

ezra-g’s picture

I'm not clear on the problem you're having, but I just found and fixed #530396: Signups not created for more than 1 event per cart, so this might address the issue you're experiencing.

puneet63’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks for your help

I have checked the hook_order and I have also downloaded the latest dev. realease of uc_signup module of 25 july.

So now I am doing testing on it using test credit card and paypal sandbox account. It is working fine with test credit card with test gateway.

But it is not with paypal sandbox account may be it is returning a pending order status (not the completed Status) after completion of order. So could you help me in resolveing this. I am also looking to turn on IPN settings on paypal account. But did't find any solution

So please help me to resolve this

Thanks in advance

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

Is paypal set to capture immedietly? It should be. The order pending status sounds like it paypal is not processing the payment when the order is submitted. From the uc_signup project page: "Once checkout is complete, if the order balance is not cleared, the signups are cancelled. If the balance is cleared, the signups are converted from temporary to final signups."

ezra-g’s picture

Also, I just rolled a new beta, which requires Signup.module RC4.

puneet63’s picture

Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

Thanks for signup.module rc4 .

currently I am using this module with uc_signup-beta3.
Its working fine a bit, but still I have another issue.

1. Firstly, the signup list for an event is shown without clicking signup button, and when I click on signup then access denied page is show even I have logged in as an administrator.

2. From where i have to set the Capture immediate option as suggested by you in post, In paypal sandbox or in our stote administration->configuration->paymentsettings.

I have already set this option in stote administration->configuration->paymentsettings. But it don't work.

ezra-g’s picture

Category: bug » support
Priority: Critical » Normal

1) This sounds like a bug report that should go to signup.module. In any case, users on your site should not have the "sign up for content" permissions.
2) You're saying you don't know where this setting is but you set it already? It's at http://new.aussiepd.com/admin/store/settings/payment/edit/gateways .

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)
ezra-g’s picture

Status: Postponed (maintainer needs more info) » Fixed

Please re-open this issue if you're still having this problem.

mikehues’s picture

I'm having the same problem as described in the original post. Signups are not being saved in the db.

I'm currently using:
uc_signup 6.x-1.0-beta3
signup 6.x-1.0-rc4

When testing with the 'Test Gateway' payment method, things were working fine. But, when using 'PayFlow Link' or 'PayPal Website Payments Standard', the signups are not saved. The 'submit' block in uc_signup_order is not being called.

from docs on http://www.ubercart.org/docs/api/hook_order:
submit - When a sale is being completed and the customer has clicked the Submit order button from the checkout screen, the hook is invoked with this op.

I think this is the problem:

Both 'PayFlow Link' and 'PP WPS' alter the form on the 'Review Order' checkout screen. They unset the submit button and add a new one that redirects to the payment forms at paypal.

Any help would be greatly appreciated.

sean porter’s picture

Version: 6.x-1.0-beta2 » 6.x-1.0-beta3
Status: Fixed » Active

seems like this may be a duplicate of http://drupal.org/node/540298

I can confirm the same problem:

D6.13
ubercart 6.x-2.0-rc3
uc_signup 6.x-1.0-beta3
signup 6.x-1.0-rc4

uc_signup conditional actions are in place

using credit cart/test gateway the transaction goes as expected; the user is added to the signup list.

using paypal web payment standard on the sandbox server completes the payment, but the user is not added to the signup list, and no signup generated confirmation emails are sent (to either the Admin or the user). (UC's payment confirmation emails are sent OK)

I'm excited about this module, I hope this can be resolved!

ezra-g’s picture

Category: support » bug
Status: Active » Closed (duplicate)