You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.
When using Tweakwise with Magento Enterprise and Google Tag Manager, the extension load the products for the static impressions of the cross sells. In the check in Emico_Tweakwise_Block_Checkout_Cart_Crosssell::getItems() there's a check if ajax is enabled for the recommendations and if the current call is an ajax call. If not, it will return $this, which is a completely different type of response then the expected product collection. It would be better to return parent::getItems() in stead.
Enable the recommendations for the cart page (cross sells)
Make sure you enabled Google Tag Manager
Add any product to your cart that has linked recommendations in Magento
Go to the cart page and check the result
Actual result
The page header response is 500
An entry is added to the server's log file with the following error: Uncaught Error: Call to a member function getSku() on integer in app/design/frontend/base/default/template/googleanalyticsuniversal/impression.phtml on line 46
Expected result
The page returns a header response of 200
No error is thrown
The cross sells are shown as expected
It's possible to use Tweakwise recommendations on Magento 1 Commerce together with Google Universal Analytics and Google Tag Manager
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue Brief
When using Tweakwise with Magento Enterprise and Google Tag Manager, the extension load the products for the static impressions of the cross sells. In the check in
Emico_Tweakwise_Block_Checkout_Cart_Crosssell::getItems()
there's a check if ajax is enabled for the recommendations and if the current call is an ajax call. If not, it will return$this
, which is a completely different type of response then the expected product collection. It would be better to returnparent::getItems()
in stead.The line that causes the error can be found here: https://github.com/EmicoEcommerce/Magento1Tweakwise/blob/master/app/code/community/Emico/Tweakwise/Block/Checkout/Cart/Crosssell.php#L28
Environment
Steps to reproduce
Actual result
Uncaught Error: Call to a member function getSku() on integer in app/design/frontend/base/default/template/googleanalyticsuniversal/impression.phtml on line 46
Expected result
The text was updated successfully, but these errors were encountered: