Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

ProductAttribute

API reference for ProductAttribute in Vendr, the eCommerce solution for Umbraco v8+

ProductAttribute

A Vendr Product Attribute entity

public class ProductAttribute : ProductAttributeReadOnly

Inheritance

Namespace

Methods

Create

public static ProductAttribute Create(IUnitOfWork uow, Guid storeId, string alias, string name)

AddValue (1 of 2)

Adds a Value with a default Name to the Product Attribute

public ProductAttribute AddValue(string alias, string name)

AddValue (2 of 2)

Adds a Value with a translated Name to the Product Attribute

public ProductAttribute AddValue(string alias, TranslatedValue<string> name)

ClearValues

Clears all Values from the Product Attribute

public ProductAttribute ClearValues()

InsertValue (1 of 2)

Inserts a Value with a default Name into the Product Attribute

public ProductAttribute InsertValue(int index, string alias, string name)

InsertValue (2 of 2)

Inserts a Value with a translated Name into the Product Attribute

public ProductAttribute InsertValue(int index, string alias, TranslatedValue<string> name)

RemoveValue

Removes a Value with the given Alias from the Product Attribute

public ProductAttribute RemoveValue(string alias)

RemoveValueAt

Removes a Value at the given index from the Product Attribute

public ProductAttribute RemoveValueAt(int index)

SetAlias

Sets the Alias of the Product Attribute

public ProductAttribute SetAlias(string alias)

SetName (1 of 3)

Sets the default Name of the Product Attribute

public ProductAttribute SetName(string name)

SetName (2 of 3)

Sets the Name of the Product Attribute for the given language

public ProductAttribute SetName(string languageIsoCode, string name)

SetName (3 of 3)

Sets the translated Name of the Product Attribute

public ProductAttribute SetName(TranslatedValue<string> name, 
    SetBehavior setBehavior = SetBehavior.Merge)

SetSortOrder

Sets the sort order of the product attribute

public ProductAttribute SetSortOrder(int sortOrder)

SetValues (1 of 2)

Sets the Values of the Product Attribute

public ProductAttribute SetValues(IEnumerable<KeyValuePair<string, string>> values)

SetValues (2 of 2)

Sets the Values of the Product Attribute

public ProductAttribute SetValues(IEnumerable<KeyValuePair<string, TranslatedValue<string>>> values)

WithValue

Gets the product attribute value context for the value with the given alias

public ProductAttributeValueContext WithValue(string alias)

WithValueAt

Gets the product attribute value context for the value at the given index

public ProductAttributeValueContext WithValueAt(int index)

Classes

ProductAttribute.ProductAttributeValueContext

public class ProductAttributeValueContext
Methods

SetName (1 of 3)

Sets the default Name of the Product Attribute Value

public ProductAttributeValueContext SetName(string name)

SetName (2 of 3)

Sets the Name of the Product Attribute Value for the given language

public ProductAttributeValueContext SetName(string languageIsoCode, string name)

SetName (3 of 3)

Sets the translated Name of the Product Attribute Value

public ProductAttributeValueContext SetName(TranslatedValue<string> name, 
    SetBehavior setBehavior = SetBehavior.Merge)

Edit this page on GitHub

Site + logo design © 2024 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.