Skip to main content

Transmission Events

ConnectorTransferEvent

Fired before the logout event — at the moment the buyer clicks "Transfer".

PropertyValue
Event nameagiqon_connector.connector.transfer
PHP classAgiqonConnector\Connector\Event\ConnectorTransferEvent
ConstantConnectorTransferEvent::EVENT_NAME

Available data

MethodReturn typeDescription
getConnectorSession()ConnectorSessionCurrent session (hookUrl, additionalFields, transmissionId, …)
getCart()CartCart at the time of transfer (read-only)
getSalesChannelContext()SalesChannelContextShopware context of the buyer

Example

use AgiqonConnector\Connector\Event\ConnectorTransferEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(event: ConnectorTransferEvent::EVENT_NAME)]
final class MyTransferListener
{
public function __invoke(ConnectorTransferEvent $event): void
{
$cart = $event->getCart();
$session = $event->getConnectorSession();

// e.g. notify an external API or store custom data
}
}

ConnectorCartLineItemResolveEvent

Fired when reconstructing the cart from the transmission payload. This happens in Auto mode when a Shopware order is created from the stored cartPayload.

PropertyValue
Event nameagiqon_connector.transmission.cart_line_item_resolve
PHP classAgiqonConnector\Connector\Transmission\Event\ConnectorCartLineItemResolveEvent
ConstantConnectorCartLineItemResolveEvent::EVENT_NAME

Available data

MethodReturn typeDescription
getItem()arrayRaw line item array from the deserialised payload
getType()stringLine item type ($item['type']), e.g. 'product'
getSalesChannelContext()SalesChannelContextShopware context for cart reconstruction
setResolvedLineItem(LineItem $item)voidProvide the resolved LineItem object
getResolvedLineItem()LineItem|nullThe resolved LineItem object

Supporting custom line item types

A listener with a higher priority than the default handler can resolve custom types (e.g. from a plugin):

use AgiqonConnector\Connector\Transmission\Event\ConnectorCartLineItemResolveEvent;
use Shopware\Core\Checkout\Cart\LineItem\LineItem;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(event: ConnectorCartLineItemResolveEvent::EVENT_NAME, priority: 100)]
final class MyCustomLineItemResolver
{
public function __invoke(ConnectorCartLineItemResolveEvent $event): void
{
if ($event->getType() !== 'my_custom_type') {
return;
}

$item = $event->getItem();
$lineItem = new LineItem(
$item['id'],
'my_custom_type',
$item['referencedId'] ?? null,
(int) ($item['quantity'] ?? 1)
);

$event->setResolvedLineItem($lineItem);
}
}
note

If no listener resolves the event (no setResolvedLineItem() called), the line item is silently skipped during cart reconstruction.