Needs work
Project:
Commerce Login Step
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2014 at 03:40 UTC
Updated:
5 Apr 2017 at 11:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
OpenVenture1 commentedComment #2
OpenVenture1 commentedComment #3
OpenVenture1 commentedOk, found a solution.
Quick fix:
/**
* Implements hook_commerce_checkout_router().
* Skip login page for logged-in user.
*/
function overrides_commerce_checkout_router($order, $checkout_page) {
global $user;
if ($user->uid > 0 && $checkout_page['page_id'] == 'login') {
commerce_order_status_update($order,'checkout_checkout');
drupal_goto('checkout/' . $order->order_id . '/checkout');
}
}
Comment #4
OpenVenture1 commentedComment #6
Rosenstrauch commentedthis should be integrated into the module as default behaviour or config option.
Comment #7
jnicola commentedRe-opening. This isn't a closed issue until it's been brought into the module!
Redoing the code submitted as a patch. and attaching.
Comment #8
jnicola commentedAdding new patch. Previous patch must have been in a custom module called "overrides". This new patch renames the hook to properly work with commerce_login_step
Comment #9
jnicola commentedUpdating commit to properly attribute to organization and client. Was unaware of this ability!
Comment #10
anybody#3 works great!
Comment #11
Rosenstrauch commentedpatch in #9 works great.
Comment #12
Rosenstrauch commentedthe only thing that's troubling is that this leaves us with a "go back" link that doesn't work and an item in checkout progress (possibly linked) which should also be hidden.
Comment #13
Rosenstrauch commentedalso i still maintain this should be configurable as an option in the modules settings (checkbox at admin/commerce/config/checkout/form/pane/account) since some people might prefer the original behaviour.
https://www.drupal.org/node/2362777#comment-9677293
Comment #14
rory downes commentedI actually solved this one by simply moving the 'Account information' pane to the 'Checkout' page. Thus when you are logged in it does not appear.
Hope this helps someone else, at least until this is solved in code.
Rory
Comment #15
m-webtechnik commentedproblem mentioned in #12 is solved with this patch