1. Add the following code at the end of the Transport.js file
/* *
* Fixed Json.prototype information
*/
function Obj2str (o) {
Compatible with jquery
Delete the Ecshop collision object with jquery first
Delete Object.prototype.toJSONString;
var r = [];
if (typeof o = = "string") return "\" "+o.replace (/([\ \ \ \ \ \])/g," \\$1 "). Replace (/(\ n)/g," \\n "). Replace (/(\ r)/g," \\r "). Replace (/(\ t)/g, "\\t") + "\" ";
if (typeof o = = "undefined") return "undefined";
if (typeof o = = "Object") {
if (o===null) return "null";
else if (!o.sort) {
for (var i in O)
R.push ("\" "+i+" \ "" + ":" +obj2str (O[i]))
R= "{" +r.join () + "}"
}else{
for (var i =0;i<>< p=""><>
R.push (Obj2str (O[i]))
R= "[" +r.join () + "]"
}
return R;
}
return o.tostring ();
}
2. At the bottom of the conflicting page, add
3. Find Ajax.call in conflicting pages (' Flow.php?step=add_to_cart ', ' goods= ' + goods.tojsonstring (), Collect_to_flow_response, ' POST ', ' JSON ');
Replaced by: Ajax.call (' Flow.php?step=add_to_cart ', ' goods= ' + obj2str (goods), collect_to_flow_response, ' POST ', ' JSON ');
The above describes the Ecshop jquery conflict resolution method, including the content of the ecshop,jquery, I hope that the PHP tutorial interested in a friend helpful.