Hit Enter fields in One Page Checkout - sent to Search page

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
derekz
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 38
Joined: Mon Nov 03, 2008 3:13 pm

Hit Enter fields in One Page Checkout - sent to Search page

Post by derekz » Fri Mar 20, 2009 11:10 am

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)

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

Re: Hit Enter fields in One Page Checkout - sent to Search page

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

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.

User avatar
ryanstowasser
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 90
Joined: Tue Oct 30, 2007 4:28 pm
Contact:

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by ryanstowasser » Fri Mar 20, 2009 12:36 pm

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

</asp:PlaceHolder>
</asp:Panel>

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">

Code: Select all

</asp:PlaceHolder>
</asp:Panel>
This way you can set the DefaultButton for a range of content, instead of for each control individually.

blackstonemedia
Ensign (ENS)
Ensign (ENS)
Posts: 11
Joined: Tue Sep 30, 2008 12:52 pm
Contact:

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by blackstonemedia » Fri Mar 20, 2009 5:21 pm

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?

derekz
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 38
Joined: Mon Nov 03, 2008 3:13 pm

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by derekz » Mon Mar 23, 2009 10:07 am

I implemented mazhar's response, and it worked perfectly.

blackstonemedia
Ensign (ENS)
Ensign (ENS)
Posts: 11
Joined: Tue Sep 30, 2008 12:52 pm
Contact:

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by blackstonemedia » Thu Mar 26, 2009 4:43 pm

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.

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

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by jmestep » Mon Jun 29, 2009 10:24 am

I think there might be other posts about this on other pages, but it happens with pretty much all input boxes.
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

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by Robbie@FireFold » Mon Jun 29, 2009 2:43 pm

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.
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by kastnerd » Tue Jun 30, 2009 7:34 am

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?

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

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by mazhar » Tue Jun 30, 2009 7:53 am

This case has been log and you can track progress here
http://bugs.ablecommerce.com/show_bug.cgi?id=8172

User avatar
William_firefold
Commander (CMDR)
Commander (CMDR)
Posts: 186
Joined: Fri Aug 01, 2008 8:38 am

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by William_firefold » Mon Jul 27, 2009 11:37 am

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.

Image

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by jdarby » Mon Nov 09, 2009 7:32 am

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.

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: Hit Enter fields in One Page Checkout - sent to Search page

Post by jdarby » Wed Nov 18, 2009 7:39 am

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?

Post Reply