[docs] xmldocs - docelic modified 17 files

docs at icdevgroup.org docs at icdevgroup.org
Mon Jan 3 15:42:16 EST 2005


User:      docelic
Date:      2005-01-03 20:42:16 GMT
Modified:  refs     PageDir
Added:     refs     CREATE_COMMAND_MYSQL CREATE_COMMAND_PG CommonAdjust
Added:              DUMP_COMMAND_MYSQL DUMP_COMMAND_PG MV_COUNTRY_FIELD
Added:              MV_COUNTRY_TABLE MV_COUNTRY_TAX_FIELD
Added:              MV_STATE_FIELD MV_STATE_TABLE MV_STATE_TAX_FIELD
Added:              MV_TAX_CATEGORY_FIELD MV_TAX_TYPE_FIELD TAXAREA
Added:              TAXRATE TAXSHIPPING
Log:
Wow wow! All nice and properly documented !

Revision  Changes    Path
1.2       +1 -1      xmldocs/refs/PageDir


rev 1.2, prev_rev 1.1
Index: PageDir
===================================================================
RCS file: /var/cvs/xmldocs/refs/PageDir,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PageDir	17 Dec 2004 22:02:52 -0000	1.1
+++ PageDir	3 Jan 2005 20:42:16 -0000	1.2
@@ -13,7 +13,7 @@
 __NAME__ description
 Specify the directory containing catalog pages.
 </para><para>
-This directive can be set in &locale; settings to allow different page
+This directive can be set in &glos-locale; settings to allow different page
 sets for different locales.
 __END__
 



1.1                  xmldocs/refs/CREATE_COMMAND_MYSQL


rev 1.1, prev_rev 1.0
Index: CREATE_COMMAND_MYSQL
===================================================================

__NAME__ purpose
specify shell command to use in order to create database under MySQL
__END__

__NAME__ default
<literal>mysqladmin create %s</literal>
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain'><replaceable>command line</replaceable></arg>
</group>
__END__

__NAME__ description
Specify shell command that will be invoked to create a database
under &MYSQL;.
</para><para>
<!-- TODO first, or all occurences of %s ? -->
An occurence of <literal>%s</literal> is replaced with the database
name prior to command execution.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable CREATE_COMMAND_MYSQL /usr/bin/mysqladmin create %s
</programlisting>
__END__




1.1                  xmldocs/refs/CREATE_COMMAND_PG


rev 1.1, prev_rev 1.0
Index: CREATE_COMMAND_PG
===================================================================

__NAME__ purpose
specify shell command to use in order to create database under Postgres
__END__

__NAME__ default
<literal>createdb %s</literal>
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain'><replaceable>command line</replaceable></arg>
</group>
__END__

__NAME__ description
Specify shell command that will be invoked to create a database
under &PGSQL;.
</para><para>
<!-- TODO first, or all occurences of %s ? -->
An occurence of <literal>%s</literal> is replaced with the database
name prior to command execution.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable CREATE_COMMAND_PG /usr/bin/createdb %s
</programlisting>
__END__




1.1                  xmldocs/refs/CommonAdjust


rev 1.1, prev_rev 1.0
Index: CommonAdjust
===================================================================
<para>
A flexible, chained pricing scheme is available when &conf-CommonAdjust;
directive is set up.
</para>

__NAME__ purpose
define default settings for a flexible, chained item pricing scheme
__END__

__NAME__ see also
UseModifier
__END__


__NAME__ synopsis
<group choice='req'>
	<arg choice='plain'><literal><replaceable>&CAs;</replaceable></literal></arg>
</group>
__END__


__NAME__ description
&conf-CommonAdjust; is used to define the default settings for a flexible,
chained item pricing scheme.
</para><para>
The whole pricing idea and the explanation of &CAs;s can be found under the
&glos-price; entry in the glossary. Make sure you read it, or you'll have only
a limited success with <xref linkend="CommonAdjust_examples"/>.
__END__


__NAME__ example: The pricing database
Most of the practical setups will use a separate (<emphasis>outboard</emphasis>)
database to define pricing-related options. This <emphasis>could</emphasis>
be all done in the <database>products</database> database as well, but let's
stick to a visually cleaner implementation.
</para><para>
An example <database>pricing</database> database looks like this:

<programlisting>
<xi:include parse='text' href='../files/pricing/pricing.txt'/>
</programlisting>
__END__

__NAME__ missing
Say that in the examples, attribute names are arbitrary and that they should see price glossary entry for description of commonadjust strings and atoms.
__END__

__NAME__ example: Adjusting item price based on size
Let's say we had a product, a t-shirt for example, and we wanted to define
a pricing adjustment based on product's <literal>size</literal> attribute. The
<database class='field'>price</database> field in the
<database>products</database> database should have the following value
to achieve the effect:

