A
A
AlexMark2017-04-19 17:31:11
CMS
AlexMark, 2017-04-19 17:31:11

How not to trigger the OnOrderUpdate event when an order is deleted?

There is a task, to hang up function on event OnOrderUpdateand OnBeforeOrderDelete. But when OnBeforeOrderDeletethe call to update the order is also triggered, the function that I do not need is called. How to remove the call OnOrderUpdatewhen 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

2 answer(s)
D
Denis Artamonov, 2017-04-19
@ArtamonovDenis

Return false in the OnOrderUpdate event handler function
return false;

O
Oleg Maksimenko, 2017-04-19
@olegprof

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 question

Ask a Question

731 491 924 answers to any question