Table of Contents

Class Detail

Namespace
Dynamicweb.Ecommerce.Products
Assembly
Dynamicweb.Ecommerce.dll
Represents product details objects
[Serializable]
public class Detail
Inheritance
Detail
Inherited Members

Examples

using System.Collections.Generic;
using Dynamicweb.Ecommerce.Products;
using Dynamicweb.Rendering;

namespace Dynamicweb.Ecommerce.Examples.Products
{
    class ProductDetailRendererSample
    {
        public void RenderDetails(IEnumerable<Detail> details, Template parentTemplate, string loopName)
        {
            if (parentTemplate.LoopExists(loopName))
            {
                Template detailTemplate = parentTemplate.GetLoop(loopName);

                foreach (Detail detail in details)
                {
                    RenderDetail(detail, detailTemplate);
                    detailTemplate.CommitLoop();
                }
            }
        }

        private void RenderDetail(Detail detail, Template template)
        {
            //TODO: insert your code here
        }
    }
}

Constructors

Detail()

Default empty constructor
public Detail()

Detail(IDataReader)

Creates Detail object using income data reader
[Obsolete("This method is no longer used.")]
public Detail(IDataReader dataReader)

Parameters

dataReader IDataReader
Data reader with Detail loaded

Detail(string)

Creates Detail object using income DetailID
[Obsolete("Use DetailService.GetDetail instead.")]
public Detail(string detailId)

Parameters

detailId string
ID of Detail row

Detail(string, string, string)

Creates Detail object using detail ID, related product ID and variant ID
[Obsolete("Use DetailService.GetDetail instead.")]
public Detail(string detailId, string detailProductId, string detailVariantId)

Parameters

detailId string
ID of Detail row
detailProductId string
Related product ID
detailVariantId string
Product variant ID

Properties

GroupId

Gets or sets detail group id.
public int GroupId { get; set; }

Property Value

int

Id

Gets or sets id of product detail.
public string Id { get; set; }

Property Value

string

IsDefault

Gets or sets detail value.
public bool IsDefault { get; }

Property Value

bool

Keywords

public string Keywords { get; set; }

Property Value

string

LanguageId

Gets or sets current product language ID.
public string LanguageId { get; set; }

Property Value

string

Name

public string Name { get; set; }

Property Value

string

ProductId

Gets or sets id of product, details of this product are stored in current object.
public string ProductId { get; set; }

Property Value

string

SortOrder

Gets or sets detail sort order.
public int SortOrder { get; set; }

Property Value

int

Type

Gets or sets detail type.
public int Type { get; set; }

Property Value

int

Value

Gets or sets detail value.
public string Value { get; set; }

Property Value

string

VariantId

Gets or sets current product variant ID.
public string VariantId { get; set; }

Property Value

string

Methods

Delete()

Delete current Detail object
[Obsolete("Use DetailService.Delete instead.")]
public void Delete()

Delete(ProductCollection)

Delete all Detail object from collection
[Obsolete("Use DetailService.Delete instead.")]
public string Delete(ProductCollection products)

Parameters

products ProductCollection
Collection of Detail objects to delete

Returns

string
query statement used for delete

Delete(ProductCollection, bool)

Prepare delete query statement for collection of products and optionally execute it
[Obsolete("Use DetailService.Delete instead.")]
public string Delete(ProductCollection products, bool run)

Parameters

products ProductCollection
Products collection to delete
run bool
Execute prepared query statement or not

Returns

string
query statement used for delete

Delete(string)

Delete Detail object by row ID
[Obsolete("Use DetailService.Delete instead.")]
public void Delete(string detailId)

Parameters

detailId string
ID of Detail object to delete

Delete(string, string, string, string)

Delete Detail object by row ID, language ID, product ID and optional product variant ID
[Obsolete("Use DetailService.Delete instead.")]
public void Delete(string detailId, string detailLanguageId, string detailProductId, string detailVariantId = "")

Parameters

detailId string
ID of Detail object to delete
detailLanguageId string
Product language ID
detailProductId string
Product ID
detailVariantId string
Product variant ID (optional)

Fill(IDataReader)

Fill Details properties using fields of income DataReader
[Obsolete("This method is no longer used.")]
public void Fill(IDataReader dataReader)

Parameters

dataReader IDataReader
Data reader with Detail loaded

GetDetails()

Select all product details
[Obsolete("Use DetailService.GetDetails instead.")]
public static IEnumerable<Detail> GetDetails()

Returns

IEnumerable<Detail>
Collection of Detail objects for all products in database

GetDetails(Product)

Select details for a product
[Obsolete("Use DetailService.GetDetails instead.")]
public static IEnumerable<Detail> GetDetails(Product prod)

Parameters

prod Product
Product to select details for

Returns

IEnumerable<Detail>
Collection of Detail objects for income product

GetDetails(Product, string)

Selected details of some type for income product
[Obsolete("Use DetailService.GetDetails instead.")]
public static IEnumerable<Detail> GetDetails(Product prod, string detailType)

Parameters

prod Product
Product to select details for
detailType string
Details type, use an empty string to select all details

Returns

IEnumerable<Detail>
Collection of Detail objects

GetDetails(string, string, string, string)

Selected details of some type for income product
[Obsolete("Use DetailService.GetDetails instead.")]
public static IEnumerable<Detail> GetDetails(string detailLanguageId, string detailProductId, string detailVariantId, string detailType)

Parameters

detailLanguageId string
Product language ID
detailProductId string
Product ID
detailVariantId string
Product variant ID (optional)
detailType string
Details type, use an empty string to select all details

Returns

IEnumerable<Detail>
Collection of Detail objects

Save(string, Product)

Save details for provided product
[Obsolete("Use DetailService.Save instead.")]
public void Save(string detailId, Product prod)

Parameters

detailId string
Detail row ID
prod Product
Product object

Save(string, string, string)

Save details for provided product and variant
[Obsolete("Use DetailService.Save instead.")]
public void Save(string detailId, string detailProductId, string detailVariantId)

Parameters

detailId string
Detail row ID
detailProductId string
Product ID
detailVariantId string
Product variant ID

Remarks

If there is no existing detail row for detailId, procedure creates the new one
To top