<programlisting>
10.00, ==size:pricing
</programlisting>

You see, the base price of <literal>10.00</literal> will be adjusted
according to the <literal>size</literal> attribute. If we had a t-shirt
with &glos-SKU; <literal>99-102</literal> and size <literal>XL</literal>,
then an ammount of <literal>1.00</literal> would be added and form a total
price of <literal>11.00</literal> (according to the
<database>pricing</database> table above). The same product in size
<literal>S</literal> (small) would have a "bonus" of <literal>-0.50</literal>
and result in <literal>9.50</literal> total. For any other size, the base
price would stay <emphasis>as-is</emphasis> because no matching column 
would be found in <database>pricing</database>.
</para><para>
If we entered the above price specified in the
<database class='field'>price</database> field for item
<literal>00-343</literal>, then an adjustment of <literal>+2</literal> would
be made only for size variant <literal>XL</literal>.
__END__


__NAME__ example: Adjusting item price based on size and color
Let's say we had a t-shirt from previous example, and we wanted to define
a pricing adjustment based on color attribute (in addition to size which we
already implemented). The
<database class='field'>price</database> field in the
<database>products</database> database should have the following value
to achieve the effect:

<programlisting>
10.00, ==size:pricing, ==color:pricing
</programlisting>

You see, the base price of <literal>10.00</literal> will be adjusted
according to both <literal>size</literal> and <literal>color</literal>
attributes. For item SKU <literal>99-102</literal>, additional 
<literal>0.75</literal> would be added for a specific <literal>red</literal>
color (according to the <database>pricing</database> table above).
__END__


__NAME__ example: Adjusting item attributes based on a common column
Let's say we had a bunch of t-shirt products and the <literal>red</literal>
color always added an additional <literal>0.75</literal> to the corresponding
base price.
</para><para>
What we know by now is that to achieve that effect, we could create a column
named <literal>red</literal> in the <database>pricing</database> database.
In the same database, we would then add an entry for all t-shirt items
and put a value of <literal>0.75</literal> in the
<database class='field'>red</database> field. This approach, however, 
is error-prone and of linear complexity &mdash; more t-shirt models you have,
more work is needed to catalog them properly.
</para><para>
The solution to this problem is elegant. Instead of defining the 
<database class='field'>red</database> column, define one column of a 
common name (<literal>common</literal> itself is one good name for that
column), and add <literal>red</literal> as an entry in the database.
Refer to the first example in which we show a sample
<database>pricing</database> database and where we did that (in the last row).
You can then instruct &IC; to search for a row in the table with item color
as key. Here's how to modify the previous example:

<programlisting>
10.00, ==size:pricing, ==color:pricing:common
</programlisting>

What's more, if you ever wanted to define an adjustment for another color,
the only thing you'd have to do would be to add one entry in the
<database>pricing</database> database:

<programlisting>
blue	0.50
</programlisting>
__END__


__NAME__ example: Adjusting item price based on quantity
The &glos-price; glossary entry explained the format of &CAs;s.
To enable quantity based pricing, we need to name the columns that
will participate in the process (remember, numerical portions of the 
column names denote minimal quantity levels). Just in case, we can also
specify a default price which will be applied
<emphasis role='bold'>only if</emphasis> the lookup in the 
<database>pricing</database> database returns blank or zero value.
In this example, 
after the base price gets determined based on quantity, the size and 
color attributes will proceed with further price adjustment as usual:
</para><para>

<programlisting>
pricing:q1,q5,q10:, ;10.00, ==size:pricing, ==color:pricing:common
</programlisting>

In the above example, the product (a t-shirt in our example) with SKU
<literal>99-102</literal> would have a base price of
<literal>8.00</literal> each, if ordered in quantity of 10 or more
(again, according to the <database>pricing</database> table from the 
beginning of <xref linkend="CommonAdjust_examples"/>).
__END__


__NAME__ example: Terminating the price adjustment chain
Let's say we defined a fallback price (the same way as in the example above),
and wanted to terminate the pricing chain (skip any further adjustments 
&mdash; size- and color-based adjustment in our case) if the fallback price
was applied. The code needed looks <emphasis>almost</emphasis> the same
as above, except that the colon (<literal>,</literal>) does
<emphasis role='bold'>not</emphasis> follow the fallback price:
</para><para>

<programlisting>
pricing:q1,q5,q10:, ;10.00  ==size:pricing, ==color:pricing:common
</programlisting>

In the above example, the product (a t-shirt in our example) with SKU
<literal>99-102</literal> would have a base price of
<literal>8.00</literal> each, if ordered in quantity of 10 or more
(again, according to the <database>pricing</database> table from the 
beginning of <xref linkend="CommonAdjust_examples"/>).
__END__



