1

I want to check if an order was reordered, in other words if the reorder button was pressed from adminpanel.

I have the collection of orders:

foreach ($collection as $order) {
     // if $order->checkIfItWasReordered(){
     // do smth 
     //} 
}

Is there any function or smth to check if an order was reordered ? Thx

2

There is a relation between order and re-order called relation_parent_id. You can check it by using following code.

if($order->getRelationParentId()){
  // do stuff
};

Thanks.

  • Seems to be it and I didn't check it yet but when order is reordered from backend this column remains intact. So this wouldn't work. – revo Nov 5 '18 at 13:07
0

You need to do customization for that. You could add a flag in order table and could set that value when it a case of reorder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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