Skip to content
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
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.

Comments

@erodrig9
Copy link

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.

@ghost
Copy link

ghost 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 this to the Short term milestone Aug 27, 2014
@mattab
Copy link
Member

mattab commented Aug 27, 2014

Thanks for the report!

diosmosis pushed a commit that referenced this issue Oct 20, 2014
diosmosis pushed a commit that referenced this issue Oct 21, 2014
@mattab
Copy link
Member

mattab commented Oct 23, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants