Table of Contents

Class Shop

Namespace
Dynamicweb.Ecommerce.Shops
Assembly
Dynamicweb.Ecommerce.dll
Represents the Ecommerce shop.
[Serializable]
public class Shop : ICloneable, IDisplayName, IPermissionLookup, IPermissionControlled
Inheritance
Shop
Implements
Inherited Members

Constructors

Shop()

Initializes a new instance of the class.
public Shop()

Shop(IDataReader)

Initializes a new instance of the class.
[Obsolete("This method is no longer used.")]
public Shop(IDataReader dataReader)

Parameters

dataReader IDataReader
The IDataReader.

Shop(string)

Initializes a new instance of the class.
[Obsolete("Use ShopService.GetShop instead.")]
public Shop(string shopId)

Parameters

shopId string
The shop ID.

Properties

AlternativeImagePatterns

Gets or sets the alternative patterns for images.
public List<ImagePattern> AlternativeImagePatterns { get; set; }

Property Value

List<ImagePattern>

AutoBuildIndex

Gets or sets the possibility automaticaly build index during shop products update.
public bool AutoBuildIndex { get; set; }

Property Value

bool
See Also

AutoCreateUploadFolderPerProduct

If true then new subfolder of the ImageUploadFolder folder will create with Product Number as name and uploaded file will put there.
[Obsolete]
public bool AutoCreateUploadFolderPerProduct { get; set; }

Property Value

bool
See Also

CompletionLanguages

Gets Language collection used for calculating the shop product completeness value.
public IEnumerable<Language> CompletionLanguages { get; set; }

Property Value

IEnumerable<Language>
Return Language collection

CompletionRules

Gets rules collection used for calculating the shop product completeness value.
public IEnumerable<CompletionRule> CompletionRules { get; }

Property Value

IEnumerable<CompletionRule>
Return CompletionRule collection

Remarks

Created

Gets or sets creation date.
public DateTime Created { get; set; }

Property Value

DateTime

DefaultLanguageId

Gets or sets the ID of the default language.
public string DefaultLanguageId { get; set; }

Property Value

string

DefaultPrintTemplate

Gets or sets the path for the default print template.
public string DefaultPrintTemplate { get; set; }

Property Value

string

Groups

Gets the collection of the groups.
[Obsolete("Use Groups(languageId) instead.")]
public GroupCollection Groups { get; }

Property Value

GroupCollection

GroupsDefaultLanguage

Get groups, including groups in default language. If group exists in current language, group's language ID is current language, otherwise language ID is default lanugage ID.
[Obsolete("This method is no longer used.")]
public GroupCollection GroupsDefaultLanguage { get; }

Property Value

GroupCollection

HasGroups

Gets the value indicating whether shop has groups.
[Obsolete("Use Services.Shops.HasGroups(shop) instead.")]
public bool HasGroups { get; }

Property Value

bool

Icon

Gets or sets the icon.
public string Icon { get; set; }

Property Value

string

Id

Gets or sets the ID of the shop.
public string Id { get; set; }

Property Value

string

ImageFolder

Gets or sets the image folder.
public string ImageFolder { get; set; }

Property Value

string

ImagePatternLarge

Gets or sets the pattern for the names of the large images.
public string ImagePatternLarge { get; set; }

Property Value

string

ImagePatternMain

Gets or sets the main product pattern.
public string ImagePatternMain { get; set; }

Property Value

string

ImagePatternMedium

Gets or sets the pattern for the names of the medium images.
public string ImagePatternMedium { get; set; }

Property Value

string

ImagePatternSmall

Gets or sets the pattern for the names of the small images.
public string ImagePatternSmall { get; set; }

Property Value

string

ImagePatternVariant

Gets or sets the variant product pattern.
public string ImagePatternVariant { get; set; }

Property Value

string

ImageSearchInSubfolders

Gets or sets the image folder.
public bool ImageSearchInSubfolders { get; set; }

Property Value

bool

ImageUploadFolder

Products images upload folder.
[Obsolete]
public string ImageUploadFolder { get; set; }

Property Value

string

IndexName

Gets or sets the index name.
public string IndexName { get; set; }

Property Value

string
See Also

IndexRepository

Gets or sets the index repository.
public string IndexRepository { get; set; }

Property Value

string
See Also

IsDefault

Gets or sets the value indicating whether shop is used as default.
public bool IsDefault { get; set; }

Property Value

bool

IsProductWarehouse

Gets or sets the value indicating whether shop or PIM Product Warehouse.
[Obsolete("Use UsageType property instead")]
public bool IsProductWarehouse { get; set; }

