![]() |
| > Home > Documentation > Latest documentation > Local config directives > AutoModifier |
|
AutoModifierSpecify columns in the products table that contain product attribute values. Synopsis
ScopeThis 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. DescriptionWhen 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.
ExamplesUsing the products tableDecide whether an item is defined as "heavy" and requires truck shipment:
You will need to ensure that you have a "heavy" column in your ProductFiles table(s). Using a different tableAs above, but set the "heavy" attribute from the inventory table with the same key as the product code:
Mapping a column name to a different attribute nameSame again, but the "weighty" attribute is set from the value of the "heavy" attribute from the inventory table:
Using a different keyTo set the "heavy" attribute from the heavy" column, in the inventory table, with the the base SKU for a variant:
See also
|
| Home | Legal nonsense | Privacy policy | Contact us |