What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

If I'd like to create orders programatically, which would be the best class to start with?

UK5DS29L2
UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

If I'd like to create orders programatically, which would be the best class to start with?

Comments

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    I’m a bit on the older version of Spryker atm, but the way to go would be to start with programmatically building the Quote object and then passing it to the SalesFacade::saveSalesOrder() method

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited August 2019

    depending on your task, you could also start earlier in the process, like from CheckoutFacade::placeOrder()

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    might be even better

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    I think this is the one that stands first once QuoteTransfer hits Zed

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    yup, \Spryker\Zed\Checkout\Business\CheckoutFacade::placeOrder seems like the best one so far, thank you