小编san*_*dip的帖子

如何访问shopware 6中实体相关事件订阅者中的Shopware\Core\System\SalesChannel\SalesChannelContext?

我在 Shopware 6 的插件中构建了一个自定义订阅者,该订阅者可以订阅

\Shopware\Core\Content\Product\ProductEvents::PRODUCT_WRITTEN_EVENT = 'product.written';

public function onProductWrittenEntity(EntityWrittenEvent $event): void
{
        //$event->getContext() is returning the Shopware\Core\Framework\Context
}
Run Code Online (Sandbox Code Playgroud)

我想获取当前salesChannel具有当前写入的那些productId 的域URL。我怎样才能做到这一点?

shopware

1
推荐指数
1
解决办法
5878
查看次数

标签 统计

shopware ×1