Name

MaxQuantityField — specify tables and columns containing maximum allowed quantity for an item

SYNOPSIS

[ = | ? ] [table:] column

DESCRIPTION

The MaxQuantityField directive specifies databases and database columns containing the maximum allowed order quantity for an item.

If the argument contains a colon ":", it is treated as a TABLE:COLUMN specification. Otherwise it indicates the name of the column and the table defaults to the first ProductFiles database.

The record with the matching product SKU must exist in the target database, or the quantity will be unlimited.

It is possible to specify multiple database fields (separated by commas or spaces), in which case the maximum quantity allowed is set to the sum of all quantities found.

As of Interchange 5.7.0, a field prefixed with = overrides any previous value, while a field prefixed with ? overrides previous value only if the new value is greater than zero.

DIRECTIVE TYPE AND DEFAULT VALUE

Catalog directive

EXAMPLES

Example: Setting MaxQuantityField

MaxQuantityField max_quantity

Example: Setting MaxQuantityField

MaxQuantityField inventory:quantity

Example: Setting MaxQuantityField

MaxQuantityField inventory:quantity, products:in_stock products:on_hand

Notice we can use commas and whitespace interchangeably to separate fields.


Example: Setting MaxQuantityField

Override any previous value with products:on_hand, if it contains a value greater than zero.

MaxQuantityField inventory:quantity ?products:on_hand

NOTES

AVAILABILITY

MaxQuantityField is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: lib/Vend/Config.pm
Line 633

['MaxQuantityField', undef,            ''],

AUTHORS

Interchange Development Group

SEE ALSO

MinQuantityField(7ic)

DocBook! Interchange!