ronn0ronn0 MemberComments: 1 Received thanks: 0 Member since: March 17

Good day everybody,

I'm quite new to programming for Shopware and did create a plugin, and load it with systems.xml, but when I subscribe to this event nothing happend on creating a new order in the checkout

public static function getSubscribedEvents(): array
{
    return[
        CartEvents::CHECKOUT_ORDER_PLACED => 'onCheckoutOrderPlaced'
    ];
}

/**
 * Test
 */
public function onCheckoutOrderPlaced(CheckoutOrderPlacedEvent $event)
{
    file_put_contents(__DIR__ . '/test.log', 'test');
}

Is there something I am doing wrong? 

 

Kind. Regards 

Answers

  • ronn0ronn0 MemberComments: 1 Received thanks: 0 Member since: March 17

    When I do listen to `Shopware\Core\Checkout\Cart\Event\CheckoutOrderPlacedEvent` is does work

Sign In or Register to comment.