• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

canaraca
#1 Posted : Friday, December 9, 2011 4:22:37 PM(UTC)
canaraca

Rank: Member

Joined: 4/16/2010(UTC)
Posts: 33

Hey folks,

When a customer adds more than one item that is set to "Ship Separately", the site throws the below error on checkout. The version is 5.7.5 and the code was never modified. The earlier versions don't seem to have that problem. Did anyone experience it before?

<h2> Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
</h2>

[color="#ffffcc"]
[tr ] [td ] <code>
Line 29: ' Shipping Methods
Line 30: Dim Rates As Utilities.SortableCollection(Of Shipping.ShippingRate)
Line 31: Rates = o.FindAvailableShippingRates()
[/color]Line 32: SessionManager.LastShippingRates = Rates
Line 33: Me.ShippingRatesList.DataTextField = "RateAndNameForDisplay"</pre></code>

[/td] [/tr] </table>




Source File: G:\WEBS\Wicked-US-DEV\WWW\BVModules\Controls\Shipping.ascx.vb Line: 31




Stack Trace:



[table bgcolor="#ffffcc" width="100%"] [tr ] [td ] <code>
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +64
System.ThrowHelper.ThrowArgumentOutOfRangeException() +15
System.Collections.Generic.List`1.get_Item(Int32 index) +7499404
BVSoftware.Bvc5.Core.Shipping.DefaultDimensionCalculator.GenerateDimensions(ShippingGroup group) in C:\workspaces\cupertino\BVCommerce\Main\App\source\BVSoftware.Bvc5.Core\Shipping\DefaultDimensionCalculator.vb:6
BVSoftware.Bvc5.Core.Shipping.ShippingGroup.GenerateDimensions() in C:\workspaces\cupertino\BVCommerce\Main\App\source\BVSoftware.Bvc5.Core\Shipping\ShippingGroup.vb:118
BVSoftware.Bvc5.Core.Shipping.ShippingGroup.Clone(Boolean CopyBvins) in C:\workspaces\cupertino\BVCommerce\Main\App\source\BVSoftware.Bvc5.Core\Shipping\ShippingGroup.vb:138
BVSoftware.Bvc5.Core.Orders.Order.GetShippingGroups() in C:\workspaces\cupertino\BVCommerce\Main\App\source\BVSoftware.Bvc5.Core\Orders\Order.vb:1137
BVSoftware.BVC5.Shipping.FedEx.FedExProvider.GetRates(Order o, ShippingMethod m) in C:\workspaces\cupertino\BVCommerce\Main\App\source\BVSoftware.BVC5.Shipping.FedEx\FedExProvider.vb:13
BVSoftware.Bvc5.Core.Shipping.ShippingProvider.GetFilteredRates(Order o, ShippingMethod m) in C:\workspaces\cupertino\BVCommerce\Main\App\source\BVSoftware.Bvc5.Core\Shipping\ShippingProvider.vb:56
BVSoftware.Bvc5.Core.Shipping.ShippingMethod.GetRates(Order o) in C:\workspaces\cupertino\BVCommerce\Main\App\source\BVSoftware.Bvc5.Core\Shipping\ShippingMethod.vb:60
BVSoftware.Bvc5.Core.Orders.Order.FindAvailableShippingRates() in C:\workspaces\cupertino\BVCommerce\Main\App\source\BVSoftware.Bvc5.Core\Orders\Order.vb:1368
BVModules_Controls_Shipping.LoadShippingMethodsForOrder(Order o, String Zip) in G:\WEBS\Wicked-US-DEV\WWW\BVModules\Controls\Shipping.ascx.vb:31
BVModules_Checkouts_One_Page_Checkout_Checkout.LoadBasket() in G:\WEBS\Wicked-US-DEV\WWW\BVModules\Checkouts\One Page Checkout\Checkout.aspx.vb:93
BVModules_Checkouts_One_Page_Checkout_Checkout.PageLoad(Object sender, EventArgs e) in G:\WEBS\Wicked-US-DEV\WWW\BVModules\Checkouts\One Page Checkout\Checkout.aspx.vb:40
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
</pre></code>[/td][/tr][/table]

</div>
canaraca
#2 Posted : Friday, December 9, 2011 4:58:39 PM(UTC)
canaraca

Rank: Member

Joined: 4/16/2010(UTC)
Posts: 33

I see that there is the below code added to BVSoftware.Bvc5.Core\Shipping\DefaultDimensionCalculator.vb in BVC 5.7.5

If (group.Items(0).AssociatedProduct Is Nothing) Then
Return
End If

Marcus, is this what's causing it? Will I break something else if I delete those lines?

Please let me know.
canaraca
#3 Posted : Friday, December 9, 2011 6:00:35 PM(UTC)
canaraca

Rank: Member

Joined: 4/16/2010(UTC)
Posts: 33

Removing that piece of code in the Core fixed the issue. I'm hoping it won't break something else.
Aaron
#4 Posted : Friday, December 9, 2011 7:01:19 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Yeah, we applied that bug fix to our version of BV as well.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
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.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012