[interchange-docs] xmldocs - docelic modified 3 files

docs at icdevgroup.org docs at icdevgroup.org
Sun Sep 3 17:26:11 EDT 2006


User:      docelic
Date:      2006-09-03 21:26:10 GMT
Modified:  glossary order price
Modified:  refs     CommonAdjust
Log:
- Incorporated some of the updates sent to me by Mike Heins
  in January this year.

Revision  Changes    Path
1.5       +37 -17    xmldocs/glossary/order


rev 1.5, prev_rev 1.4
Index: order
===================================================================
RCS file: /var/cvs/xmldocs/glossary/order,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- order	15 Jun 2006 22:35:42 -0000	1.4
+++ order	3 Sep 2006 21:26:10 -0000	1.5
@@ -31,12 +31,13 @@
 ]]></programlisting>
 
 <programlisting><![CDATA[
-<input  type="hidden"  name="mv_order_size" value="L">
+    <input type=hidden name=mv_item_option value="size">
+    <input type=hidden name=mv_order_size value="L">
 ]]></programlisting>
 
 If the order is coming from a generated flypage, loop list, or search
 results page, you can get a canned select box from the 
-<code>[item-accessories size]</code> or <code>[item-accessories size]</code> tag. See
+<code>[item-size]</code> or <code>[item-accessories size]</code> tag. See
 <emphasis>Item Attributes</emphasis>.
 </para>
 -->
@@ -114,7 +115,7 @@
 valid product SKU (listed in one of the <database>products</database> tables),
 and is the only required parameter. <arg choice='plain'>href</arg> allows
 some page other than the default basket to be displayed once the item has
-been added to the cart. <arg choice='plain'>cart</arg> selects the shopping
+been added to the cart. <literal>cart</literal> selects the shopping
 cart the item will be placed in (you see, the default cart is called 
 <literal>main</literal>, but &IC; is always a step ahead).
 </para>
@@ -126,7 +127,11 @@
 <programlisting><![CDATA[
 Order a [order TK112]Toaster</a> today!
 Order a [page order TK112]Toaster</a> today!
+
 Order a <a href="[area order TK112]">Toaster</a> today!
+Order a <a href="[area href=order arg=TK112]">Toaster</a> today!
+
+Order a <a href="[area href=order form='mv_order_item=TK112']">Toaster</a> today!
 ]]></programlisting>
 </para>
 <para>
@@ -151,9 +156,13 @@
 ordering schemes. Consider the same ordering example as above (a toaster of
 product SKU <literal>TK112</literal>) implemented using forms:
 