CommonAdjust    pricing:q2,q5,q10,q25, ;products:price, ==size:pricing





1.1                  xmldocs/refs/DUMP_COMMAND_MYSQL


rev 1.1, prev_rev 1.0
Index: DUMP_COMMAND_MYSQL
===================================================================

__NAME__ purpose
specify shell command to use in order to dump MySQL databases
__END__

__NAME__ missing
Why is no %s here as in CREATE_COMMAND_MYSQL ?
__END__


__NAME__ default
<literal>mysqldump --add-drop-table</literal>
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain'><replaceable>command line</replaceable></arg>
</group>
__END__

__NAME__ description
Specify shell command that will be invoked to dump a database
under &MYSQL;.
</para><para>
<!-- TODO first, or all occurences of %s ?
An occurence of <literal>%s</literal> is replaced with the database
name prior to command execution.
-->
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable DUMP_COMMAND_MYSQL /usr/bin/mysqldump --add-drop-table
</programlisting>
__END__




1.1                  xmldocs/refs/DUMP_COMMAND_PG


rev 1.1, prev_rev 1.0
Index: DUMP_COMMAND_PG
===================================================================

__NAME__ purpose
specify shell command to use in order to dump Postgres databases
__END__

__NAME__ missing
Why is no %s here as in CREATE_COMMAND_PG ?
__END__


__NAME__ default
<literal>pg_dump -c -O</literal>
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain'><replaceable>command line</replaceable></arg>
</group>
__END__

__NAME__ description
Specify shell command that will be invoked to dump a database
under &PGSQL;.
</para><para>
<!-- TODO first, or all occurences of %s ?
An occurence of <literal>%s</literal> is replaced with the database
name prior to command execution.
-->
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable DUMP_COMMAND_PG /usr/bin/pg_dump -c -O
</programlisting>
__END__




1.1                  xmldocs/refs/MV_COUNTRY_FIELD


rev 1.1, prev_rev 1.0
Index: MV_COUNTRY_FIELD
===================================================================

__NAME__ purpose
name of form field whose value will be used as key to perform lookup in the MV_COUNTRY_TABLE
__END__

__NAME__ default
<literal>country</literal>
__END__

__NAME__ see also
MV_STATE_FIELD
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>field</replaceable></arg>
</group>
__END__

__NAME__ description
Form field whose value will be used as the key to perform lookup in the 
&var-MV_COUNTRY_TABLE; database.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable MV_COUNTRY_FIELD  country
</programlisting>
__END__




1.1                  xmldocs/refs/MV_COUNTRY_TABLE


rev 1.1, prev_rev 1.0
Index: MV_COUNTRY_TABLE
===================================================================

__NAME__ purpose
name of database containing countries, country codes, etc.
__END__

__NAME__ default
<literal>country</literal>
__END__

__NAME__ see also
MV_STATE_TABLE
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>database</replaceable></arg>
</group>
__END__

__NAME__ description
Table to search for country-related information, such as selector and ISO
names or shipping methods available.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable MV_COUNTRY_TABLE  country
</programlisting>
__END__




1.1                  xmldocs/refs/MV_COUNTRY_TAX_FIELD


rev 1.1, prev_rev 1.0
Index: MV_COUNTRY_TAX_FIELD
===================================================================

__NAME__ purpose
name of column containing country-wide tax information
__END__

__NAME__ default
<literal>tax</literal>
__END__

__NAME__ see also
MV_STATE_TAX_FIELD,MV_TAX_TYPE_FIELD,MV_TAX_CATEGORY_FIELD
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>column</replaceable></arg>
</group>
__END__

__NAME__ description
Column name in the &var-MV_COUNTRY_TABLE; database that will be looked up
to retrieve country-wide tax information.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable MV_COUNTRY_FIELD  tax
</programlisting>
__END__




1.1                  xmldocs/refs/MV_STATE_FIELD


rev 1.1, prev_rev 1.0
Index: MV_STATE_FIELD
===================================================================

__NAME__ purpose
name of form field whose value will be used as key to perform lookup in the MV_STATE_TABLE
__END__

__NAME__ default
<literal>state</literal>
__END__

__NAME__ see also
MV_STATE_FIELD,MV_COUNTRY_FIELD
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>field</replaceable></arg>
</group>
__END__

__NAME__ description
Form field whose value will be used as the key to perform lookup in the 
&var-MV_STATE_TABLE; database.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable MV_STATE_FIELD  state
</programlisting>
__END__




1.1                  xmldocs/refs/MV_STATE_TABLE


rev 1.1, prev_rev 1.0
Index: MV_STATE_TABLE
===================================================================

__NAME__ purpose
name of database containing state, country and province information
__END__

__NAME__ default
<literal>state</literal>
__END__

__NAME__ see also
MV_STATE_TABLE,MV_COUNTRY_TABLE
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>database</replaceable></arg>
</group>
__END__

