Problem with shipping charge only items checkout

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
awhc
Ensign (ENS)
Ensign (ENS)
Posts: 18
Joined: Tue Sep 23, 2008 12:31 pm

Problem with shipping charge only items checkout

Post by awhc » Tue Mar 17, 2009 12:43 pm

We are trying to use AC7 internally for a call center app and we enter around 1,500 orders a day. I have just uncovered an issue where we have to enter the credit card info twice before it will charge an order with only shipping charges. As I mentioned, this app is used by our call center and we have 3 types of orders (1. regular sales, 2. no charge warranty-free shipping, and 3. warranty with shipping charges). Regular sales works fine as does no cost orders. The problem is when the product is $0 and we charge shipping. (FYI, sales tax is only charged for regular sales)
We enter credit card details and click the button and the cc validation errors all pop up about entering valid numbers, dates, info, etc. and then clears out the credit card details. We enter the information a 2nd time and it works fine.
(Apparently nobody tested this scenario while testing because I just duplicated the problem on my test box.)
Any ideas on what is going on and how I can fix this? I just went live yesterday and after 15 orders had to shut it down because of this.
I need to get this fixed ASAP. Please help.

Vortx_Ian
Ensign (ENS)
Ensign (ENS)
Posts: 5
Joined: Tue Oct 14, 2008 2:47 pm

Re: Problem with shipping charge only items checkout

Post by Vortx_Ian » Tue Mar 17, 2009 5:21 pm

Without having fully tested every scenario, this fix seems to work for what you are trying to accomplish with your shipping cost only items.

In OnePageCheckout.ascx.cs, find:

Code: Select all

private void RecalculateBasket()
    {
        RecalculateBasket(false);
    }
and change it to

Code: Select all

private void RecalculateBasket()
    {
        RecalculateBasket(true);
    }
This will force a recalculate when the continue button is clicked after entering the shipping address. It will catch that there is a default shipping method selected, which will factor into the total of the order, and thus present you with a payment form to enter your credit card information.

awhc
Ensign (ENS)
Ensign (ENS)
Posts: 18
Joined: Tue Sep 23, 2008 12:31 pm

Re: Problem with shipping charge only items checkout

Post by awhc » Wed Mar 18, 2009 7:51 am

Thanks for the response Vortx_Ian. However, that didn't fix my problem. It's not that I'm not getting the credit card form to appear, the problem is I have to enter the card data twice to get it to work. The first time I enter the info I get the following errors:
-Card type is required.
-You must enter a valid card number.
-Card number is required and should be between 12 and 19 digits (no dashes or spaces).
-You must select the expiration month.
-You must select the expiration year.
-Card security code should be a 3 or 4 digit number.
Then the boxes get blanked out.
I then enter the info a 2nd time and it works fine. I even tried to fool it by clicking the button before entering anything but that gives the error and then I have to enter the info, get the error again, and finally add it back a 3rd time before it will work.
As I mentioned earlier, this only happens when my only charge is for shipping ($0 for product).
Any other ideas?

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

Re: Problem with shipping charge only items checkout

Post by mazhar » Wed Mar 18, 2009 9:51 am

I am not clear. Are you trying to place order from merchant side or using normal checkout? Secondly did you customized something in your app?

awhc
Ensign (ENS)
Ensign (ENS)
Posts: 18
Joined: Tue Sep 23, 2008 12:31 pm

Re: Problem with shipping charge only items checkout

Post by awhc » Wed Mar 18, 2009 10:36 am

I am using the normal checkout. Yes, I have made some customizations to the code. Mostly a comment out here and there or a line added here or there. I don't think I've done anything in the area of checkout though. Most changes were to remove functionality from showing up like 'multiple shipments', 'gift cards', 'email friend'. That sort of thing.

Here are all my changes for the onepagecheckout.aspx.cs file:
// dcox 12-2-2008 billingAddress.Province = (BillToProvince.Visible ? StringHelper.StripHtml(BillToProvince.Text) : BillToProvinceList.SelectedValue);
billingAddress.Province = StringHelper.StripHtml(BillToProvince.Text); // dcox 12-5-2008 enable textbox