Property Value

bool

Languages

Gets or sets the languages collection.
[Obsolete("Use RelatedLanguages instead.")]
public LanguageCollection Languages { get; set; }

Property Value

LanguageCollection

Name

Gets or sets the name of the shop.
public string Name { get; set; }

Property Value

string

OrderContextId

Gets or sets the ID of the order context.
public string OrderContextId { get; set; }

Property Value

string

OrderFlowId

Gets or sets the ID of the order flow.
public int OrderFlowId { get; set; }

Property Value

int

OrderLineFields

Gets order line fields collection.
public OrderLineFieldCollection OrderLineFields { get; }

Property Value

OrderLineFieldCollection

ProductCountForBackendTree

Gets product count in shop for current language, without variants.
[Obsolete("Use ShopService.GetProductCountForBackendTree instead.")]
public int ProductCountForBackendTree { get; }

Property Value

int

ProductPrimaryPageId

Gets or sets the product primary page ID.
public int ProductPrimaryPageId { get; set; }

Property Value

int

RelatedLanguages

Gets or sets the related languages.
public ICollection<Language> RelatedLanguages { get; set; }

Property Value

ICollection<Language>

StockLocationID

Gets or sets the stock location ID.
public long StockLocationID { get; set; }

Property Value

long

StockLocations

Gets the collection of the stock locations.
[Obsolete("Use Services.StockService.GetStockLocationRelations instead.")]
public StockLocationCollection StockLocations { get; }

Property Value

StockLocationCollection

StockStateId

Gets or sets the ID of the stock state.
public string StockStateId { get; set; }

Property Value

string

TopLevelGroups

Gets the collection of the top level groups.
[Obsolete("Use TopLevelGroups(languageId) instead.")]
public GroupCollection TopLevelGroups { get; }

Property Value

GroupCollection

TopLevelGroupsDefaultLanguage

Get top level groups, including groups in default language. If group exists in current language, group's language ID is current language, otherwise language ID is default lanugage ID.
[Obsolete("This method is no longer used.")]
public GroupCollection TopLevelGroupsDefaultLanguage { get; }

Property Value

GroupCollection

UsageType

Gets or sets ShopType for the shop
public ShopType UsageType { get; set; }

Property Value

ShopType

UseAlternativeImages

Gets or sets the value indicating whether shop has alternative images.
public bool UseAlternativeImages { get; set; }

Property Value

bool

Methods

ClearCache()

Clears the cache of the shops.
[Obsolete("Use ShopService.ClearCache instead.")]
public static void ClearCache()

ClearOrderLineFieldCache()

Reset order line fields cache.
[Obsolete("No longer used. Cached fields are cleared when fields or field relations are saved.")]
public void ClearOrderLineFieldCache()

ClearTopLevelGroupsCache()

Reset top groups cache.
public void ClearTopLevelGroupsCache()

Clone()

Clones the shop.
public object Clone()

Returns

object
A new instance of the Shop.

Copy()

Copies the shop.
[Obsolete("Use Clone() instead.")]
public Shop Copy()

Returns

Shop
A new instance of the Shop.

Copy(string)

Copies the shop.
[Obsolete("Use Clone() instead.")]
public Shop Copy(string newName)

Parameters

newName string
The new name.

Returns

Shop
A new instance of the Shop.

Delete()

Deletes the shop.
[Obsolete("Use ShopService.Delete instead.")]
public void Delete()

Delete(Shop, bool)

Deletes the shop.
[Obsolete("Use ShopService.Delete instead.")]
public void Delete(Shop shop, bool deleteGroups)

Parameters

shop Shop
The shop ID.
deleteGroups bool
Indicates if groups should be deleted.

Delete(IEnumerable<Shop>)

Deletes specified shops.
[Obsolete("Use ShopService.Delete instead.")]
public static void Delete(IEnumerable<Shop> shops)

Parameters

shops IEnumerable<Shop>
The instance of IEnumerable of Shop.

Delete(IEnumerable<Shop>, bool)

Deletes the specified shops if

executeQuery

set as True.
[Obsolete("Use ShopService.Delete instead.")]
public static CommandBuilder Delete(IEnumerable<Shop> shops, bool executeQuery)

Parameters

shops IEnumerable<Shop>
The instance of IEnumerable of Shop.
executeQuery bool
Indicates whether to execute the query.

Returns

CommandBuilder
An inctance of the CommandBuilder.

Delete(string)

Deletes the shop.
[Obsolete("Use ShopService.Delete instead.")]
public static bool Delete(string shopId)

Parameters

