Strange javascript popup dialogs in checkout

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
ripdog
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Wed Sep 10, 2008 9:39 pm

Strange javascript popup dialogs in checkout

Post by ripdog » Fri Mar 06, 2009 2:25 pm

We just recently got up and running with our store and everytime someone clicks the checkout button to place an order there are two javacsript dialogs that popup.

Both popups simply display the number '2'. You have to click on them in order to complete the checkout process, its very annoying.

What are these and how do I turn them off?

Thanks!
Mike

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Strange javascript popup dialogs in checkout

Post by nickc » Fri Mar 06, 2009 4:01 pm

There have never been javascript popups in the checkout page to my knowledge. If you didn't code them, might be wise to disconnect payment operations in your site while you research. There was at least one site reported compromised by hackers here earlier this week: viewtopic.php?f=42&t=9974

ripdog
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Wed Sep 10, 2008 9:39 pm

Re: Strange javascript popup dialogs in checkout

Post by ripdog » Fri Mar 20, 2009 9:19 am

Upon further examination, it seems to be some javascript code related to the terms and conditions checkbox in the OnePageCheckout Conlib. You can see the alert('2') that I'm talking about:

It seems to me as the alert will get shown everytime validateTC is called. I cannot be the only one with this PROBLEM!!!!!

Here is the code:

//ADD SCRIPTS FOR TERMS AND CONDITIONS
string TCScript = "function toggleTC(c) { document.getElementById(\"" + AcceptTC.ClientID + "\").checked = c; }\r\n" +
"function validateTC(source, args) { alert('2'); if (document.getElementById(\"" + AcceptTC.ClientID + "\")) args.IsValid = document.getElementById(\"" + AcceptTC.ClientID + "\").checked; }";
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "TCScript", TCScript, true);

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Strange javascript popup dialogs in checkout

Post by mazhar » Fri Mar 20, 2009 9:29 am

Well Checkout Terms & Conditions is not an automatic popup. If you have specified Checkout Terms & Conditions in store settings then upon checkout it makes a link available to read Checkout Terms & Conditions.

ripdog
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Wed Sep 10, 2008 9:39 pm

Re: Strange javascript popup dialogs in checkout

Post by ripdog » Fri Mar 20, 2009 9:34 am

That's barely relevant to my question.

The software has a javascript messagebox hardcoded to print the number "2" everytime some accepts terms and conditions. This messagebox has nothing to do with the textual content of the terms and conditions.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Strange javascript popup dialogs in checkout

Post by mazhar » Fri Mar 20, 2009 9:39 am

Perhaps its some debug code. I have checked 7.0.2 code and that doesn't have this alert. You can just remove

Code: Select all

alert('2');
from the function.

ripdog
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Wed Sep 10, 2008 9:39 pm

Re: Strange javascript popup dialogs in checkout

Post by ripdog » Fri Mar 20, 2009 9:42 am

Yes, I'll remove it.

Also, I did remove the terms and conditions and now the checkbox is gone. Logically the alert message does not pop up now when clicking the place order button, because there's no terms to validate. However, this alert will *always* popup for anyone that has terms and conditions text. I think I'm on 7.0.1 or something, so there is a bug in that version...

Thank you for the help.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Strange javascript popup dialogs in checkout

Post by jmestep » Fri Mar 20, 2009 11:19 am

I checked the javascript on three builds that I have and none of them have that alert('2'); in them.
I'm not sure if I've got build 7.0.1, though.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Strange javascript popup dialogs in checkout

Post by mazhar » Fri Mar 20, 2009 11:39 am

I haven't seen any thing in 7.1 as well. Most probably it will be some customization or debug code written by customer.

Post Reply