1 Imports BVSoftware.Bvc5.Core.Orders
2 Imports BVSoftware.Bvc5.Core.Shipping
3 Imports System.Collections.ObjectModel
4
5 Public Class TrackingOnly
6 Inherits ShippingProvider
7
8 Public Overrides ReadOnly Property Name() As String
9 Get
10 Return "Tracking Only"
11 End Get
12 End Property
13
14 Public Overrides ReadOnly Property ProviderId() As String
15 Get
16 Return "F0FA8EC8-1186-4669-A04F-C47196192730"
17 End Get
18 End Property
19
20 Public Overrides ReadOnly Property SupportsTracking() As Boolean
21 Get
22 Return True
23 End Get
24 End Property
25
26 Public Overrides Function GetTrackingUrl( _
27 ByVal trackingCode As String) As String
28
29 Return String.Format("http://www.carrier.com/track?id={0}", trackingCode) 30 End Function
31
32 Protected Overloads Overrides Function GetRates( _
33 ByVal o As Order, _
34 ByVal m As ShippingMethod) As Collection(Of ShippingRate)
35
36 Return New Collection(Of ShippingRate)
37 End Function
38
39 Protected Overloads Overrides Function GetRates( _
40 ByVal g As Collection(Of ShippingGroup), ByVal m As ShippingMethod) _
41 As Collection(Of ShippingRate)
42
43 Return New Collection(Of ShippingRate)
44 End Function
45
46 Public Overrides Function GetSelectedShippingNames( _
47 ByVal method As ShippingMethod) As Collection(Of String)
48
49 Return New Collection(Of String)
50 End Function
51
52 Public Overrides ReadOnly Property RequiresCity( _
53 ByVal shippingMethodId As String) As Boolean
54
55 Get
56 Return False
57 End Get
58 End Property
59
60 Public Overrides ReadOnly Property RequiresPostalCode( _
61 ByVal shippingMethodId As String) As Boolean
62
63 Get
64 Return False
65 End Get
66 End Property
67
68 Public Overrides ReadOnly Property RequiresState( _
69 ByVal shippingMethodId As String) As Boolean
70
71 Get
72 Return False
73 End Get
74 End Property
75 End Class
Lines 8-12: Return the name you want to appear in every list of shipping providers. For example "UPS", "US Postal Service", or "Yellow Freight".
Lines 14-18: Return a unique id for this ShippingProvider. The id must be unique among all ShippingProviders in your site. It can be a GUID as in this example, but it is up to you.
Lines 26-30: Return the tracking URL. The trackingCode parameter is the code that the merchant enters in the Tracking Code field on the BV Admin > Orders > Order Shipping page.
Lines 32-74: This ShippingProvider does not provide shipping rates so all of the functions related to shipping rates return False or empty lists.
Navigate to the BV Admin > Orders > Order Shipping page.