// dcox 12-5-2008 if (trEmail.Visible) billingAddress.Email = StringHelper.StripHtml(BillToEmail.Text);
billingAddress.Email = StringHelper.StripHtml(BillToEmail.Text); // dcox 12-5-2008 enable email
if (string.IsNullOrEmpty(BillToEmail.Text.Trim())) billingAddress.Email = "nobody@nowhere.com"; // dcox 12-5-2008

// dcox 031809 RecalculateBasket(false);
RecalculateBasket(true); // dcox 031809

// dcox 12-5-2008 trEmail.Visible = isAnonymous;
trEmail.Visible = true; // dcox 12-5-2008

// dcox 12-22-2008 ShipMultiPanel.Visible = (ShippableItemCount > 1);
ShipMultiPanel.Visible = false; // dcox 12-22-2008
if (ShipMultiPanel.Visible) ShipMultiRegisterMessage.Visible = isAnonymous;
//DO NOT DISPLAY COUPON UNTIL PAYMENT IS SHOWN
// dcox 12-22-2008 CouponDialog1.Visible = trPayment.Visible;
CouponDialog1.Visible = false; // dcox 12-22-2008

// dcox 12-5-2008 SelectCountryAndProvince(BillToCountry, billingAddress.CountryCode, false, BillToProvince, BillToProvinceList, BillToPostalCodeRequired, billingAddress.Province, false);
BillToProvince.Text = Session["_state"] == null ? billingAddress.Province : Session["_state"].ToString(); // dcox 12-17-2008


I haven't been able to find anything with debug other than a few clues. I have noticed (with label messages) that when I select a shipping charge the credit card form becomes visible. However, it isn't really functioning yet. It's as if "the covers are stripped off but it is still asleep". The order amount changes from $0 to reflect the shipping charge (ie $8). I put code in the creditcardpaymentform.ascx file just to give me a message at certain points but nothing happens until I get the first error (mentioned before about cc details missing). Then I enter the data again and this time my added code happens, I get my new message, and the credit card process works. Again, it's like the 2nd time "wakes up" the credit card form and works as designed.

Any ideas?

awhc
Ensign (ENS)
Ensign (ENS)
Posts: 18
Joined: Tue Sep 23, 2008 12:31 pm

Re: Problem with shipping charge only items checkout

Post by awhc » Wed Mar 18, 2009 12:36 pm

I just removed my customized pages (onepagecheckout.ascx & .cs) and put the original untouched files in their place and get the exact same error. With the original pages, it won't even get to the credit card part until I refresh the shipping charges dropdown with a different charge. Then I enter my cc details and get the same error as I already reported.
Is this a bug? Or, am I the only one that has ever tried to do this "non-traditional" way to checkout?

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

Re: Problem with shipping charge only items checkout

Post by jmestep » Wed Mar 18, 2009 3:56 pm

I think you are doing something out of the norm, but I just tested it on an Able build 11659 dev site and I had the same thing happen. Product had no price, on checkout it first came up saying no payment was required, then I changed the shipping method and had to enter the charge card info twice.
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: Problem with shipping charge only items checkout

Post by mazhar » Thu Mar 19, 2009 7:04 am

jmestep wrote:I think you are doing something out of the norm, but I just tested it on an Able build 11659 dev site and I had the same thing happen. Product had no price, on checkout it first came up saying no payment was required, then I changed the shipping method and had to enter the charge card info twice.
If its something you can produce reliably and seems buggy to you, then report it to CRM with complete reproduction steps and your AbleCommerce version information.

awhc
Ensign (ENS)
Ensign (ENS)
Posts: 18
Joined: Tue Sep 23, 2008 12:31 pm

Re: Problem with shipping charge only items checkout

Post by awhc » Thu Mar 19, 2009 9:48 am

I believe that I have found a fix for this. I added the following 1 line of code in the onepagecheckout.ascx.cs file:

Code: Select all

private void BindPaymentMethodForms()
    {
        //CHECK ORDER TOTAL
        RecalculateBasket(); // dcox added 031909 *****
It works for all my order types now with no issues that I have seen. Anyone see a problem with doing this?

Mazhar, I did submit a bug report for this and then I updated it with the new information above.

Post Reply