I'm looking for replacements for the events onBeforeAddToCart and onBeforeGatewayRequestSend.

I used onBeforeAddToCart to prevent the user from adding an article from different article groups to the cart.

onBeforeGatewayRequestSend is used to check a mandatory field and to increment our own order/invoice numbers (the md5-style numbers are not convenient for German business).

I need to set $event->performAction = false and $transaction->message = "Please agree with our terms and conditions" if the mandatory field is not checked, like I did in Commerce 1.

  • I need to do the same - did you get an answer ? – celeste.nexus Jul 1 '19 at 4:56

Your Answer

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

Browse other questions tagged or ask your own question.