Magento 2 place order in custom controller (difference between placeOrder and submit)How to create order programmatically in Magento 2?Custom Shipping Method - Execute some code when the admin submit a shipmentDifference between _module.less and _extend.lessProgramatically Create Order in Magento 2.1Place order using Magento Rest API - IssueMagento 2: Split order for every ItemAdd multiple products to cart using Magento2 REST API using custom methodmagento 2.2.4 : Create orders programmaticalyMagento 2 - Difference between Model, ResourceModel. Collection and RepositoryMagento2 Get Order API data in custom sectionMagento 2.3 - How add new column/field to sales_shipment table

Is it OK to say "The situation is pregnant with a crisis"?

What is the function of const specifier in enum types?

Odd PCB Layout for Voltage Regulator

German idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)

A world with roman numeral alphabet

SQL Server Ignoring Instance name when using port number of different instance

Does the Grothendieck group of finitely generated modules form a commutative ring where the multiplication structure is induced from tensor product?

Can I deep fry food in butter instead of vegetable oil?

Does friction always oppose motion?

What could a Medieval society do with excess animal blood?

Simplify the code

Installed software from source, how to say yum not to install it from package?

What prevents a US state from colonizing a smaller state?

When does it become illegal to exchange bitcoin for cash?

Find the closest three-digit hex colour

Trace in the category of propositional statements

Wings for orbital transfer bioships?

Available snapshots for main net?

How soon after takeoff can you recline your airplane seat?

What does this Pokemon Trainer mean by saying the player is "SHELLOS"?

Why doesn't SpaceX land boosters in Africa?

Why is the saxophone not common in classical repertoire?

Can I hire several veteran soldiers to accompany me?

Did the Shuttle payload bay have illumination?



Magento 2 place order in custom controller (difference between placeOrder and submit)


How to create order programmatically in Magento 2?Custom Shipping Method - Execute some code when the admin submit a shipmentDifference between _module.less and _extend.lessProgramatically Create Order in Magento 2.1Place order using Magento Rest API - IssueMagento 2: Split order for every ItemAdd multiple products to cart using Magento2 REST API using custom methodmagento 2.2.4 : Create orders programmaticalyMagento 2 - Difference between Model, ResourceModel. Collection and RepositoryMagento2 Get Order API data in custom sectionMagento 2.3 - How add new column/field to sales_shipment table













2















In How to create order programmatically in Magento 2? it shows two methods on how to place a quote as an order. The first method uses



$order = $this->quoteManagement->submit($quote);


via MagentoQuoteModelQuoteManagement. This returns an MagentoSalesModelOrder object.



The second method is using



$cart = $this->cartRepositoryInterface->get($cart->getId());
$order_id = $this->cartManagementInterface->placeOrder($cart->getId());


This method uses both the MagentoQuoteApiCartRepositoryInterface $cartRepositoryInterface and the MagentoQuoteApiCartManagementInterface $cartManagementInterface.



Another approach I found is basically the first one, but using MagentoQuoteApiCartManagementInterface instead...



What are the differences between those approaches?










share|improve this question




























    2















    In How to create order programmatically in Magento 2? it shows two methods on how to place a quote as an order. The first method uses



    $order = $this->quoteManagement->submit($quote);


    via MagentoQuoteModelQuoteManagement. This returns an MagentoSalesModelOrder object.



    The second method is using



    $cart = $this->cartRepositoryInterface->get($cart->getId());
    $order_id = $this->cartManagementInterface->placeOrder($cart->getId());


    This method uses both the MagentoQuoteApiCartRepositoryInterface $cartRepositoryInterface and the MagentoQuoteApiCartManagementInterface $cartManagementInterface.



    Another approach I found is basically the first one, but using MagentoQuoteApiCartManagementInterface instead...



    What are the differences between those approaches?










    share|improve this question


























      2












      2








      2








      In How to create order programmatically in Magento 2? it shows two methods on how to place a quote as an order. The first method uses



      $order = $this->quoteManagement->submit($quote);


      via MagentoQuoteModelQuoteManagement. This returns an MagentoSalesModelOrder object.



      The second method is using



      $cart = $this->cartRepositoryInterface->get($cart->getId());
      $order_id = $this->cartManagementInterface->placeOrder($cart->getId());


      This method uses both the MagentoQuoteApiCartRepositoryInterface $cartRepositoryInterface and the MagentoQuoteApiCartManagementInterface $cartManagementInterface.



      Another approach I found is basically the first one, but using MagentoQuoteApiCartManagementInterface instead...



      What are the differences between those approaches?










      share|improve this question
















      In How to create order programmatically in Magento 2? it shows two methods on how to place a quote as an order. The first method uses



      $order = $this->quoteManagement->submit($quote);


      via MagentoQuoteModelQuoteManagement. This returns an MagentoSalesModelOrder object.



      The second method is using



      $cart = $this->cartRepositoryInterface->get($cart->getId());
      $order_id = $this->cartManagementInterface->placeOrder($cart->getId());


      This method uses both the MagentoQuoteApiCartRepositoryInterface $cartRepositoryInterface and the MagentoQuoteApiCartManagementInterface $cartManagementInterface.



      Another approach I found is basically the first one, but using MagentoQuoteApiCartManagementInterface instead...



      What are the differences between those approaches?







      magento2 programmatically place-order






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 24 at 11:24









      Abdul Pathan

      1637 bronze badges




      1637 bronze badges










      asked Jun 24 at 10:58









      fritzmgfritzmg

      2751 silver badge12 bronze badges




      2751 silver badge12 bronze badges




















          0






          active

          oldest

          votes














          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f279395%2fmagento-2-place-order-in-custom-controller-difference-between-placeorder-and-su%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f279395%2fmagento-2-place-order-in-custom-controller-difference-between-placeorder-and-su%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form