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
AutoBuildIndex
Gets or sets the possibility automaticaly build index during shop products update.
public bool AutoBuildIndex { get; set; }
Property Value
- 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
- 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
To assign rules to a shop use AssignRulesToShop(Shop, IEnumerable<CompletionRule>)
Created
Gets or sets creation date.
public DateTime Created { get; set; }
Property Value
DefaultLanguageId
Gets or sets the ID of the default language.
public string DefaultLanguageId { get; set; }
Property Value
DefaultPrintTemplate
Gets or sets the path for the default print template.
public string DefaultPrintTemplate { get; set; }
Property Value
Groups
Gets the collection of the groups.
[Obsolete("Use Groups(languageId) instead.")]
public GroupCollection Groups { get; }
Property Value
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
HasGroups
Gets the value indicating whether shop has groups.
[Obsolete("Use Services.Shops.HasGroups(shop) instead.")]
public bool HasGroups { get; }
Property Value
Icon
Gets or sets the icon.
public string Icon { get; set; }
Property Value
Id
Gets or sets the ID of the shop.
public string Id { get; set; }
Property Value
ImageFolder
Gets or sets the image folder.
public string ImageFolder { get; set; }
Property Value
ImagePatternLarge
Gets or sets the pattern for the names of the large images.
public string ImagePatternLarge { get; set; }
Property Value
ImagePatternMain
Gets or sets the main product pattern.
public string ImagePatternMain { get; set; }
Property Value
ImagePatternMedium
Gets or sets the pattern for the names of the medium images.
public string ImagePatternMedium { get; set; }
Property Value
ImagePatternSmall
Gets or sets the pattern for the names of the small images.
public string ImagePatternSmall { get; set; }
Property Value
ImagePatternVariant
Gets or sets the variant product pattern.
public string ImagePatternVariant { get; set; }
Property Value
ImageSearchInSubfolders
Gets or sets the image folder.
public bool ImageSearchInSubfolders { get; set; }
Property Value
ImageUploadFolder
Products images upload folder.
[Obsolete]
public string ImageUploadFolder { get; set; }
Property Value
IndexName
Gets or sets the index name.
public string IndexName { get; set; }
Property Value
- See Also
IndexRepository
Gets or sets the index repository.
public string IndexRepository { get; set; }
Property Value
- See Also
IsDefault
Gets or sets the value indicating whether shop is used as default.
public bool IsDefault { get; set; }
Property Value
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
Languages
Gets or sets the languages collection.
[Obsolete("Use RelatedLanguages instead.")]
public LanguageCollection Languages { get; set; }
Property Value
Name
Gets or sets the name of the shop.
public string Name { get; set; }
Property Value
OrderContextId
Gets or sets the ID of the order context.
public string OrderContextId { get; set; }
Property Value
OrderFlowId
Gets or sets the ID of the order flow.
public int OrderFlowId { get; set; }
Property Value
OrderLineFields
Gets order line fields collection.
public OrderLineFieldCollection OrderLineFields { get; }
Property Value
ProductCountForBackendTree
Gets product count in shop for current language, without variants.
[Obsolete("Use ShopService.GetProductCountForBackendTree instead.")]
public int ProductCountForBackendTree { get; }
Property Value
ProductPrimaryPageId
Gets or sets the product primary page ID.
public int ProductPrimaryPageId { get; set; }
Property Value
RelatedLanguages
Gets or sets the related languages.
public ICollection<Language> RelatedLanguages { get; set; }
Property Value
StockLocationID
Gets or sets the stock location ID.
public long StockLocationID { get; set; }
Property Value
StockLocations
Gets the collection of the stock locations.
[Obsolete("Use Services.StockService.GetStockLocationRelations instead.")]
public StockLocationCollection StockLocations { get; }
Property Value
StockStateId
Gets or sets the ID of the stock state.
public string StockStateId { get; set; }
Property Value
TopLevelGroups
Gets the collection of the top level groups.
[Obsolete("Use TopLevelGroups(languageId) instead.")]
public GroupCollection TopLevelGroups { get; }
Property Value
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
UsageType
Gets or sets ShopType for the shop
public ShopType UsageType { get; set; }
Property Value
UseAlternativeImages
Gets or sets the value indicating whether shop has alternative images.
public bool UseAlternativeImages { get; set; }
Property Value
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
Copy()
Copies the shop.
[Obsolete("Use Clone() instead.")]
public Shop Copy()
Returns
Copy(string)
Copies the shop.
[Obsolete("Use Clone() instead.")]
public Shop Copy(string newName)
Parameters
newName
string- The new name.
Returns
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
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 asTrue
.[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
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
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
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
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
GetGroups(string)
Gets the collection of the groups.
public GroupCollection GetGroups(string languageId)
Parameters
languageId
string- The language ID.
Returns
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
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
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)