I am working on a site that integrates with our company's ordering and payment system. I have a flow I need to create that, after the customer clicks the checkout button, it takes them to a login/register page, then to a place to enter their shipping and billing address, then to a shipping page (which our service provides the shipping costs), then to a payment page. I created a custom flow called 'SRSCheckoutFlow' and here is my code:
class SRSCheckoutFlow extends CheckoutFlowWithPanesBase {
/**
* {@inheritdoc}
*/
public function getSteps() {
return [
'login' => [
'label' => $this->t('Login'),
'previous_label' => $this->t('Return to cart'),
'has_order_summary' => FALSE,
],
'order' => [
'label' => $this->t('Order Information'),
'previous_label' => $this->t('Return to login'),
'has_order_summary' => FALSE,
],
'shipping' => [
'label' => $this->t('Shipping Service'),
'previous_label' => $this->t('Return to order information'),
'has_order_summary' => FALSE,
],
'review' => [
'label' => $this->t('Review'),
'has_order_summary' => TRUE,
],
'payment' => [
'label' => $this->t('Payment'),
'has_order_summary' => TRUE,
],
'payment_processing' => [
'label' => $this->t('Payment Processing'),
'has_order_summary' => TRUE,
],
] + parent::getSteps();
}
}
Problems are when I am not logged in, I go to the login/register page as desired but after I register, I get sent to a blank Checkout page. If I am already logged it, I get sent to the shipping page which misses the part where I need the user to add their shipping and billing information.
In Home > Administration > Commerce > Configuration > Checkout flows, I have all the steps created in the SRSCheckoutFlow and I added the following to each step
Login
- Login or continue as guest
Order Information
- Shipping information
- Contact information
Shipping Service
- Shipping Services (which is custom and showing correctly)
Review
- Review
Payment
- Payment information
Am I missing something in the flow that jumps over the Shipping information and Contact information sections?
/admin/commerce/config/order-types
. If you didn't create any, edit default, scroll all the way down. Make sure your checkout flow is set to yourSRSCheckoutFlow
– No Sssweat Nov 18 '20 at 6:32how do I make sure that information is saved to the customer's record
that should get automatically saved to the "address book", so next time they checkout its pre-filled. – No Sssweat Nov 19 '20 at 5:08