Page 1 of 1
Hit Enter fields in One Page Checkout - sent to Search page
Posted: Fri Mar 20, 2009 11:10 am
by derekz
Is there a bug in the latest version of AbleCommerce (7.0.2) where if you hit the enter key while filling out information on the One Page Checkout, it sends you to the search results page?
Try it in the billing section...Company field (won't perform validation)
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Fri Mar 20, 2009 11:33 am
by mazhar
Yes it is buggy behavior, it should try to continue. I am going to report this. Here is the quick fix for you. Edit your ConLib/OnePageCheckout.ascx.cs file and add following function to it
Code: Select all
protected void SetDefaultButton(string clientId)
{
//Enter on Billing address
PageHelper.SetDefaultButton(BillToFirstName, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToLastName, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToCompany, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToAddress1, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToAddress2, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToCity, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToProvince, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToPostalCode, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToCountry, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToAddressType, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToPhone, ContinueButton.ClientID);
//Enter on shipping address
PageHelper.SetDefaultButton(ShipToFirstName, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToLastName, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToCompany, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToAddress1, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToAddress2, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToCity, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToProvince, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToPostalCode, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToCountry, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToAddressType, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToPhone, ContinueButton.ClientID);
}
Now locate following code in Page_Load function
Code: Select all
if (!IsPostBack)
{
BotMessagePanel.Visible = false;
}
and make it look like
Code: Select all
if (!IsPostBack)
{
BotMessagePanel.Visible = false;
SetDefaultButton(ContinueButton.ClientID);
}
that will fix the default button problem.
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Fri Mar 20, 2009 12:36 pm
by ryanstowasser
You can do the same thing by adding asp:Panel objects to the ascx file and setting the DefaultButton. I added the WrapBillingPanel and the WrapShippingPanel objects to my OnePageCheckout.ascx. The <h2> and <asp:Placeholder> tags are there to show where in the file I put these.
Code: Select all
<h2 class="sectionHeader">Billing Address</h2>
<asp:Panel ID="WrapBillingPanel" runat="server" EnableViewState="False" DefaultButton="ContinueButton">
<asp:PlaceHolder ID="EnterBillingPanel" runat="server" EnableViewState="False">
Code: Select all
<h2 class="sectionHeader">Shipping Address</h2>
<asp:Panel ID="WrapShippingPanel" runat="server" EnableViewState="False" DefaultButton="ContinueButton">
<asp:PlaceHolder ID="EnterShippingPanel" runat="server" EnableViewState="false">
This way you can set the DefaultButton for a range of content, instead of for each control individually.
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Fri Mar 20, 2009 5:21 pm
by blackstonemedia
mazhar wrote:Yes it is buggy behavior, it should try to continue. I am going to report this. Here is the quick fix for you. Edit your ConLib/OnePageCheckout.ascx.cs file and add following function to it
Code: Select all
protected void SetDefaultButton(string clientId)
{
//Enter on Billing address
PageHelper.SetDefaultButton(BillToFirstName, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToLastName, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToCompany, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToAddress1, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToAddress2, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToCity, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToProvince, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToPostalCode, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToCountry, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToAddressType, ContinueButton.ClientID);
PageHelper.SetDefaultButton(BillToPhone, ContinueButton.ClientID);
//Enter on shipping address
PageHelper.SetDefaultButton(ShipToFirstName, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToLastName, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToCompany, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToAddress1, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToAddress2, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToCity, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToProvince, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToPostalCode, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToCountry, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToAddressType, ContinueButton.ClientID);
PageHelper.SetDefaultButton(ShipToPhone, ContinueButton.ClientID);
}
Now locate following code in Page_Load function
Code: Select all
if (!IsPostBack)
{
BotMessagePanel.Visible = false;
}
and make it look like
Code: Select all
if (!IsPostBack)
{
BotMessagePanel.Visible = false;
SetDefaultButton(ContinueButton.ClientID);
}
that will fix the default button problem.
This did not work for me. I'm running 7.0.0, latest build.
Any other solutions?
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Mon Mar 23, 2009 10:07 am
by derekz
I implemented mazhar's response, and it worked perfectly.
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Thu Mar 26, 2009 4:43 pm
by blackstonemedia
derekz wrote:I implemented mazhar's response, and it worked perfectly.
Even on the Company field? First name and last name work as they should but Company still pushes you to the Search page.
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Mon Jun 29, 2009 10:24 am
by jmestep
I think there might be other posts about this on other pages, but it happens with pretty much all input boxes.
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Mon Jun 29, 2009 2:43 pm
by Robbie@FireFold
This was a big issue for us with our high volume. We had to adjust pretty much every input field. Every so often we get a complaint about one we missed.
Something that should be looked at for future upgrades.
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Tue Jun 30, 2009 7:34 am
by kastnerd
I agree this should be patched. We should post any pages we fine the problem in.
Is there a stock install of 7.0.3 for us to test on?
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Tue Jun 30, 2009 7:53 am
by mazhar
This case has been log and you can track progress here
http://bugs.ablecommerce.com/show_bug.cgi?id=8172
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Mon Jul 27, 2009 11:37 am
by William_firefold
We are setting up 7.0.3 and this is still not fixed.
This problem seems a little bit different than the other enter key bugs on the site.
How can I fix the payment options so that they are the default action for the enter key? Our search box seems to be taking control.

Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Mon Nov 09, 2009 7:32 am
by jdarby
This happens on more than just the One Page Checkout. For instance, if a user is on a product page that has a Quantity box and they leave the cursor in the box and hit the enter key, it brings them to a search results page instead of adding the product to the basket.
Re: Hit Enter fields in One Page Checkout - sent to Search page
Posted: Wed Nov 18, 2009 7:39 am
by jdarby
This was supposedly resolved and patched in 7.0.3, but we just upgraded and I don't see any difference. Can anyone else on 7.0.3 confirm?