yireo-magento1 / Yireo_GoogleTagManager

Implement Google Tag Manager in Magento 1 (deprecated)
Open Software License 3.0
56 stars 46 forks source link

What does transactionProducts ID stands for? #69

Closed gety9 closed 7 years ago

gety9 commented 7 years ago

In our magento store we use bundle products. (all orders are placed though bundles)

In transactionProducts array sku and name are shown correctly. However ID is always increasing. So it's not product ID that one might logically expect.

Just placed 4 orders for same product with same quantity and got transactionProducts ID as 58, 60, 62, 64.

jissereitsma commented 7 years ago

In the quote output, the ID refers to $product->getId(). In the order output, the ID referred to the $item->getId() so the order item, I trust you noticed this as well. The following fix adds the product ID instead, which makes more sense. https://github.com/yireo/Yireo_GoogleTagManager/commit/17e8df16f7de337b48528bcb8239a4c6a6355e5c