Answers.Body: <p>There's a few moving parts here but Commerce 3.3, which was recently released, just introduced <a href="https://craftcms.com/docs/commerce/3.x/making-payments.html#full-payment-at-checkout" rel="nofollow noreferrer">support for partial or deferred payments</a> which should help get this done easily.</p>
  <p>I'm not sure what your checkout looks like but one way to handle it would be to post via ajax. Basically anything that updates on-the-fly (addresses, line items, etc.) needs to to get pushed to update-cart first.  You don't really need to write a plugin for this.</p>
  <p>Then when you ready to complete the order, you could also make one final push to update cart. Then when a user wants to finalize, they then hit the <code>commerce/cart/complete</code> endpoint.</p>
  <p>You could also have a separate &quot;confirm your order&quot; screen which could give the user time to check over their catering before it gets sent.</p>
  <p>Either way, you want to have the new <a href="https://craftcms.com/docs/commerce/3.x/config-settings.html#allowcheckoutwithoutpayment" rel="nofollow noreferrer"><code>allowCheckoutWithoutPayment</code></a> setting set to <code>true</code>.</p>
  <p>It's also possible to grab a <a href="https://craftcms.com/docs/commerce/3.x/making-payments.html#checkout-with-partial-payment" rel="nofollow noreferrer">partial payment</a> (say if your client wants to do a deposit).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-01T03:33:05.737Z
Answers.Text: Just saw your answer now. I ended up doing what I needed via two sequential ajax calls, `commerce/cart/update-cart` followed by `commerce/cart/complete` and it all works perfectly. So you had definitely flagged the right approach. Cheers for taking the time.
Answers.UserDisplayName: bhu Boue vidya
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-22T23:03:16.953Z
Answers.Text: @bhuBouevidya do you have any example code on your solution?
Answers.UserDisplayName: Tad Ward
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-29T18:39:36.683Z
Answers.LastActivityDate: 2021-04-29T18:39:36.683Z
Answers.UserDisplayName: RitterKnight
Body: <p>I am developing a site which has &quot;normal&quot; shop stuff that is added to cart and bought through the checkout process. But it also has to support submitting requests for food catering jobs. This is a slightly different workflow. I want to do this by creating a &quot;catering product&quot;, which has a number of line items which represent the food items the customer wants supplied on the day.</p>
  <p>So I can setup a custom product page with all the line item fields etc on it. But now I am wanting to combine &quot;add to cart then complete checkout without payment&quot; into one action, so that this all happens in one go when they submit the catering request form. (The client will then get in touch with the customer, confirm the catering job details, then the customer will pay for the job once everyone is happy.) So really I need to combine <strong>two actions</strong> - &quot;update cart&quot; and &quot;complete cart&quot;.</p>
  <p>Any suggestions on the best way to do this? Do I have to write my own module? Any advice/tips greatly appreciated!</p>
  
Tags: <plugin-craftcommerce><plugin-craftcommerce3>
Title: Do "update cart" and "complete cart" as one action
ThreadText: # Do "update cart" and "complete cart" as one action
  
  (Asked by: username_0 on 2021-04-28)
  
  I am developing a site which has "normal" shop stuff that is added to cart and bought through the checkout process. But it also has to support submitting requests for food catering jobs. This is a slightly different workflow. I want to do this by creating a "catering product", which has a number of line items which represent the food items the customer wants supplied on the day.
  
  So I can setup a custom product page with all the line item fields etc on it. But now I am wanting to combine "add to cart then complete checkout without payment" into one action, so that this all happens in one go when they submit the catering request form. (The client will then get in touch with the customer, confirm the catering job details, then the customer will pay for the job once everyone is happy.) So really I need to combine **two actions** - "update cart" and "complete cart".
  
  Any suggestions on the best way to do this? Do I have to write my own module? Any advice/tips greatly appreciated!
  
  **Tags:** plugin-craftcommerce, plugin-craftcommerce3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-04-29. Score: 3 | Accepted answer
  
  There's a few moving parts here but Commerce 3.3, which was recently released, just introduced [support for partial or deferred payments](https://craftcms.com/docs/commerce/3.x/making-payments.html#full-payment-at-checkout) which should help get this done easily.
  
  I'm not sure what your checkout looks like but one way to handle it would be to post via ajax. Basically anything that updates on-the-fly (addresses, line items, etc.) needs to to get pushed to update-cart first. You don't really need to write a plugin for this.
  
  Then when you ready to complete the order, you could also make one final push to update cart. Then when a user wants to finalize, they then hit the `commerce/cart/complete` endpoint.
  
  You could also have a separate "confirm your order" screen which could give the user time to check over their catering before it gets sent.
  
  Either way, you want to have the new [`allowCheckoutWithoutPayment`](https://craftcms.com/docs/commerce/3.x/config-settings.html#allowcheckoutwithoutpayment) setting set to `true`.
  
  It's also possible to grab a [partial payment](https://craftcms.com/docs/commerce/3.x/making-payments.html#checkout-with-partial-payment) (say if your client wants to do a deposit).
  
  > **Comments:**
  > **username_0**: Just saw your answer now. I ended up doing what I needed via two sequential ajax calls, `commerce/cart/update-cart` followed by `commerce/cart/complete` and it all works perfectly. So you had definitely flagged the right approach. Cheers for taking the time.  
  > **username_2**: @username_0 do you have any example code on your solution?  
  
  ---
  
  