+<!-- 
+	This line is taken out in Mike's update docs
+	<input name="mv_todo"           type="hidden" value="refresh"    />
+-->
 <programlisting><![CDATA[
-<form action="[process]" method="post">
-  <input name="mv_todo"           type="hidden" value="refresh"    />
+<form action="[process href=order]" method="post">
+  [form-session-id]
   <input name="mv_order_item"     type="hidden" value="TK112"      />
   <input name="mv_order_quantity" type="text"   value="1" size="3" /> toasters 
   <input value="Order!"           type="submit"                    />
@@ -188,8 +197,8 @@
 items ("batches") at once:
 
 <programlisting><![CDATA[
-<form action="[process]" method="post">
-  <input name="mv_todo"           type="hidden" value="refresh"          />
+<form action="[process href=order]" method="post">
+  [form-session-id]
   <input name="mv_order_item"     type="hidden" value="TK112"            />
   <input name="mv_order_quantity" type="text"   value="1"       size="3" /> Standard Toaster <br/>
   <input name="mv_order_item"     type="hidden" value="TK200"            />
@@ -210,7 +219,7 @@
 	<title>Items created "on fly"</title>
 
 <para>
-Note that "on fly" items are those that do not exist in any of the 
+Note that "on the fly" items are those that do not exist in any of the 
 <database>products</database> databases, and are literally "put together"
 on the fly. This is unrelated to &IC; &glos-flypage; functionality.
 </para>
@@ -224,13 +233,24 @@
 
 <programlisting><![CDATA[
 <a href="[area form="
-  mv_todo=refresh
   mv_order_item=000101
+  mv_order_quantity=1
   mv_order_fly=description=An on-the-fly item|price=100.01
 "]">Order item 000101</a>
 ]]></programlisting>
-<!-- TODO is SKU an existing SKU, for which you modify values, or we "invent"
-a new item from scratch? -->
+
+Or, through a proper Submit button:
+
+<programlisting><![CDATA[
+<form action="[process href=order]" method="post">
+  [form-session-id]
+  <input type="hidden" name="mv_order_item" value="000101">
+  Qty: <input size="2" name="mv_order_quantity" value="1">
+  <input type="hidden" name="mv_order_fly" value="description=An on-the-fly item|price=100.01">
+  <input type="submit" value="Order button">
+</form>
+]]></programlisting>
+
 
 A lot of things might look weird in the above example, but it is all valid
 &glos-ITL; code.
@@ -328,8 +348,8 @@
 treated as the master item, and all other are sub-items.
 
 <programlisting><![CDATA[
-<form action="[process]"  method="post">
-  <input name="mv_todo"        type="hidden" value="refresh"   />
+<form action="[process href=order]"  method="post">
+  [form-session-id]
   <input name="mv_order_group" type="hidden" value="1"         />
   <input name="mv_order_item"  type="hidden" value="00-0011"   />
   <input name="mv_order_item"  type="hidden" value="00-0011a"  />
@@ -343,8 +363,8 @@
 is defined.
 
 <programlisting><![CDATA[
-<form action="[process]"  method="post">
-  <input name="mv_todo"        type="hidden" value="refresh"   />
+<form action="[process href=order]"  method="post">
+  [form-session-id]
   <input name="mv_order_group" type="hidden" value="1"         />
   <input name="mv_order_item"  type="hidden" value="00-0011"   />
   <input name="mv_order_group" type="hidden" value="0"         />
@@ -483,11 +503,11 @@
 ordering:
 
 <programlisting><![CDATA[
-<form action="[process]" method="post">
+<form action="[process href=order]" method="post">
+  [form-session-id]
   <input name="mv_order_item"     type="checkbox" value="M1212"   /> Item M1212
   <input name="mv_order_quantity" type="text"     value="1"       /> Quantity
   <input name="mv_cartname"       type="hidden"   value="layaway" />
-  <input name="mv_doit"           type="hidden"   value="refresh" />
   <input value="order this item!" type="submit">
 </form>
 ]]></programlisting>



1.4       +16 -9     xmldocs/glossary/price


rev 1.4, prev_rev 1.3
Index: price
===================================================================
RCS file: /var/cvs/xmldocs/glossary/price,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- price	10 Apr 2006 22:14:47 -0000	1.3
+++ price	3 Sep 2006 21:26:10 -0000	1.4
@@ -194,8 +194,8 @@
 	</para><para>
 	A number which is applied as a percentage of the <emphasis>current</emphasis>
 	price value. May be a positive or negative number. For instance,
-	a price of <literal>10</literal> and settor of <literal>-8%</literal> result
-	in new current price of <literal>9.20</literal>.
+	a price of <literal>10.00</literal> and settor of <literal>-8%</literal>
+	result in new current price of <literal>9.20</literal>.
 	</para></listitem>
 
 	<listitem><para>
@@ -253,6 +253,13 @@
 	</para>
 	</warning>
 
+	<para>
+	One excellent extra effect you can achive with this is "mix-and-match".
+	It allows you to order <emphasis>different</emphasis> items which you
+	put into the same "product group" to have their quantities added together
+	to determine the appropriate price range.
+	</para>
+
 	</listitem>
 
 	<listitem><para>
@@ -265,22 +272,22 @@
 	</para></listitem>
 
 	<listitem><para>
-	<emphasis role='bold'>&amp;<replaceable>PERL_CODE</replaceable></emphasis>
+	<emphasis role='bold'>&amp; <replaceable>PERL_CODE</replaceable></emphasis>
 	The leading <literal>&amp;</literal> character is stripped and the PERL_CODE
-	block is passed to the equivalent of a &tag-calc; tag. However, no &IC; tags
-	<!-- TODO tag_data : elaborate how to set it -->
-	can be used in there. Even so, your <function>tag_data</function> routine
+	block is passed to the equivalent of a &tag-calc; tag. No &IC; tags
+	can be used in there, but the  <function>tag_data()</function> function
+	(&tag-data; tag, basically)
 	<emphasis>is</emphasis> available, the <emphasis>current</emphasis> price is
 	available in variable <varname>$s</varname>, and 
 	the current item details (code, quantity, price, and any attributes) are
-	available inside the <varname>$item</varname> hashref. All are found
-	in package <classname>Vend::Interpolate</classname>.
+	available inside the <varname>$item</varname> &glos-hash; reference.
+	All are found in &PERL; package <classname>Vend::Interpolate</classname>.
 	</para>
 	<para>
 	That said,
 
 <programlisting><![CDATA[
-$Vend::Interpolate::item          is the current item
+$Vend::Interpolate::item          is the current item hash reference
 $Vend::Interpolate::item->{code}  gives key for current item
 $Vend::Interpolate::item->{mv_ib} gives database ordered from
 $Vend::Interpolate::item->{...}   gives specified attribute's value



1.3       +19 -0     xmldocs/refs/CommonAdjust


rev 1.3, prev_rev 1.2
Index: CommonAdjust
===================================================================
RCS file: /var/cvs/xmldocs/refs/CommonAdjust,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CommonAdjust	19 Nov 2005 22:37:41 -0000	1.2
+++ CommonAdjust	3 Sep 2006 21:26:10 -0000	1.3
@@ -178,6 +178,25 @@
 
 
 
+__NAME__ example: Using the "mix-and-match" feature
+As mentioned in the &glos-price; glossary entry, you can have quantities
+of different items (but which belong to the same product group) added
+together to determine the appropriate price class.  With a
+<database>pricing</database> table of:
+<programlisting><![CDATA[
+sku      price_group   q5   q10   q25
+os28004  group_a       10     9     8
+os28008  group_a       20    18    17
+]]></programlisting>
+and a &conf-CommonAdjust; setting of:
+<programlisting><![CDATA[
+pricing:price_group,q5,q10,q25
+]]></programlisting>
+the price for six items os28004 would be <literal>9.00</literal> each, and
+the price for three items os28008 would be <literal>18.00</literal> each.
+(No, this is not a mistake in the text, take another look at the description).
+__END__
+
 CommonAdjust    pricing:q2,q5,q10,q25, ;products:price, ==size:pricing
 
 








More information about the docs mailing list