[docs] xmldocs - heins modified refs/AutoModifier

docs at icdevgroup.org docs at icdevgroup.org
Thu Sep 22 16:05:58 EDT 2005


User:      heins
Date:      2005-09-22 20:05:57 GMT
Modified:  refs     AutoModifier
Log:
* Add docs for AutoModifier changes.

Revision  Changes    Path
1.2       +39 -7     xmldocs/refs/AutoModifier


rev 1.2, prev_rev 1.1
Index: AutoModifier
===================================================================
RCS file: /var/cvs/xmldocs/refs/AutoModifier,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AutoModifier	12 Aug 2005 12:41:51 -0000	1.1
+++ AutoModifier	22 Sep 2005 20:05:57 -0000	1.2
@@ -19,20 +19,20 @@
 
 
 __NAME__ description
-The directive specifies names of the &glos-attribute;s attached to
-your products, for which the value is provided in the equally-named 
-<database>products</database> database column.
+The directive specifies names of the product &glos-attribute;s 
+which should be automatically loaded from a database column.
 </para><para>
 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
-equally-named fields in the <database>products database</database>.
+fields in the <database>products database</database>.
 </para><para>
-As you see, this is mostly useful for internal use and giving your
-code specific hints about the items ordered.
+This facility will often be used in determining pricing, shipping,
+or other custom product attributes. These attributes are usually used
+in custom embedded Perl code which will scan the items in the shopping
+cart and make decisions.
 __END__
 
-
 __NAME__ notes
 This can useful when doing shipping calculations or in embedded
 &PERL; code that works on item attributes.
@@ -50,5 +50,37 @@
 <database class='field'>heavy</database> and 
 <database class='field'>downloadable</database> columns defined in your 
 <database>products</database> database.
+</para><para>
+Example: to set the heavy attribute from the 
+<database class='table'>inventory</database> table with the same
+key as the product code, do:
+<programlisting>
+AutoModifier inventory:heavy
+</programlisting>
+</para><para>
+Example: to set the heavy attribute from the <database
+class='field'>heavy</database> field in the <database
+class='table'>inventory</database> table with the same key as the product
+code, do:
+<programlisting>
+AutoModifier inventory:heavy
+</programlisting>
+</para><para>
+Example: to set the "weighty" attribute from the <database
+class='field'>heavy</database> field in the <database
+class='table'>inventory</database> table with the same key as the product
+code, do:
+<programlisting>
+AutoModifier weighty=inventory:heavy
+</programlisting>
+</para><para>
+Example: to set the heavy attribute from the <database
+class='field'>heavy</database> field in the <database
+class='table'>inventory</database> table with the the 
+base SKU for a variant, do:
+<programlisting>
+AutoModifier inventory:heavy:mv_sku
+</programlisting>
+
 __END__
 








More information about the docs mailing list