__NAME__ description
Table to search for state-related information, such as state names, postcodes,
tax rates and shipping methods available.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable MV_STATE_TABLE  state
</programlisting>
__END__




1.1                  xmldocs/refs/MV_STATE_TAX_FIELD


rev 1.1, prev_rev 1.0
Index: MV_STATE_TAX_FIELD
===================================================================

__NAME__ purpose
name of column containing state-wide tax information
__END__

__NAME__ default
<literal>tax</literal>
__END__

__NAME__ see also
MV_STATE_TAX_FIELD,MV_TAX_TYPE_FIELD,MV_TAX_CATEGORY_FIELD
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>column</replaceable></arg>
</group>
__END__

__NAME__ description
Column name in the &var-MV_STATE_TABLE; database that will be looked up
to retrieve state-wide tax information.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable MV_STATE_FIELD  tax
</programlisting>
__END__




1.1                  xmldocs/refs/MV_TAX_CATEGORY_FIELD


rev 1.1, prev_rev 1.0
Index: MV_TAX_CATEGORY_FIELD
===================================================================

__NAME__ purpose
name of column containing enumerated tax types, based on product category
__END__

__NAME__ default
<literal>tax_category</literal>
__END__

__NAME__ see also
MV_STATE_TABLE,MV_COUNTRY_TABLE,MV_TAX_TYPE_FIELD
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>column</replaceable></arg>
</group>
__END__

__NAME__ description
Name of the column whose value will be retrieved in search of tax type
applied to the specific product group.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable MV_TAX_CATEGORY_FIELD tax_category
</programlisting>
__END__




1.1                  xmldocs/refs/MV_TAX_TYPE_FIELD


rev 1.1, prev_rev 1.0
Index: MV_TAX_TYPE_FIELD
===================================================================

__NAME__ purpose
name of column containing enumerated tax names
__END__

__NAME__ default
<literal>tax_name</literal>
__END__

__NAME__ see also
MV_STATE_TABLE,MV_COUNTRY_TABLE
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>column</replaceable></arg>
</group>
__END__

__NAME__ description
Name of the column whose value will be retrieved in search of symbolic tax 
name.
__END__

__NAME__ example: 
Put the following in &ccf;:
<programlisting>
Variable MV_TAX_TYPE_FIELD tax_name
</programlisting>
__END__




1.1                  xmldocs/refs/TAXAREA


rev 1.1, prev_rev 1.0
Index: TAXAREA
===================================================================

__NAME__ purpose
list of geographical identifiers for which taxing is applied
__END__

__NAME__ default
none
__END__

__NAME__ see also
TAXAREA,TAXSHIPPING,TAXHANDLING,TAXCOUNTRY
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>area name</replaceable></arg>
</group>
__END__

__NAME__ description
A space- or comma-separated list of codes to which taxing will be
applied. This is used in conjunction with the FlyTax taxing method.
</para><para>
This variable is not needed for anything related to actual calculation,
it is just used to build the UI list of gepgraphical regions (states, counties
or similar) to tax.
__END__

__NAME__ example: 
<programlisting>
</programlisting>
__END__




1.1                  xmldocs/refs/TAXRATE


rev 1.1, prev_rev 1.0
Index: TAXRATE
===================================================================

__NAME__ purpose
key=value pairs used for taxing calculation
__END__

__NAME__ default
none
__END__

__NAME__ see also
TAXAREA,TAXSHIPPING,TAXHANDLING,TAXCOUNTRY
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>area</replaceable>=<replaceable>value</replaceable></arg>
</group>
__END__

__NAME__ missing
does it have to be 2-letter area name or ?
__END__

__NAME__ description
An accessory-list style of values (key/value pairs) defining areas and
corresponding tax values.
</para><para>
This is used in conjunction with the FlyTax taxing method.
__END__

__NAME__ example: 
<programlisting>
IL=7.25, NV=5.5
</programlisting>
__END__




1.1                  xmldocs/refs/TAXSHIPPING


rev 1.1, prev_rev 1.0
Index: TAXSHIPPING
===================================================================

__NAME__ purpose
list of geographical identifiers for which taxing is applied
__END__

__NAME__ default
none
__END__

__NAME__ see also
TAXAREA,TAXSHIPPING,TAXHANDLING,TAXCOUNTRY
__END__

__NAME__ synopsis
<group choice='req'>
	<arg choice='plain' rep='repeat'><replaceable>area name</replaceable></arg>
</group>
__END__

__NAME__ description
A space- or comma-separated list of codes for which shipping is taxed
and needs to be applied.
This is used in conjunction with the FlyTax taxing method.
__END__

__NAME__ example: 
<programlisting>
NV, IL
</programlisting>
__END__









More information about the docs mailing list