Class ProductImageService
- Namespace
- Dynamicweb.Ecommerce.Products
- Assembly
- Dynamicweb.Ecommerce.dll
- Inheritance
-
Product
Image Service
- Inherited Members
Methods
CheckPhysicalPath(string, bool)
Parameters
Returns
CompileProductImagePath(string, Product)
Compiles product image path with replacing product related placeholders with product values
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
image
stringImage pattern
productId
stringProduct id
productNumber
stringProduct number
productName
stringProduct name
productPrimaryGroupId
stringProduct primary group id
productVariantId
stringProduct variant id
productManufacturerName
stringProduct manufacturer name
variantOptionName
stringvariantOptionName
Returns
FileExists(string)
Parameters
filePath
string
Returns
FindFilesByImagePattern(string, string, bool, bool)
public IEnumerable<string> FindFilesByImagePattern(string imageCompiled, string imageFolder, bool searchSubfolders, bool onlyExisting)
Parameters
Returns
FixImagePath(string)
Parameters
path
string
Returns
GetAllDetailsGroups()
Returns
GetDefaultDetailImagePath(Product)
Parameters
product
Product
Returns
GetDefaultImageFromShop(Product, Shop)
Parameters
Returns
GetDefaultImageFromShop(Product, string)
Parameters
Returns
GetDefaultImagePath()
Returns
GetDetails(Product, string)
Parameters
Returns
GetImageFromProduct(Product)
Gets the primary image for the product
Parameters
product
ProductThe 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
Parameters
product
ProductThe 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
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
product
ProductThe product
groupId
stringThe product group id
details
List<Detail>ignoreNoPictureSetting
bool
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
GetImagePaths(IEnumerable<Product>, string, bool)
public Dictionary<ProductKey, string> GetImagePaths(IEnumerable<Product> products, string groupId, bool ignoreNoPictureSetting)
Parameters
products
IEnumerable<Product>groupId
stringignoreNoPictureSetting
bool
Returns
GetImagePatternsDetails(Product, bool)
public IEnumerable<Detail> GetImagePatternsDetails(Product product, bool fallbackDefaultImage = false)
Parameters
Returns
GetImagePatternsDetails(Product, string, bool)
public IEnumerable<Detail> GetImagePatternsDetails(Product product, string groupId, bool fallbackDefaultImage = false)
Parameters
Returns
GetImagePatternsDetailsGroup()
Returns
GetImagesFromPatterns(Product, Shop)
Parameters
Returns
GetImagesFromPatterns(Product, string)
Parameters
Returns
GetProductImage(string, string)
Parameters
Returns
IsUrl(string)
Parameters
path
string