For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

AutoModifier

Specify columns in the products table that contain product attribute values.

Synopsis

AutoModifier  [attrname=][table:]column[:key]

Scope

This directive is only available for use in the local (catalog.cfg) configuration file.  It will not affect any other website in any way.  This directive will not work in the global (interchange.cfg) configuration file. 

Description

When an item is added to the shopping cart, using a standard Interchange method, the attributes declared in AutoModifier will be set to the values of the appropriate column in the ProductFiles table(s).

If a table is specified then the declared column will be looked up in that table, otherwise the table(s) declared with the ProductFiles directive will be used.  If a key is specified then it will be used to look up the column value instead of using the product code.  The attribute will be named after the column unless an attrname is specified.

This facility will often be used in determining pricing, shipping or other custom product attributes.  These attributes may be used in custom Perl code which can scan the items in the cart to make decisions.

Warning

Warning

Interchange reserves some item attribute names for internal use and cannot be used as modifiers without the risk of significant side-effects.  Reserved names include "code", "free", "free_message", "group", "item", "quantity" and all words that start with "mv_" or "ic_".

Examples

Using the products table

Decide whether an item is defined as "heavy" and requires truck shipment: 

AutoModifier  heavy

You will need to ensure that you have a "heavy" column in your ProductFiles table(s).

Using a different table

As above, but set the "heavy" attribute from the inventory table with the same key as the product code: 

AutoModifier inventory:heavy

Mapping a column name to a different attribute name

Same again, but the "weighty" attribute is set from the value of the "heavy" attribute from the inventory table: 

AutoModifier weighty=inventory:heavy

Using a different key

To set the "heavy" attribute from the heavy" column, in the inventory table, with the the base SKU for a variant: 

AutoModifier inventory:heavy:mv_sku

See also

Category:  Local config directives
Last modified by: Kevin Walsh
Modification date: Saturday 15 September 2007 at 10:42 PM (EDT)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us