A specification attribute of the product being priced.

Hierarchy

  • Specification

Properties

Properties

DefaultValue: string

The value as entered in the admin, without translation.

Example

if (spec.DefaultValue == "350gsm") {
// heavy stock
}
Key: string

The name of the specification attribute.

Example

var name = spec.Key; // "Paper Weight"
Value: string

The value, translated into the customer's language. Use it for display; compare against DefaultValue in pricing logic.

Example

debug(spec.Key + ": " + spec.Value);

Generated using TypeDoc