Class ProductImageService
- Namespace
- Dynamicweb.Ecommerce.Products
- Assembly
- Dynamicweb.Ecommerce.dll
public class ProductImageService
- Inheritance
-
ProductImageService
- Inherited Members
Properties
IsOldImagesDeprecated
public bool IsOldImagesDeprecated { get; }
Property Value
UseImprovedPatterns
public bool UseImprovedPatterns { get; }
Property Value
Methods
CheckPhysicalPath(string, bool)
public string CheckPhysicalPath(string image, bool saveWildCards = false)
Parameters
Returns
CompileProductImagePath(string, Product)
Compiles product image path with replacing product related placeholders with product values
public string CompileProductImagePath(string image, Product product)
Parameters
Returns
- string
- Compiled image path.
CompileProductImagePath(string, string, string, string, string, string, string, string)
Compiles product image path with replacing product related placeholders with product values
public string CompileProductImagePath(string image, string productId, string productNumber, string productName, string productPrimaryGroupId, string productVariantId, string productManufacturerName, string variantOptionName)
Parameters
imagestring- Image pattern
productIdstring- Product id
productNumberstring- Product number
productNamestring- Product name
productPrimaryGroupIdstring- Product primary group id
productVariantIdstring- Product variant id
productManufacturerNamestring- Product manufacturer name
variantOptionNamestring- variantOptionName
Returns
FileExists(string)
public bool FileExists(string filePath)
Parameters
filePathstring
Returns
FindFilesByImagePattern(string, string, bool, bool)
public IEnumerable<string> FindFilesByImagePattern(string imageCompiled, string imageFolder, bool searchSubfolders, bool onlyExisting)
Parameters
Returns
FixImagePath(string)
public string FixImagePath(string path)
Parameters
pathstring
Returns
GetDefaultDetailImagePath(Product)
public string GetDefaultDetailImagePath(Product product)
Parameters
productProduct
Returns
GetDefaultImageFromShop(Product, Shop)
public string GetDefaultImageFromShop(Product product, Shop shop)
Parameters
Returns
GetDefaultImageFromShop(Product, string)
public string GetDefaultImageFromShop(Product product, string groupId)
Parameters
Returns
GetDefaultImagePath()
public string GetDefaultImagePath()
Returns
GetImageFromProduct(Product)
Gets the primary image for the product
public string GetImageFromProduct(Product product)
Parameters
productProduct- The product
Returns
- string
- The image path of existing image with following the hierarchy: image set on ImageSmall Property image set on ImageMedium Property image set on ImageLarge Property
GetImagePath(Product)
Gets the primary image for the product
public string GetImagePath(Product product)
Parameters
productProduct- The product
Returns
- string
- The image path of existing image with following the hierarchy: default detail image set on ImageSmall Property image set on ImageMedium Property image set on ImageLarge Property image from shop pattern image from global pattern image from global setting for small default image image from global setting for medium default image image from global setting for large default image
GetImagePath(Product, string)
Gets the primary image for the product
public string GetImagePath(Product product, string groupId)
Parameters
Returns
- string
- The image path of existing image with following the hierarchy: default detail image set on ImageSmall Property image set on ImageMedium Property image set on ImageLarge Property image from shop pattern image from global pattern image from global setting for small default image image from global setting for medium default image image from global setting for large default image
GetImagePath(Product, string, List<Detail>, bool)
Gets the primary image for the product
public string GetImagePath(Product product, string groupId, List<Detail> details, bool ignoreNoPictureSetting)
Parameters
productProduct- The product
groupIdstring- The product group id
detailsList<Detail>ignoreNoPictureSettingbool
Returns
- string
- The image path of existing image with following the hierarchy: default detail image set on ImageSmall Property image set on ImageMedium Property image set on ImageLarge Property image from shop pattern image from global pattern image from global setting for small default image image from global setting for medium default image image from global setting for large default image
GetImagesFromPatterns(Product, Shop)
public IEnumerable<string> GetImagesFromPatterns(Product product, Shop shop)
Parameters
Returns
GetImagesFromPatterns(Product, string)
public IEnumerable<string> GetImagesFromPatterns(Product product, string groupId = "")
Parameters
Returns
GetProductImage(string, string)
public string GetProductImage(string imagePath, string imageSize)
Parameters
Returns
IsUrl(string)
public bool IsUrl(string path)
Parameters
pathstring