logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Tuesday, September 6, 2022 1:57:29 PM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
This is a weird one-
On the shipping method page, I select Free shipping. Then when I go to the payment page, it says Free One Day Shipping which is a different method. Database has the Free Shipping method in it OK. If I refresh the page, it says Free shipping OK. If I don't refresh the page and check out, the method Free Shipping is applied. I had to move the Free Shipping method up to the top of the list in the admin to get around this, but the merchant doesn't really want it that way, they want the Free One Day Shipping to be the first option the customer sees.
Any ideas?

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

judy at Web2Market  
#2 Posted : Wednesday, September 7, 2022 6:40:50 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I figured this out. I went back to my 9.0.4 website for this client and if the first shipping method radio button was selected, the method didn't show in the basket items on the payment page. So I compared files and AC had added a method in the Checkout Controller to assign the first shipping method.
// AS WE ARE DISPLAYING THE SHIPMETHODS AS RADIO BUTTONS SO ALWAYS ASSIGN FIRST SHIPMETHOD TO A SHIPMENT
if (rateQuotes.Count > 0)
{
shipment.ShipMethod = rateQuotes.First().ShipMethod;
IBasketService preCheckoutService = AbleContext.Resolve<IBasketService>();
AbleContext.Resolve<IBasketShipmentRepository>().Save(shipment);
preCheckoutService.Recalculate(AbleContext.Current.User.Basket);
}

This didn't work on the site because the shipping methods had been filtered out it code. So I moved the above code below where the shipping methods are filtered and the issue is solved.
Katie S  
#3 Posted : Wednesday, September 7, 2022 12:07:34 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Thanks for the update Judy. I was going to start testing this today, but I'm glad you found the issue.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.