Login users when new customer accounts are created at checkout doesn't work for me. The flag is checked, of course.
New users receive a mail with links for one-time download but going to the site through the links cannot download the files because not logged in.
Where is hard coded this feature?
Thanks
Hmm... there has been trouble with this feature in the past. Are you using HTTPS for checkout? Also, once you checkout, can you view the account pages and such before viewing that e-mail?
Ciao Ryan,
I solved simply giving permission to anonymous users to uc_file module, in order new users can download the one-time link in the mail automatically sento to them... Now it works. I suppose it can work in this way... tell me, in case, if it must be different...
I set the permission of uc_file/download to anonymous users otherwise it doesn't works, even though the check is on in
Order process - Checkout completion settings - Login users when new customer accounts are created at checkout
I read it here from TorgosPizza: http://www.ubercart.org/forum/support/4303/how_user_connects_their_file_...
Maybe I can solve in other way? (giving permission of uc_file only to authenticated users and making work, in some way, the 'Login users when new customer accounts are created at checkout' feature)?
>Ryan wrote:can you view the account pages and such before viewing that e-mail?
yes I can
and no HTTPS
thanks
I suppose that works, though it does open up the possibility of someone sharing their one-time link with someone else before they login to the site to download the file the normal way.
Yes it does work and it's not a big problem, since the link is valid only for one download.
Can you give me some suggestions to me in order I give permission to download only to autenticate users and make the things work as they should? I tried almost everything in the last two days...
Same problem, have checked;
# Send new customers a separate e-mail with their account details.
# Login users when new customer accounts are created at checkout.
# New customer accounts will be set to active.
But neither one of these settings are actually being used. Not even getting an email with account details.
I am using HTTPS via uc_Ogone. Also I don't have to option for "Allow anonymous customers to specify a new user acount name." and "Allow anonymous customers to specify a new user acount password" checked cause it said 'We will create these for you if no values are entered.'
Is it https causing this? Or am I missing a different setting?
Cheers
I don't know much about how Ogone works. Does it redirect you to their site to submit payment?
Hi Ryan,
Yes it does. Once you go to checkout and fill in billing details and such you can click to go to a secure payment screen. This is hosted at ogone.com. Once you enter your creditcard details and finish there you're forwarded to your ubercart site again where you get the message that you've paid.
But I've been working on the ogone module myself because it had some bugs so it's no problem to implement code if nessecary. But I need to know where is the automated account creation and emailing of account details called normally? Is this done by the payment module like ogone or paypal or is this done by ubercart core after a trigger from a payment module. What functions do I need to be looking for?
Thanx for your help. Am very close to finishing my first ubercart project. It's set up to be multilingual, yet when going live only English will be available at first... been quite the ride.
Cheers
Well, I'm glad you've been able to persevere and get this far. I know multilingual Ubercart isn't the easiest thing to accomplish yet! Hopefully I can get you the last 10% w/ your payment module... basically, you need to make sure that the module calls the uc_cart_complete_sale() (see if in uc_cart.module) whenever the payment is confirmed back on the Ubercart side. This is where account creation is happening for now.
Thanx for the reply again... funny stuff;
The ogone module forwards one upon completion: drupal_goto('cart/checkout/complete');
This should call uc_cart_checkout_complete() and it does partially cause it loads variable_get('uc_cart_checkout_complete_page', '');
Yet somehow it skips $output = uc_cart_complete_sale and thus not logging in a new user.
When I enter these lines
$order = uc_order_load(intval($_SESSION['cart_order']));
$output = uc_cart_complete_sale($order, variable_get('uc_new_customer_login', FALSE));
before ogone module forwards me drupal_goto('cart/checkout/complete'); a new user does get logged in but ofcourse that way $_SESSION['do_complete'] is being reset before uc_cart_checkout_complete() has a change to do so and thus one will miss the succes message 
Will have to dive deeper into this one 
Keep ya posted!
Does the module set $_SESSION['do_complete'] = TRUE before the drupal_goto('cart/complete/sale')?
It does idd
// ok function
$result = db_query("SELECT sha1_test_succes FROM {uc_payment_ogone} WHERE order_id = %s", $_SESSION['ogone_order_id']);
$ogone_order = db_fetch_object($result);
//Debug
//print_r($ogone_order);
//exit;
if ($ogone_order->sha1_test_succes == 'OK'){
uc_order_update_status($_SESSION['ogone_order_id'], uc_order_state_default('payment_received'));
//Debug
//drupal_set_message('cartid:'.uc_cart_get_id().' ogone order id:'.$_SESSION['ogone_order_id']);
// Ensure the cart we're looking at is the one that payment was attempted for.
$_SESSION['cart_order'] = $_SESSION['ogone_order_id'];
unset($_SESSION['ogone_order_id']);
// This lets us know it's a legitimate access of the complete page.
$_SESSION['do_complete'] = TRUE;
drupal_goto('cart/checkout/complete');
}else{
drupal_goto('cart/ogone_false');
}
But I think it's meant to do that because otherwhise uc_cart_checkout_complete won't run.
Cheers
If you'd only know how little I feel right now...
I tried another email address and it worked... so I checked out the users table and there it was, the little deamon! A old user account with the same email address.... that was causing the email and account creation to fail. Sorry to have abused your time on this. I should take longer brakes and work less hours.
Will PM ya when we go live if you want so you can see the results.
Cheers,
Bartezz
hah, no need to feel little. Talking it out helps. 
I'd like to go back to the original question of this thread ... we're not using Ogone.
We're using Ubercart 5.x-1.7. We have "Login users when new customer accounts are created at checkout." selected, and I have set the "uc_file >> download file" access control to be selected for anonymous users. Once the file download purchase is complete for an anonymous user, the customer is taken to the "Order complete" page and they are not logged in.
We are not currently using https since we're running in a test environment at the moment, but I can tell you I have no problem with this process using the test gateway as long as I am logged in to my account.
I'm with ron_s. We're having the same problem.
Actually it turns out our problem was, in the words of a martially clad Graham Chapman, "just silly."
The "Login users when new customer accounts are created at checkout" configuration sort of conflicts with Drupal's user setting: "Require e-mail verification when a visitor creates an account" which is enabled by default.
That's embarrassing, but hopefully the rest of you now won't need to spend as much time on this as I did.
I had the same issue. I think the "Login users when new customer accounts are created at checkout." option should have a help text underneath it that says, that the user preferences setting to require email confirmation needs to be turned off for this to work properly.
When I turned email confirmation off in the user preferences (which is the default), it worked as I expected it to.
using SSL cert/Secure Pages
user settings does not require email validation/confirmation
account gets created, role gets assigned, and all other actions/conditions work properly
the link in the email looks valid (ie has a userid embedded in it that reflects the recently created user)
when I click on the link to view the order, I get the Access Denied page and I am not logged in automatically
I made sure to clear all cookies before testing this.
Another question -- what happens when fjones@hotmail.com buys something and an account gets created called fjones. Suppose the following week fjones@yahoo.com buys something? Seems to me that the account creation would fail for poor Mr. Jones....Is there a way to modify what is used to create the new username? Such as email address? I know one can provide this option using LoginToboggan but I'm thinking the two wouldn't work together in this case.
updated: using UC2 + Drupal 6.13 + PayPal Websites Payments Standard
I think I found a subset of this issue, with the exact steps to reproduce.
Could you verify that the same issue exists for you as well?
See it here:
http://drupal.org/node/658470
Doesn't work for me either. Using PayPal. User goes to PayPal site, clicks on "return to site" link after payment and comes back to the site unable to access the content because they are not logged in.
"Enable Anonymous Checkout" checked
"New customer accounts will be set to active." checked
"Login users when new customer accounts are created at checkout." checked
"Require e-mail verification when a visitor creates an account" NOT checked
Accounts ARE being created
Roles ARE being assigned to the accounts
Accounts ARE created as active
IPN transaction verified according to watchdog
User is NOT logged in on return to the site.
Is this feature possible with PayPal or is there something about leaving the site and returning that makes it impossible?
We now have the setting to tell Ubercart to log in new users whose accounts are created during checkout. However the login can trigger a redirect which can prevent the checkout from completing correctly and result in the user not receiving their invoice. In case someone else finds this post when researching this problem as I did, additional information can be found at http://drupal.org/node/794756 (Login redirect causes uc_checkout_complete trigger not to be pulled).
