Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
when de-selecting "Send new customers a separate e-mail with their account details.", the invoice mail doesn't contain the new username and password because $_SESSION['new_user'] is cleared before the template gets parsed
to fix it, in ./uc_cart/uc_cart.module at line 1288 move the unset last, like this:
// Empty that cart...
uc_cart_empty(uc_cart_get_id());
module_invoke_all('uc_checkout_complete', $order, $account);
ca_pull_trigger('uc_checkout_complete', $order, $account);
// Clear our the session variables used to force the cart workflow.
unset($_SESSION['cart_order'], $_SESSION['do_complete'], $_SESSION['new_user']);
how does it impact the 2 function calls? seems to be working ok, alternatively you can split it in 2 unset calls and just unset the new_user last
Comment | File | Size | Author |
---|---|---|---|
#9 | uc_cart_ptach_2.patch | 743 bytes | sarjeet.singh |
#7 | uc_cart_ptach_1.patch | 687 bytes | sarjeet.singh |
#5 | uc_cart_ptach.patch | 621 bytes | sarjeet.singh |
Comments
Comment #1
Offlein CreditAttribution: Offlein commentedThis seemed to do just what I needed, and I've yet to see any negative consequences.
Comment #2
EvanDonovan CreditAttribution: EvanDonovan commentedIs there any reason why this is not being done already? I am experiencing this issue also in 2.3.
Comment #3
EvanDonovan CreditAttribution: EvanDonovan commentedI think this is a major bug; I'm still seeing it in 2.4. Going to try the suggested code & see if I run into issues. RTBC if none.
Comment #4
YK85 CreditAttribution: YK85 commentedsubscribing
Comment #5
sarjeet.singh CreditAttribution: sarjeet.singh commentedI faced same problem. abaddon's solution worked fine.
I made a patch for it. its need to review.
Comment #7
sarjeet.singh CreditAttribution: sarjeet.singh commentedI made new patch(uc_cart_ptach_1.patch). please review it.
Comment #9
sarjeet.singh CreditAttribution: sarjeet.singh commentedI made new patch(uc_cart_ptach_2.patch) with git(linux). please review it.
Comment #10
longwaveIgnore the testbot failures, it doesn't work properly at the moment.
Comment #12
Offlein CreditAttribution: Offlein commentedThis ptach has been working for me in a live environment for about a year now. I think it should just be committed.
Comment #13
EvanDonovan CreditAttribution: EvanDonovan commentedI agree with Offlein. I didn't test this particular patch to see whether it applies, but it does exactly what I am now doing on my production sites (and have been for about 6 months).
Comment #14
longwaveJust to note this change is already included in another patch that fixes several other issues at #644538-291: Duplicate order notification e-mail, and duplicate stock decrement
Comment #15
Offlein CreditAttribution: Offlein commentedHrm. If that patch takes forever to commit, then it should be broken out.
Comment #16
longwaveCommitted to both branches.
Comment #17
Offlein CreditAttribution: Offlein commentedWhaa!! Great success!
Comment #18
sarjeet.singh CreditAttribution: sarjeet.singh commentedGreat!!!! :)