Where is defined Checkout button? (Page: /Cart)
Hello everyone!
I need to know where is defined the checkout button on the page "my_domain/ cart".
I have spent a lot of hours looking at all files from cart module but I can not find any line of code.
I need to change the direction of the link. I want that if the user is logged The cheout button redirects you directly to step 2 of the checkout and if not logged the checkout button redirects you to step 1 (Note: my checkout steps have been modified and are different from the default ones)
Thank you very much to all
P.D: Sorry for my bad English hehe
Comments
Why do you need to know where
Why do you need to know where the cart button is defined? If you need to alter the submission action, hook the form and alter it's submission handler. You'll need to know the Form API to do that.
I've never developed in
I've never developed in drupal, I know a bit like hook works but have little time to complete the project, so I wanted to modify the original link, only it was to save time.
But if you think it is easier that way. I would appreciate you to tell me a little more detail how do it.
I managed to redirect to the
I managed to redirect to the page I wanted, but the system itself makes me a redirect to the first page of the checkout. I think the system itself allow not skip steps checkout. How I can fix this?
You can also use the hook
You can also use the hook_commerce_checkout_router() to interact when the checkout proccess begins.
You'll find an example in the Drupal Commerce API page for this hook:
http://api.drupalcommerce.org/api/Drupal%20Commerce/sites%21all%21module...
Thank a lot! I think is
Thank a lot! I think is shortly to works. The problem is that it redirect loop. Anybody know how to fix this?
The same problem
I have the same problem... Did you find a way to fix it?
Thank you in advance...
The same problem
I have the same problem .. did you find a way to fix it?