Represents an individual value within an attribute. Attribute values define the specific options available for a product attribute, including their pricing implications and physical adjustments.

Each attribute value can have its own price, weight, and dimensional adjustments, allowing for precise control over how product options affect the final pricing.

Hierarchy

  • AttributeValue

Properties

HeightAdjustment: number

The height adjustment amount for this attribute value. This value modifies the product's height dimension when this attribute value is selected, affecting packaging calculations.

Example

var adjustedHeight = Item.Height + attr.HeightAdjustment;
Id: string

The unique identifier for this attribute value. This ID is used internally for tracking and processing attribute selections and should not be displayed to end users.

Example

var valueId = attr.Id; // "color_red_001", "size_large_002", etc.
LengthAdjustment: number

The length adjustment amount for this attribute value. This value modifies the product's length dimension when this attribute value is selected, affecting packaging calculations.

Example

var adjustedLength = Item.Length + attr.LengthAdjustment;
PriceAdjustment: number

The price adjustment amount for this attribute value. This value is added to or subtracted from the base product price when this attribute value is selected.

Example

var finalPrice = Item.Price + attr.PriceAdjustment;
PriceAdjustmentIsPercentage: boolean

Indicates whether the price adjustment should be applied as a percentage rather than a fixed amount. When true, the PriceAdjustment value is treated as a percentage of the base price.

Example

if (attr.PriceAdjustmentIsPercentage) {
var adjustment = Item.Price * (attr.PriceAdjustment / 100);
} else {
var adjustment = attr.PriceAdjustment;
}
TierPriceAdjustments: Tier[]

Array of tier-based price adjustments for this attribute value. Each tier defines a quantity threshold and corresponding price adjustment, allowing for quantity-based pricing variations for this specific attribute option.

Example

var tierAdjustment = HelperMethods.FindTier(Item.Quantity, attr.TierPriceAdjustments);
if (tierAdjustment) {
var finalPrice = Item.Price + tierAdjustment.Price;
}
UseTierPriceAdjustment: boolean

Indicates whether tier-based price adjustments should be used for this attribute value. When true, the system will use the TierPriceAdjustments array instead of the standard PriceAdjustment for quantity-based pricing.

Example

if (attr.UseTierPriceAdjustment) {
var tierAdjustment = HelperMethods.FindTier(Item.Quantity, attr.TierPriceAdjustments);
}
Value: string

The display value of the attribute option as shown to customers. This is the human-readable text that appears in the user interface for this specific attribute option.

Example

var selectedColor = attr.Value; // "Red", "Blue", "Green", etc.
WeightAdjustment: number

The weight adjustment amount for this attribute value. This value is added to or subtracted from the base product weight when this attribute value is selected, affecting shipping calculations.

Example

var adjustedWeight = Item.Weight + attr.WeightAdjustment;
WidthAdjustment: number

The width adjustment amount for this attribute value. This value modifies the product's width dimension when this attribute value is selected, affecting packaging calculations.

Example

var adjustedWidth = Item.Width + attr.WidthAdjustment;

Generated using TypeDoc