We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65a7463 commit 27bd8f3Copy full SHA for 27bd8f3
DataLayer/Tag/Category/Products.php
@@ -2,6 +2,8 @@
2
3
namespace Yireo\GoogleTagManager2\DataLayer\Tag\Category;
4
5
+use Magento\Catalog\Api\Data\ProductInterface;
6
+use Magento\Catalog\Model\Product;
7
use Magento\Framework\Exception\NoSuchEntityException;
8
use Magento\Catalog\Model\Category;
9
use Yireo\GoogleTagManager2\Config\Config;
@@ -53,7 +55,8 @@ public function get(): array
53
55
break;
54
56
}
57
- $product->setCategory($product);
58
+ /** @var Product $product */
59
+ $product->setCategory($category);
60
$productData = $this->productDataMapper->mapByProduct($product);
61
$productData['quantity'] = 1;
62
$productData['index'] = $i;
0 commit comments