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.
Right now the order add page is the same as the order edit page.
Instead, we should create an order/add page which lets you select the order type, store, user/mail, and later language.
This form will save an order, then redirect to its edit page.
Thus the full order form always has access to the order id and uid, which makes it easy to calculate adjustments by calling external services, as well as write a widget to reuse customer profiles.
The 'type' and 'store' elements should be of type 'entity_select' so that they are hidden when there's only one option.
Comment | File | Size | Author |
---|---|---|---|
#13 | commerce-order-add-form-extras.gif | 176.25 KB | mglaman |
#13 | commerce-order-add-form.gif | 233.31 KB | mglaman |
#12 | interdiff-2618136-11-12.txt | 6.44 KB | mglaman |
#12 | create_a_custom_order-2618136-12.patch | 6.56 KB | mglaman |
#11 | custom_order_add_form-2618136-11.patch | 5.01 KB | vasike |
Comments
Comment #2
vasikethere is a patch for this
Questions:
- Some help text for the form
- Validation needed?
- Message on submit?
- Language, is this something for the future?
Comment #3
rszrama CreditAttribution: rszrama at Centarro commentedCan we get a screenshot for easier review?
Comment #4
mglamanWith patch:
Without patch:
This patches removes the need for https://www.drupal.org/project/commerce_admin_order_advanced to be ported.
I give my thumbs up.
Comment #5
rszrama CreditAttribution: rszrama at Centarro commentedCool, we're getting there. I don't think "Authoring information" really fits the fieldset title given orders aren't content that users author. Commerce 1.x uses "User information", which is better than "Author" but could still use some improvement. On the intermediate page, though, I feel like we can make it feel more like a wizard - i.e. think of it less as just filling out part of the full form and more as guiding the administrator through the first step of order creation - selecting an existing user, creating a new one, or creating an unassociated order.
We actually did this well in Ubercart, but I'd love to see some other systems' implementations and / or rough out some ideas based on our entities.
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedRelated: #2620506: Rework anonymous checkout order account handling.
Some screens/videos:
Magento 2: http://blog.belvg.com/how-to-create-new-order-in-magento-2-0.html
Spree: https://guides.spreecommerce.com/user/entering_orders.html
Shopify: https://docs.shopify.com/manual/your-store/orders/create-orders#add-cust...
Bigcommerce: https://support.bigcommerce.com/articles/Public/Creating-a-Manual-Order#...
Comment #7
bojanz CreditAttribution: bojanz at Centarro commentedThe bigcommerce UX is easy to imitate. I'd hide the password fields behind an "Autogenerate password" checkbox though.
Comment #8
ndf CreditAttribution: ndf commentedBigcommerce workflow/ux looks impressive to me.
Would be great if we can achieve that.
Comment #9
mglamanTo add on #7, we should maybe add the required profile, too? This is what Shopify has. It uses a modal, but I like the idea of creating the order first through the steps in #7.
Comment #10
mglamanMarking as needs work, since we want to change some labels and enhance user selection/creation.
Comment #11
vasikePatch updated (following #7 UX suggestions):
- Change the "Authoring information" with ""Customer information"
- Add new radios for Existing & Anonymous user and use Ajax to change the form according with selection
- Use the User search autocomplete (without anonymous) only for Existing, the user email it will be used for the order
- Use email form element for Anonymous user selection.
ToDo
- New user option.
- Customer data (address)
- Others.
Comment #12
mglamanComment #13
mglamanAttaching some slick gifs demonstrating usage.
One store, one bundle
Multiple stores, multiple bundles.
Comment #15
bojanz CreditAttribution: bojanz at Centarro commentedCommitted.