ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - JS snippet causes issue in One Page Checkout
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

JS snippet causes issue in One Page Checkout

 Post Reply Post Reply
Author
Message
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Topic: JS snippet causes issue in One Page Checkout
    Posted: 10-April-2010 at 12:42am
I'm leaving this for the record in hopes that if, more like when, someone else runs into this, they'll be able to find this post.

I just wasted most of my day today trying to debug an issue with One Page Checkout no longer letting customers using IE 7 or IE 8 get past billing information in the OPC process. Couldn't get an error message of any sort to give us a clue.

Now, we had made several customizations to it, so that was suspect. Spent a good deal of time first trying to confirm under what conditions the process would fail, and determined it was IE 7 or 8 on either PC or Mac. Then spent a good deal of time code comparing "out of the box" PC 4.03ba with this site and moved all of our customizations out one by one. Still had the problem. Finally moved on to header and footer files, and finally found that a JavaScript snippet added for the client to enable them to track customers from their live support interface was the culprit.

The live support service is called Citricle LiveSupport, the snippet is their "Listener Code". This JS clashed with the AJAX in the OPC such that the billing info could not be saved and the customer was stuck at this point in the process.

Thing is, it's not uncommon for many various JS modules to use certain common names for things and therefore conflict with each other.

We ended up conditionally including in footer.asp the "listener code" only on pages other then onepagecheckout.asp.

There's a good chance that this sort of thing will come up for someone else using other 3rd party JavaScript on their site. So, my advice would be to first suspect any 3rd party JS you've added recently and one by one eliminate them from the equation and test again after removing each one.

Ain't IT fun?



Edited by earlyimp - 10-April-2010 at 1:06am
Back to Top
Matt View Drop Down
Moderator Group
Moderator Group


Joined: 20-July-2006
Location: United States
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post Posted: 10-April-2010 at 1:15am
Hi Sean, thank you for sharing.  Sorry to hear about that. I have been there myself at one time or another.

One Page Checkout uses jQuery for AJAX (as you already know).  What I wanted to mention is that jQuery has a "no-conflict" mode.  If you run into a conflict that you cannot work around, then jQuery no-conflict mode may help.  That is, it allows you to change the "$" shortcut, which was likely the conflict.
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 10-April-2010 at 1:32am
Hi Matt,

Thanks for renaming the thread. I wasn't quite sure what to name it so that folks could find this in the future.

I'll be sure to use the "no-conflict" mode in JQuery if I run into a bind like this again, but I'm sure most PC users and designers would have no idea how to do that, so this might be an easier way for them to try to debug such an issue.

Indeed, the "$" has been a butt biter on more than one occasion ;-)

Thing is with these 3rd party JS calls, it's not so easy to see what JS they have on their end.

I should also share how to conditionally include such stuff except for on the OPC:

<%
If InStr(Request.ServerVariables("SCRIPT_NAME"),"onepagecheckout.asp") < 1 Then
%>
<!-- My 3rd Party JavaScript Snippet Goes Here -->
<%
End If
%>
Back to Top
RobertZ View Drop Down
Groupie
Groupie


Joined: 21-January-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote RobertZ Quote  Post ReplyReply Direct Link To This Post Posted: 12-April-2010 at 1:18am
Personally, the Internet Police should issue a law stating no person should be allowed to use IE, under any version or circumstance.

This should free up about 2000 hours on each webdevelopment.

On our site we have 1 header/footer for everything except IE, where we have 1 for V6, one for V7 and 1 for V8. I'm just waiting for IE9 to come out that handles everything different to V8 and every other browser in the world.



Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.059 seconds.