Table of Contents

Class ShippingService

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll
public class ShippingService : ICacheStorage<string, Shipping>, ICacheStorage<string>, ICacheStorage
Inheritance
ShippingService
Implements
Inherited Members

Methods

ClearCache()

Clears cached shippings.
public void ClearCache()

ClearCache(LanguageBasedKey<string>)

[Obsolete("Is not used anymore")]
public void ClearCache(LanguageBasedKey<string> key)

Parameters

key LanguageBasedKey<string>

ClearCache(IEnumerable<LanguageBasedKey<string>>)

[Obsolete("Is not used anymore")]
public void ClearCache(IEnumerable<LanguageBasedKey<string>> keys)

Parameters

keys IEnumerable<LanguageBasedKey<string>>

ClearCache(IEnumerable<string>)

Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<string> keys)

Parameters

keys IEnumerable<string>
Keys to reset

ClearCache(string)

Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(string key)

Parameters

key string
Key to reset

Clone(Shipping)

Clones this instance.
public Shipping Clone(Shipping shipping)

Parameters

shipping Shipping

Returns

Shipping

Examples

class MyPage : System.Web.UI.Page
{
private Shipping shipping;
public void DoSave()
{
Shipping theShipping = new Shipping();
theShipping = Services.Shipping.Clone(shipping);
theShipping.ID = string.Empty;
theShipping.Save(theShipping.ID);
}
}

CopyShipping(string)

Copies the shipping, fees and country relations based on the shippingId, appending "(Copy)" to the name.
public void CopyShipping(string shippingId)

Parameters

shippingId string
The id of the shipping to copy.

Delete(string)

Deletes the shipping with specified id.
public void Delete(string shippingId)

Parameters

shippingId string
The id.

Delete(string, string)

Deletes the shipping with specified id and language
[Obsolete("Use Delete(String) instead")]
public void Delete(string shippingId, string languageId)

Parameters

shippingId string
The id.
languageId string
The language id.

DeleteAll()

Deletes all shippings.
public void DeleteAll()

DeleteByLanguage(string)

Deletes translations by language.
public void DeleteByLanguage(string languageId)

Parameters

languageId string
The language id.

GetDefaultShippingMethod(string, bool)

Gets the default shipping method.
public Shipping GetDefaultShippingMethod(string countryCode, bool onlyActive)

Parameters

countryCode string
The country code.
onlyActive bool
If set to true, only active shipping methods will be included to the result, otherwise inactive will be also included.

Returns

Shipping

GetDefaultShippingMethod(string, string)

Gets the default shipping method.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public Shipping GetDefaultShippingMethod(string languageId, string countryCode)

Parameters

languageId string
The language id.
countryCode string
The country code.

Returns

Shipping

GetDefaultShippingMethod(string, string, bool)

Gets the default shipping method.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public Shipping GetDefaultShippingMethod(string languageId, string countryCode, bool onlyActive)

Parameters

languageId string
The language id.
countryCode string
The country code.
onlyActive bool
If set to true, only active shipping methods will be included to the result, otherwise inactive will be also included.

Returns

Shipping

GetShipping(string)

Gets the shipping methods that has relation to any country.
public Shipping GetShipping(string shippingId)

Parameters

shippingId string

Returns

Shipping

GetShipping(string, string)

Gets the shipping methods that has relation to any country.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public Shipping GetShipping(string shippingId, string languageId)

Parameters

shippingId string
languageId string

Returns

Shipping

GetShipping(string, string, string)

Gets the shipping methods that has relation to specified country.
public Shipping GetShipping(string shippingId, string countryCode, string regionCode)

Parameters

shippingId string
countryCode string
regionCode string

Returns

Shipping

GetShipping(string, string, string, string)

Gets the shipping methods that has relation to specified country.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public Shipping GetShipping(string shippingId, string languageId, string countryCode, string regionCode)

Parameters

shippingId string
languageId string
countryCode string
regionCode string

Returns

Shipping

GetShippings()

Gets the shipping methods with country relations.
public IEnumerable<Shipping> GetShippings()

Returns

IEnumerable<Shipping>

GetShippings(string)

Gets the shipping methods with country relations.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public IEnumerable<Shipping> GetShippings(string languageId)

Parameters

languageId string
The language id.

Returns

IEnumerable<Shipping>

GetShippings(string, string, bool)

Gets the shipping methods with country relations.
public IEnumerable<Shipping> GetShippings(string countryCode, string regionCode, bool onlyActive)

Parameters

countryCode string
The country code.
regionCode string
The region code.
onlyActive bool
If set to true, only active shipping methods will be included to the result, otherwise inactive will be also included.

Returns

IEnumerable<Shipping>

GetShippings(string, string, string)

Gets the shipping methods with country relations.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public IEnumerable<Shipping> GetShippings(string languageId, string countryCode, string regionCode)

Parameters

languageId string
The language id.
countryCode string
The country code.
regionCode string
The region code.

Returns

IEnumerable<Shipping>

GetShippings(string, string, string, bool)

Gets the shipping methods with country relations.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public IEnumerable<Shipping> GetShippings(string languageId, string countryCode, string regionCode, bool onlyActive)

Parameters

languageId string
The language id.
countryCode string
The country code.
regionCode string
The region code.
onlyActive bool
If set to true, only active shipping methods will be included to the result, otherwise inactive will be also included.

Returns

IEnumerable<Shipping>

GetShippingsForUser(User, string, string)

Gets the active shipping methods with the suitable country code and region code for the user.
public IEnumerable<Shipping> GetShippingsForUser(User user, string countryCode, string regionCode)

Parameters

user User
The User. Use null for anonymous user.
countryCode string
The country code.
regionCode string
The region/state code.

Returns

IEnumerable<Shipping>
A collection of shipping methods.

GetShippingsWithoutRegions(bool)

Gets the shipping methods with country relations.
public IEnumerable<Shipping> GetShippingsWithoutRegions(bool onlyActive)

Parameters

onlyActive bool
If set to true, only active shipping methods will be included to the result, otherwise inactive will be also included.

Returns

IEnumerable<Shipping>

GetShippingsWithoutRegions(string)

Gets the shipping methods with country relations.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public IEnumerable<Shipping> GetShippingsWithoutRegions(string languageId)

Parameters

languageId string
The language id.

Returns

IEnumerable<Shipping>

GetShippingsWithoutRegions(string, bool)

Gets the shipping methods with country relations.
[Obsolete("Use the overload without languageId and then use Translations on the shipping.")]
public IEnumerable<Shipping> GetShippingsWithoutRegions(string languageId, bool onlyActive)

Parameters

languageId string
The language id.
onlyActive bool
If set to true, only active shipping methods will be included to the result, otherwise inactive will be also included.

Returns

IEnumerable<Shipping>

Save(Shipping)

Saves the specified id.
public void Save(Shipping shipping)

Parameters

shipping Shipping
The shipping.
To top