Help! Needed with Checkout

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
RickSilver
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Mon Jun 22, 2009 5:49 pm

Help! Needed with Checkout

Post by RickSilver » Fri Apr 05, 2019 4:39 am

I randomly get the error at Checkout that happens when it thinks the basket has changed

//Make sure basket hasn't changed during checkout
if (_CurrentBasketHash != _SavedBasketHash)....

It's totally random and I have been unable to solve this for a while. I have some custom code in OPC.aspx.cs but do not see how it is affecting it, especially at random.

Any advice on how I can track this down? Things to look for that can cause this? Customers are getting angry.

Thanks!

Rick

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Help! Needed with Checkout

Post by Shopping Cart Admin » Fri Apr 12, 2019 7:12 am

Hi Rick,

What is the error? Since this hasn't been something I can't remember being reported, your custom code is certainly a concern.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

RickSilver
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Mon Jun 22, 2009 5:49 pm

Re: Help! Needed with Checkout

Post by RickSilver » Sun Apr 14, 2019 2:57 am

It is hitting this piece of code in OPC.aspx.cs..

//Make sure basket hasn't changed during checkout
if (_CurrentBasketHash != _SavedBasketHash)
{
e.Cancel = true;
CheckoutMessagePanel.Visible = true;
CheckoutMessage.Text = "Your order has not been completed and payment was not processed.<br /><br />Your cart appears to have been modified during checkout. Please verify the contents of your order and resubmit your payment.";
RecalculateBasket(true);

return;
}

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Help! Needed with Checkout

Post by Katie » Wed Apr 17, 2019 9:01 pm

Hello Rick,

Can you briefly explain the customization? Also, which version and build are you using?

When I searched on the error message, it does appear this has come up before but I can only find very old forum posts dating back to early versions of 7.

If the contents of the basket are being changed, this might explain the message.

Thanks,
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

RickSilver
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Mon Jun 22, 2009 5:49 pm

Re: Help! Needed with Checkout

Post by RickSilver » Thu Apr 18, 2019 10:32 am

We are on GOLD. Not sure of version. If not latest, close to it. The custom code reads from some custom SQL tables to fill in custom dropdowns. When the item in the dropdown 1 changes, Ajax is used to fill in the dropdown 2. Together, they determine the default shipping option in dropdown ShipMethodsList. There are some hidden HTML fields that help. Lastly, the PurchaseOrderNumber field is affected by the choices of the custom dropdowns when creating the order. Nothing that I added touches the basket. Reminder, this is random, guessing 25% of the time it fails. Reselecting items in the dropdown and placing order the second time always seems to work.

Thanks for your help!

Rick

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Help! Needed with Checkout

Post by jguengerich » Thu Apr 18, 2019 11:44 pm

The basket hash (as called from the OPC page) includes billing address; shipping addresses, shipment id, and shipping method for each shipment; the details of each product order item (excluding user inputs for that item); and coupons. It looks like the OPC page does recalculate the hash when various things are done, and the Page_PreRender method saves it to the view state (via SaveCustomViewState()) so Page_Load can load it into _SavedBasketHash (via LoadCustomViewState()). Maybe depending on the order order things (including your customizations) are clicked on, the proper sequence of calc hash > set current hash > save to saved hash / view state > load saved hash from view state isn't happening.
Jay

RickSilver
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Mon Jun 22, 2009 5:49 pm

Re: Help! Needed with Checkout

Post by RickSilver » Fri Apr 19, 2019 4:20 am

That's very possible. I did not realize all of that information was in the hash. We'll check it out.

Thanks
Rick

Post Reply