ShippingMethod.GetAll Bug Fix / Improvement

Posted By jcosmo Fri 27 Nov 2015
Add to Favorites0
Author Message
jcosmo
 Posted Fri 27 Nov 2015
Supreme Being

Supreme Being - (9,059 reputation)Supreme Being - (9,059 reputation)Supreme Being - (9,059 reputation)Supreme Being - (9,059 reputation)Supreme Being - (9,059 reputation)Supreme Being - (9,059 reputation)Supreme Being - (9,059 reputation)Supreme Being - (9,059 reputation)Supreme Being - (9,059 reputation)

Group: Forum Members
Last Active: Tue 16 Feb 2016
Posts: 19, Visits: 117
I believe there is a bug in the KartrisClasses.ShippingMethod.GetAll method...

Currently if you have ShippingGateways configured, and a Gateway either errors out or returns no ShippingOption, the GetAll method still returns a ShippingOption with the Gateway name and a Price of $0. This is a potential bug, because if a Gateway fails or returns no options, a customer can exploit this to get free Shipping when that isn't configured in the store.

The problem occurs because of how blnShippingGatewayUsed is set (on line 557 of KartrisClasses.vb). It only gets set if the call is successful and options are returned. On first glance that seems right, but if this isn't set, then Kartris later adds a manual shipping option for the Gateway on line 566.

I believe the fix is to move the setting of blnShippingGatewayUsed from line 557 to line 539.

This way as soon as we detect that the ShippingMethod is a ShippingGateway, we set blnShippingGatewayUsed to true. If the Gateway is off, or if the call to the Gateway fails, or if the Gateway doesn't return any ShippingOptions, then the ShippingMethodDropdownlist is kept clean and free of any errant Shipping Methods.
Paul Marked As Answer
 Posted Fri 1 Jan 2016
große Käse

große Käse - (449,996 reputation)große Käse - (449,996 reputation)große Käse - (449,996 reputation)große Käse - (449,996 reputation)große Käse - (449,996 reputation)große Käse - (449,996 reputation)große Käse - (449,996 reputation)große Käse - (449,996 reputation)große Käse - (449,996 reputation)

Group: Administrators
Last Active: Fri 15 Sep 2023
Posts: 806, Visits: 2,737
Thanks, have added to the latest code, will be in the v2.9002 release.

--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top