For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customization

Extend proxy responses for custom storefront requirements.

Customization

Enrich data from FactFinder

Use EnrichProxyDataEvent to add data to responses received through the proxy controller.

use Omikron\FactFinder\Oxid\Event\EnrichProxyDataEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class EnrichProxyDataEventSubscriber implements EventSubscriberInterface
{
    public static function getSubscribedEvents(): array
    {
        return [EnrichProxyDataEvent::class => 'enrichData'];
    }

    public function enrichData(EnrichProxyDataEvent $event): void
    {
        $data = $event->getData();
        $data['example_data'] = [
            'some_data' => 'data_1',
            'next_data' => 'data_2',
        ];
        $event->setData($data);
    }
}

Enable the proxy and its rewrite rules before adding response enrichments. See Backend configuration.

Last updated

Was this helpful?