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

Notification

Icon
Error

mzirino
#1 Posted : Friday, August 8, 2008 2:49:51 PM(UTC)
mzirino

Rank: Member

Joined: 4/8/2008(UTC)
Posts: 21

Hi. We have a store where US Countries recieve a flat shipping rate, and non-us countries recieve a "$0.00 - To Be Determined. Contact Store for Details" rate. It was found that when changing the Country, the shipping rate is always from the previous country selected instead of the current one, except on initial page load. After a few hours of debugging, I made a change that fixed it:

[2]



Code:

Private Sub ReloadShipping(ByVal Basket As Orders.Order)
If Basket Is Nothing Then
Basket = SessionManager.CurrentShoppingCart
End If
If Basket IsNot Nothing Then
Dim ship As Contacts.Address = GetShippingAsAddress()
Basket.SetShippingAddress(ship)
Shipping.LoadShippingMethodsForOrder(Basket, Me.ShippingpostalCodeField.Text)
If Basket.ShippingMethodId <> String.Empty Then
Shipping.SetShippingMethod(Basket.ShippingMethodUniqueKey) ' this sets selected value
Else
End If
'MZ This code re-applies the shipping rate
' Fixes a bug where the rate for the previous country show up, not the current one
' Probably would be better to fire the ShippingMethodChanged event since
' it does pretty much the same thing
Basket.ApplyShippingRate(Shipping.FindSelectedRate(Basket))
Orders.Order.Update(Basket)
End If
End Sub

[/2]

This is in \BVModules\Checkouts\One Page Checkout . Probably not a good quality fix, since it just adds to the redundancy in the already complex code. </FONT>

Thanks,
Marco

[2]
[/2]
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