Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (76 sloc) 2.94 KB
__NAME__ purpose
specify products table columns containing values for product attributes
__NAME__ missing
improve description based on syntax seen in examples
in the examples, explain mv_sku lookup, not clear now
__NAME__ see also
__NAME__ synopsis
<arg choice='opt'><replaceable>name</replaceable>=</arg><arg choice='plain' rep='repeat'><arg choice='opt'><replaceable>table</replaceable>:</arg><replaceable>column</replaceable><arg choice='opt'>:<replaceable>key</replaceable></arg>
__NAME__ description
The directive specifies names of the product &glos-attribute;s
which should be automatically loaded from table columns.
Table, column and key identifiers belonging to a single specification
are separated by a colon (<literal>:</literal>), while multiple specifications
are separated by whitespace.
In other words,
when an item is added to the shopping cart using &IC;'s routines, the
attributes declared in &conf-AutoModifier; will be set to the values of the
fields in the <database>products</database> database.
This facility will often be employed in determining product
&glos-price;, &glos-discount;, &glos-tax; and &glos-shipping;, and
other custom attributes; these attributes will probably
be used in custom &PERL; code that will scan the electronic
&glos-cart; contents and perform decisions. For example, by defining
columns <database class='field'>heavy</database> and
<database class='field'>downloadable</database>, you will be
able to perform decisions
based on <code>$item-&gt;{heavy}</code> and
<code>$item-&gt;{downloadable}</code> (but there are more access methods,
see the &glos-attribute; &GE;).
<!-- TODO
This one has a bit of "magic" associated. To account for matrix-option
products, the various product tables are searched, for both the item
code and the base SKU associated with the item.
__NAME__ notes
This can useful when doing shipping calculations or in embedded
&PERL; code that works on item attributes.
See &glos-attribute; for a complete introduction to item attributes.
__NAME__ example: Specifying AutoModifier
To set whether an item is defined as "heavy" and requires truck shipment, or
is "downloadable", set:
AutoModifier heavy downloadable
Also make sure to have the
<database class='field'>heavy</database> and
<database class='field'>downloadable</database> columns defined in your
<database>products</database> database.
__NAME__ example: set attribute 'heavy' from table 'inventory'
AutoModifier inventory:heavy
__NAME__ example: set attribute 'weighty' from table 'inventory', column 'heavy'
AutoModifier weighty=inventory:heavy
__NAME__ example: set attribute 'heavy' from table 'inventory', with a different SKU
AutoModifier inventory:heavy:mv_sku
Something went wrong with that request. Please try again.