New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecommerce orders with double quotes in product name or category name are not tracked #6068

Closed
erodrig9 opened this Issue Aug 25, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@erodrig9

erodrig9 commented Aug 25, 2014

ecommerce orders, with a product containing a double quote character, are not being tracked. We are using the REST API for order tracking.

When the request is submitted the 1x1 pixel image is returned, but the order is never displayed in the dashboard.

@bla-kw

This comment has been minimized.

bla-kw commented Aug 26, 2014

The problem exists also with the JavaScript tracking. The error message on the server side is: "Error while json_decode the Ecommerce items = NULL". It is caused by an invalid JSON format for ec_items. In my case it was because of the escaped double-quote which was needed to insert it into the double-quoted addEcommerceItem values.
I got it working through changing the format I escape double-quotes in names as following:

old: _paq.push(['addEcommerceItem',"1111test","Käse 'test","old "Käse"",10,1]);
new: _paq.push(['addEcommerceItem','1111test','Käse 'test','old "Käse"',10,1]);

What you see in old is the output I get from the shop with htmlspecialchars. I had to use htmlspecialchars_decode() to revert the escaped double-quote and in new you see how I submit the data so that it is working.

@mattab mattab added Bug labels Aug 27, 2014

@mattab mattab added this to the Short term milestone Aug 27, 2014

@mattab

This comment has been minimized.

Member

mattab commented Aug 27, 2014

Thanks for the report!

diosmosis added a commit that referenced this issue Oct 20, 2014

diosmosis added a commit that referenced this issue Oct 21, 2014

@diosmosis diosmosis closed this in d15b987 Oct 23, 2014

@mattab

This comment has been minimized.

Member

mattab commented Oct 23, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment