Add order-create tool#2
Open
avstudnitz wants to merge 2 commits into
Open
Conversation
Add an `order-create` tool to OrderTools that builds a guest quote from line items (sku + qty) and a single billing/shipping address, applies the requested shipping and payment methods, and places the order via CartManagementInterface::placeOrder. Registered in DESTRUCTIVE_TOOLS so it is disabled by default and blocked in production unless explicitly enabled, consistent with the other order-mutating tools, and auto-discovered via requireToolEnabled. Also wires the tool through everything that enumerates tools: the search-tools orders group, README, wiki (Tools-Orders, Configuration, cli-commands), CHANGELOG, and the config/count unit tests.
Add an optional `customerId` to order-create. When > 0 the quote is assigned to that customer via Quote::assignCustomer, so the order is linked to the account (customer email/group are taken from the customer); 0 keeps the guest-by-email behavior. The new parameter is documented in the wiki.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an
order-createtool to OrderTools that builds a guest quote from line items (sku + qty) and a single billing/shipping address, applies the requested shipping and payment methods, and places the order via CartManagementInterface::placeOrder.Registered in DESTRUCTIVE_TOOLS so it is disabled by default and blocked in production unless explicitly enabled, consistent with the other order-mutating tools, and auto-discovered via requireToolEnabled.
Also wires the tool through everything that enumerates tools: the search-tools orders group, README, wiki (Tools-Orders, Configuration, cli-commands), CHANGELOG, and the config/count unit tests.