Answer the question
In order to leave comments, you need to log in
How not to trigger the OnOrderUpdate event when an order is deleted?
There is a task, to hang up function on event OnOrderUpdate
and OnBeforeOrderDelete. But when OnBeforeOrderDelete
the call to update the order is also triggered, the function that I do not need is called. How to remove the call OnOrderUpdate
when deleting an order, or what condition to check inside the function whether it was called when deleting?
Answer the question
In order to leave comments, you need to log in
Return false in the OnOrderUpdate event handler functionreturn false;
If before deleting the order the order fields are:
CANCELED = Y
ALLOW_DELIVERY = N
DEDUCTED = N
RESERVED = N
PAYED = N
then OnOrderUpdate will not be called.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question