Files
kupshop/bundles/KupShop/GTMBundle/ServerSideGTMEvent/CartRemoveItemEvent.php
2025-08-02 16:30:27 +02:00

26 lines
517 B
PHP

<?php
declare(strict_types=1);
namespace KupShop\GTMBundle\ServerSideGTMEvent;
use KupShop\OrderingBundle\Event\CartItemEvent;
use Symfony\Contracts\EventDispatcher\Event;
class CartRemoveItemEvent extends CartAddItemEvent
{
public function getPayload(Event|CartItemEvent $event): array
{
if (!$event->getProduct()) {
return [];
}
return parent::getPayload($event);
}
protected function getEventName(): string
{
return 'remove_from_cart';
}
}