diff --git a/src/TagManager/ProductDetailImpression.php b/src/TagManager/ProductDetailImpression.php index fe67e2e..ccf06da 100644 --- a/src/TagManager/ProductDetailImpression.php +++ b/src/TagManager/ProductDetailImpression.php @@ -77,7 +77,7 @@ private function addProductVariant(ProductVariantInterface $productVariant): voi 'name' => $product->getName(), 'id' => $product->getId(), 'price' => $this->getPrice($productVariant), - 'category' => $item->getProduct()->getMainTaxon() ? $item->getProduct()->getMainTaxon()->getName() : '', + 'category' => $product->getMainTaxon() ? $product->getMainTaxon()->getName() : '', 'variant' => $productVariant->getCode(), ]; }