shopId string
The ID of the shop.

Returns

bool

Fill(IDataReader)

Initializes class properties.
[Obsolete("This method is no longer used.")]
public void Fill(IDataReader dataReader)

Parameters

dataReader IDataReader
The IDataReader.

get_Granted(UserPermissionRights)

Checks if the specified permission is granted.
[Obsolete("Use GetGranted instead")]
public bool get_Granted(UserPermissionRights permission)

Parameters

permission UserPermissionRights
The UserPermissionRights enumeration member.

Returns

bool

get_Groups(string)

Gets the collection of the groups.
[Obsolete("Use GetGroups instead")]
public GroupCollection get_Groups(string languageId)

Parameters

languageId string
The language ID.

Returns

GroupCollection

get_TopLevelGroups(string)

Gets the collection of the top level groups.
[Obsolete("Use GetTopLevelGroups instead")]
public GroupCollection get_TopLevelGroups(string languageId)

Parameters

languageId string
The language ID.

Returns

GroupCollection

GetByKey(string)

Can be used to look up a concrete object based upon the key.
public IPermissionControlled GetByKey(string key)

Parameters

key string
Identifier

Returns

IPermissionControlled
permissionControlled

GetDisplayName()

Yields a human-readable name for rendering.
public string GetDisplayName()

Returns

string
name

GetGranted(UserPermissionRights)

Checks if the specified permission is granted.
public bool GetGranted(UserPermissionRights permission)

Parameters

permission UserPermissionRights
The UserPermissionRights enumeration member.

Returns

bool

GetGroups(string)

Gets the collection of the groups.
public GroupCollection GetGroups(string languageId)

Parameters

languageId string
The language ID.

Returns

GroupCollection

GetParent()

Gets the parent of this object, for the purposes of inherited permissions.
public IPermissionControlled GetParent()

Returns

IPermissionControlled
parent

Remarks

Return null, if no parent permissions exist

GetPermissionIdentifier()

Combination of values that form a unique identifier.
public UnifiedPermissionIdentifier GetPermissionIdentifier()

Returns

UnifiedPermissionIdentifier
Unique identifier.

GetShops()

Gets all the shops.
[Obsolete("Use ShopService.GetShops instead.")]
public static IEnumerable<Shop> GetShops()

Returns

IEnumerable<Shop>
An instance of the IEnumerable of Shop, sorted by name ascending.

GetShops(bool)

Gets the sorted list of shops filtered by the IsDefault.
[Obsolete("Use ShopService.GetShops instead.")]
public static IEnumerable<Shop> GetShops(bool defaultShop)

Parameters

defaultShop bool
Include or exclude default shops.

Returns

IEnumerable<Shop>
An instance of the IEnumerable of Shop.

GetShops(string)

Gets the sorted list of shops.
[Obsolete("Use ShopService.GetShop instead.")]
public static IEnumerable<Shop> GetShops(string shopId)

Parameters

shopId string
The shop ID.

Returns

IEnumerable<Shop>
An instance of the IEnumerable of Shop.

GetShopsExcludeShop(Shop)

Gets the sorted list of shops exclude specified shop.
[Obsolete("Use ShopService.GetShops instead.")]
public static IEnumerable<Shop> GetShopsExcludeShop(Shop excludedShop)

Parameters

excludedShop Shop
The Shop to exclude.

Returns

IEnumerable<Shop>
An instance of the IEnumerable of Shop.

GetTopLevelGroups(string)

Gets the collection of the top level groups.
public GroupCollection GetTopLevelGroups(string languageId)

Parameters

languageId string
The language ID.

Returns

GroupCollection

Lock()

Puts the shop to the read only mode.
[Obsolete("This method is no longer used.")]
public void Lock()

Save()

Saves the shop.
[Obsolete("Use ShopService.Save instead.")]
public void Save()

Save(string)

Saves the shop.
[Obsolete("Use ShopService.Save instead.")]
public void Save(string shopId)

Parameters

shopId string
The shop ID.

UpdateDefault(bool, string)

Changes the value indicating whether shop is used as default.
[Obsolete("Use ShopService.CleanDefault or ShopService.Save instead.")]
public void UpdateDefault(bool setDefaultTo, string shopId = "")

Parameters

setDefaultTo bool
The new value for the IsDefault for the specified shop.
shopId string
The shop ID.

UpdateName(Shop, string)

Renames the shop.
[Obsolete("Use ShopService.Save instead.")]
public void UpdateName(Shop shop, string newName)

Parameters

shop Shop
The instance of the Shop.
newName string
The new name.
To top