2

I want to create a new order from an existing order (customer address, cart products...etc) with a button "copy", Is it possible ?

Edit :

1) Imagine you have :

Order n°10001 Customer name : Magento, email : [email protected] ...etc Customer products : computer ASUS , speakers...

Now you want to have exactly the same order with the same customer and the same products BUT with a different n° of order :

Order n°10002 Customer name : Magento, email : [email protected] ...etc Customer products : computer ASUS , speakers...

So, first question : Is it possible ?

2) If yes, how can i do this ? i just don't know how to begin to do this in fact...

3 Answers 3

1

That's already a built in feature. The button is called "reorder" and you will find it next to each order in the customer account

3
  • A working week for this... that's my first magento project, i feel so stupid right now... but thank you a lot, you save me :)
    – potassium
    Commented Jul 29, 2015 at 9:47
  • But it doesn't copy the status? Commented Jul 30, 2015 at 10:46
  • No, should it? The title states "new order". Otherwise I agree that it sounds like a broken process. Commented Jul 30, 2015 at 11:05
1

Check the code in the backend for editing orders. When you edit an order, magento cancels the old one and creates a new one.

  1. Create quote from order
  2. Create order from quote
3
  • Thank you, it seems to be what i needed but it's very complicated to just "copy" an order in the backoffice... + my customer wants to create an order from an order with "complete" status. I think it's just impossible ?
    – potassium
    Commented Jul 27, 2015 at 12:18
  • Sounds like a broken process. What do you want to achieve? Commented Jul 27, 2015 at 13:04
  • I agree with you. My customer has some strange requests... He wants to create a new order which would be a copy of a "complete" order and then he could update the cart products or change address ... Edit : I change "complete" to "processing" in database for an order and something happened but there were some troubles (the products disappear...)
    – potassium
    Commented Jul 27, 2015 at 13:28
0

I found a very good example which create a quote and convert it to an order. It could help some of you : https://sohelrana09.wordpress.com/2011/09/15/trouble-creating-a-quoteorder-through-custom-code-programmatically-create-order-without-use-api/#comment-451

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.