From 6d558a0bf0351bda1854302fa221b4a7a5ffae42 Mon Sep 17 00:00:00 2001 From: Stefan Doorn Date: Fri, 16 Jun 2023 16:08:48 +0100 Subject: [PATCH] Fix view_item output --- src/TagManager/ViewItem.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/TagManager/ViewItem.php b/src/TagManager/ViewItem.php index 853a43a..331316d 100644 --- a/src/TagManager/ViewItem.php +++ b/src/TagManager/ViewItem.php @@ -64,11 +64,13 @@ private function addViewItemData(ProductInterface $product): void $data = [ 'items' => [ - 'item_id' => $this->productIdentifierHelper->getProductIdentifier($product), - 'item_name' => $product->getName(), - 'affiliation' => $this->channelContext->getChannel()->getName(), - 'item_category' => null !== $mainTaxon ? $mainTaxon->getName() : '', - 'index' => 0, + [ + 'item_id' => $this->productIdentifierHelper->getProductIdentifier($product), + 'item_name' => $product->getName(), + 'affiliation' => $this->channelContext->getChannel()->getName(), + 'item_category' => null !== $mainTaxon ? $mainTaxon->getName() : '', + 'index' => 0, + ], ], ];