Remove from Cart not working anymore
-
Hi,
May I ask for your help? I upgraded tot 1.3 and after that to 1.31. The event Remove from cart isn’t working anymore.
I have read this link you activated after upgrading: https://duracelltomi.com/google-tag-manager-for-wordpress/how-to-articles/upgrading-woocommerce-settings-for-v1-3
However, changing
add to cart clicks: gtm4wp.addProductToCart => gtm4wp.addProductToCartEEC and
remove from cart clicks: gtm4wp.removeFromCart => gtm4wp.removeFromCartECCdoes not trigger any event. Not add to cart, nor remove from cart.
After adding the EEC, the add to cart was triggered again, but the remove from cart isn’t. Could you please point me to a tutorial video if it exists or can you help me in another way?
-
Most importantly, updating cart works 😉 many thanks for your help.
I will contact themee developersHi Thomas,
Thanks. I was testing and this is what happens.
When on the cart page, it works. But only 1 time. If I remove one item from the cart it fires. If I remove another, it doesn’t fire.
But if I go to another page in between the remove from cart’s, it fires again. So cart page, remove from cart, homepage, cart page, remove from cart works and it fires two times correctly.
But cart page, remove from cart, remove another from cart, remove another from cart, only fires once.
I will test remove from cart from via the minicart and sidebar next…
This looks like a behavior I already fixed. I have a demo page here:
http://woo.duracelltomi.hu/You can do anything here you want with the products.
Would you be so kind and just one more time update this file on your hosting?Hi,
Thanks for your support. I am sorry to take up so much of your time.
There is no change when on the cart page.
– Cart page, remove item 1, remove item 2, remove item 3 = 1 event fire– Cart pages, remove item 1, home page, cart page, remove item 2, home page, cart page, remove item 3 = 3 event fires
After I updated your tot your latest php, the remove event was fired only once, for both the sidebar remove action and the minicart remove action. After that, I was not able to replicte the fireing of the event. Here it also does not matter if I go to another page first and try again. No event fire…
Ok, thanks, I am currently not at my desk, I will need some more time and your patience to figure out the reason.
Sure, no problem! I am so happy you are willing to search for the solution! Thanks again!
Hi, maybe it will help you.
PHP Error log:
PHP Warning: Illegal string offset 'id' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 697, referer https://vejare.sk/kategoria/masky/ vejare.sk [Wed Jun 22 01:05:28.858747 2016] [-:error] [pid 21311] [client 188.167.224.145:35367] PHP Warning: Illegal string offset 'name' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 698, referer https://vejare.sk/kategoria/masky/ vejare.sk [Wed Jun 22 01:05:28.858762 2016] [-:error] [pid 21311] [client 188.167.224.145:35367] PHP Warning: Illegal string offset 'price' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 699, referer https://vejare.sk/kategoria/masky/ vejare.sk [Wed Jun 22 01:05:28.858776 2016] [-:error] [pid 21311] [client 188.167.224.145:35367] PHP Warning: Illegal string offset 'category' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 700, referer https://vejare.sk/kategoria/masky/ vejare.sk [Wed Jun 22 01:05:28.858788 2016] [-:error] [pid 21311] [client 188.167.224.145:35367] PHP Warning: Illegal string offset 'productlink' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 701, referer https://vejare.sk/kategoria/masky/
also in cart
PHP Warning: Illegal string offset 'id' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 691, referer https://vejare.sk/cart/ vejare.sk [Wed Jun 22 15:04:22.906216 2016] [-:error] [pid 30787] [client 92.52.2.98:14309] PHP Warning: Illegal string offset 'name' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 692, referer https://vejare.sk/cart/ vejare.sk [Wed Jun 22 15:04:22.906242 2016] [-:error] [pid 30787] [client 92.52.2.98:14309] PHP Warning: Illegal string offset 'price' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 693, referer https://vejare.sk/cart/ vejare.sk [Wed Jun 22 15:04:22.906264 2016] [-:error] [pid 30787] [client 92.52.2.98:14309] PHP Warning: Illegal string offset 'category' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 694, referer https://vejare.sk/cart/ vejare.sk [Wed Jun 22 15:04:22.906286 2016] [-:error] [pid 30787] [client 92.52.2.98:14309] PHP Warning: Illegal string offset 'productlink' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 695, referer https://vejare.sk/cart/ vejare.sk [Wed Jun 22 15:04:22.959324 2016] [-:error] [pid 30787] [client 92.52.2.98:14309]
I have 2600 lines of this 😀
Whooah 🙂
That is big… I have a quick fix for that errors here:
https://plugins.svn.wordpress.org/duracelltomi-google-tag-manager/trunk/integration/woocommerce.phpAs for the other open discussion: I have to postpone debugging ’til tomorrow morning, today our country was playing in France and that used all of my energy to support them 🙂
Thomas
Hi Thomas,
there are still some warnings.vejare.sk [Wed Jun 22 22:02:35.557213 2016] [-:error] [pid 6226] [client 188.167.147.114:54534] PHP Warning: Illegal string offset 'id' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 695, referer https://vejare.sk/checkout/ vejare.sk [Wed Jun 22 22:02:35.557260 2016] [-:error] [pid 6226] [client 188.167.147.114:54534] PHP Warning: Illegal string offset 'name' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 696, referer https://vejare.sk/checkout/ vejare.sk [Wed Jun 22 22:02:35.557275 2016] [-:error] [pid 6226] [client 188.167.147.114:54534] PHP Warning: Illegal string offset 'price' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 697, referer https://vejare.sk/checkout/ vejare.sk [Wed Jun 22 22:02:35.557288 2016] [-:error] [pid 6226] [client 188.167.147.114:54534] PHP Warning: Illegal string offset 'category' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 698, referer https://vejare.sk/checkout/ vejare.sk [Wed Jun 22 22:02:35.557300 2016] [-:error] [pid 6226] [client 188.167.147.114:54534] PHP Warning: Illegal string offset 'productlink' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 699, referer https://vejare.sk/checkout/ vejare.sk [Wed Jun 22 22:06:02.177563 2016] [-:error] [pid 17643] [client 188.167.147.114:24399] PHP Warning: Illegal string offset 'id' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 695, referer https://vejare.sk/shop/kaligraficky-set/ vejare.sk [Wed Jun 22 22:06:02.177611 2016] [-:error] [pid 17643] [client 188.167.147.114:24399] PHP Warning: Illegal string offset 'name' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 696, referer https://vejare.sk/shop/kaligraficky-set/ vejare.sk [Wed Jun 22 22:06:02.177626 2016] [-:error] [pid 17643] [client 188.167.147.114:24399] PHP Warning: Illegal string offset 'price' in /nfsmnt/hosting2_2/f/6/f6d9e0c2-a02b-4c31-8fcd-ff172d5124ef/vejare.sk/web/wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php on line 697, referer https://vejare.sk/shop/kaligraficky-set/
@xkatka: interesting, those lines should not run on the logged pages :-\ anyway, I added so more checks to ensure those messages go away
@johson: thanks for the detailed instructions, I was able to reproduce this on my sandbox site. I was also able to fix this.
First please check my sandbox page at woo.duracelltomi.hu and try to do the steps you described. If you see that it works not too, you can apply the fix by downloading this latest file:
This fix will be part of the next quickfix version released in the comming days.
Thomas
Hi Thomas,
OMG, you fixed it all!! Everything is working as it should now. Both on the cart page, in the minicart and from the sidebar. GREAT!
Thank you sooo much!
I could only test it on my own site, because I can test it with the realtime function in Google Analytics and with the preview function in Google tag manager.
I would like to check your sandbox page, but how can I check what events are fireing on your page?
Thanks for this fix and I hope you will tell me how to check your page. Then I can let you know if I see the same behavior..
Ella
Hi Ella,
Your support to identify those bugs helps tons of other WooCommerce users so I thank You for this! 🙂
Are you familiar with Google Tag Assistant Chrome extension? You can use it to see how events are being fired for Google Analytics.
Thomas
Thanks,
how stupid of me! I have the extension installed. I just use realtime in GA in unfiltered view, or preview in GTM, because for what ever reason, I like it more…
But since I had it, I was able to check your site. I have checked remove from minicart, sidebar and cart page. All are fireing.
Thanks again for all your help!
- The topic ‘Remove from Cart not working anymore’ is closed to new replies.