NAME
AxKit::XSP::Handel::Order - AxKit XSP Order Taglib
SYNOPSIS
Add this taglib to AxKit in your http.conf or .htaccess:
AxAddXSPTaglib AxKit::XSP::Handel::Order
Add the namespace to your XSP file and use the tags:
<xsp:page
language="Perl"
xmlns:xsp="http://apache.org/xsp/core/v1"
xmlns:order="http://today.icantfocus.com/CPAN/AxKit/XSP/Handel/Order"
>
<order:order type="1">
<order:filter name="id"><request:idparam/></order:filter>
<order:results>
<order>
<id><order:id/></id>
<billto>
<firstname><order:billtofirstname/></firstname>
...
</billto>
<shipto>
<firstname><order:shiptofirstname/></firstname>
...
</shipto>
<total><order:total/></total>
<subtotal><order:subtotal/></subtotal>
<order:items>
<order:results>
<item>
<sku><order:sku/></sku>
<description><order:description/></description>
<quantity><order:quantity/></quantity>
<price><order:price/></price>
<total><order:total/></total>
</item>
</order:results>
</order:no-results>
<message>There are currently no items in your order.</message>
</order:no-results>
</order:items>
</order>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
DESCRIPTION
This tag library provides an interface to use Handel::Order
inside of your AxKit XSP pages.
TAG HIERARCHY
<order:uuid/>
<order:new process="0|1" cart|id|shopper|type|number|created|updated|comments|shipmethod|
shipping|handling|tax|subtotal|total|
billtofirstname|billtolastname|billtoaddress1|billtoaddress2|
billtoaddress3|billtocity|billtostate|billtozip|
billtocountry|billtodayphone|billtonightphone|billtofax|
billtoemail|shiptosameasbillto|
shiptofirstname|shiptolastname|shiptoaddress1|shiptoaddress2|
shiptoaddress3|shiptocity|shiptostate|shiptozip|
shiptocountry|shiptodayphone|shiptonightphone|shiptofax|
shiptoemail="value"...>
<order:cart description|id|name|shopper|type="value">
<order:filter name="description|id|name|shopper|type">value</order:filter>
</order:cart>
<order:id>value</order:id>
<order:shopper>value</order:shopper>
<order:type>value</order:type>
<order:number>value</order:number>
<order:created>value</order:created>
<order:updated>value</order:updated>
<order:comments>value</order:comments>
<order:shipmethod>value</order:shipmethod>
<order:shipping>value</order:shipping>
<order:handling>value</order:handling>
<order:tax>value</order:tax>
<order:subtotal>value</order:subtotal>
<order:total>value</order:total>
<order:billtofirstname>value</order:billtofirstname>
<order:billtolastname>value</order:billtolastname>
<order:billtoaddress1>value</order:billtoaddress1>
<order:billtoaddress2>value</order:billtoaddress2>
<order:billtoaddress3>value</order:billtoaddress3>
<order:billtocity>value</order:billtocity>
<order:billtostate>value</order:billtostate>
<order:billtozip>value</order:billtozip>
<order:billtocountry>value</order:billtocountry>
<order:billtodayphone>value</order:billtodayphone>
<order:billtonightphone>value</order:billtonightphone>
<order:billtofax>value</order:billtofax>
<order:billtoemail>value</order:billtoemail>
<order:shiptosameasbillto>value</order:shiptosameasbillto>
<order:shiptofirstname>value</order:shiptofirstname>
<order:shiptolastname>value</order:shiptolastname>
<order:shiptoaddress1>value</order:shiptoaddress1>
<order:shiptoaddress2>value</order:shiptoaddress2>
<order:shiptoaddress3>value</order:shiptoaddress3>
<order:shiptocity>value</order:shiptocity>
<order:shiptostate>value</order:shiptostate>
<order:shiptozip>value</order:shiptozip>
<order:shiptocountry>value</order:shiptocountry>
<order:shiptodayphone>value</order:shiptodayphone>
<order:shiptonightphone>value</order:shiptonightphone>
<order:shiptofax>value</order:shiptofax>
<order:shiptoemail>value</order:shiptoemail>
<order:results>
<order:id>value</order:id>
<order:shopper>value</order:shopper>
<order:type>value</order:type>
<order:number>value</order:number>
<order:created>value</order:created>
<order:updated>value</order:updated>
<order:comments>value</order:comments>
<order:shipmethod>value</order:shipmethod>
<order:shipping
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:handling
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:tax
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:subtotal
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:total
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:billtofirstname>value</order:billtofirstname>
<order:billtolastname>value</order:billtolastname>
<order:billtoaddress1>value</order:billtoaddress1>
<order:billtoaddress2>value</order:billtoaddress2>
<order:billtoaddress3>value</order:billtoaddress3>
<order:billtocity>value</order:billtocity>
<order:billtostate>value</order:billtostate>
<order:billtozip>value</order:billtozip>
<order:billtocountry>value</order:billtocountry>
<order:billtodayphone>value</order:billtodayphone>
<order:billtonightphone>value</order:billtonightphone>
<order:billtofax>value</order:billtofax>
<order:billtoemail>value</order:billtoemail>
<order:shiptosameasbillto>value</order:shiptosameasbillto>
<order:shiptofirstname>value</order:shiptofirstname>
<order:shiptolastname>value</order:shiptolastname>
<order:shiptoaddress1>value</order:shiptoaddress1>
<order:shiptoaddress2>value</order:shiptoaddress2>
<order:shiptoaddress3>value</order:shiptoaddress3>
<order:shiptocity>value</order:shiptocity>
<order:shiptostate>value</order:shiptostate>
<order:shiptozip>value</order:shiptozip>
<order:shiptocountry>value</order:shiptocountry>
<order:shiptodayphone>value</order:shiptodayphone>
<order:shiptonightphone>value</order:shiptonightphone>
<order:shiptofax>value</order:shiptofax>
<order:shiptoemail>value</order:shiptoemail>
<order:add id|sku|quantity|price|description|total="value"...>
<order:description>value</order:description>
<order:id>value</order:id>
<order:sku>value</order:sku>
<order:quantity>value</order:quantity>
<order:price>value</order:price>
<order:total>value</order:total>
<order:results>
<order:description/>
<order:id/>
<order:price
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:quantity/>
<order:sku/>
<order:total
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
</order:results>
<order:no-results>
...
</order:no-results>
</order:add>
</order:results>
<order:no-results>
...
<order:no-results>
</order:new>
<order:order(s) id|shopper|type|number|created|updated|comments|shipmethod|
shipping|handling|tax|subtotal|total|
billtofirstname|billtolastname|billtoaddress1|billtoaddress2|
billtoaddress3|billtocity|billtostate|billtozip|
billtocountry|billtodayphone|billtonightphone|billtofax|
billtoemail|shiptosameasbillto|
shiptofirstname|shiptolastname|shiptoaddress1|shiptoaddress2|
shiptoaddress3|shiptocity|shiptostate|shiptozip|
shiptocountry|shiptodayphone|shiptonightphone|shiptofax|
shiptoemail="value"...>
<order:filter name="id|shopper|type|number|created|updated|comments|shipmethod|
shipping|handling|tax|subtotal|total|
billtofirstname|billtolastname|billtoaddress1|billtoaddress2|
billtoaddress3|billtocity|billtostate|billtozip|
billtocountry|billtodayphone|billtonightphone|billtofax|
billtoemail|shiptosameasbillto|
shiptofirstname|shiptolastname|shiptoaddress1|shiptoaddress2|
shiptoaddress3|shiptocity|shiptostate|shiptozip|
shiptocountry|shiptodayphone|shiptonightphone|shiptofax|
shiptoemail">value</order:filter>
<order:results>
<order:add description|id|price|quantity|sku|total="value"...>
<order:description>value</order:description>
<order:id>value</order:id>
<order:price>value</order:price>
<order:quantity>value</order:quantity>
<order:sku>value</order:sku>
<order:total></order:total>
<order:results>
<order:description/>
<order:id/>
<order:price
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:quantity/>
<order:sku/>
<order:total
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
</order:results>
</order:no-results>
...
</order:no-results>
</order:add>
<order:clear/>
<order:count/>
<order:delete description|id|price|quantity|sku|total="value"...>
<order:description>value</order:description>
<order:id>value</order:id>
<order:price>value</order:price>
<order:quantity>value</order:quantity>
<order:sku>value</order:sku>
<order:total>value</order:total>
</order:delete>
<order:description/>
<order:id/>
<order:item(s) description|id|price|quantity|sku|total="value"...>
<order:filter name="description|id|price|quantity|sku|total">value</order:filter>
<order:results>
<order:description/>
<order:id/>
<order:price
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:quantity/>
<order:sku/>
<order:total
format="0|1"
code="USD|CAD|..."
options="FMT_STANDARD|FMT_NAME|..."
convert="0|1"
from="USD|CAD|..."
to="CAD|JPY|..."
/>
<order:update>
<order:description>value</order:description>
<order:price>value</order:price>
<order:quantity>value</order:quantity>
<order:sku>value</order:sku>
<order:total>value</order:total>
</order:update>
</order:results>
<order:no-results>
...
</order:no-results>
</order:item(s)>
<order:update>
<order:shopper>value</order:shopper>
<order:type>value</order:type>
<order:number>value</order:number>
<order:created>value</order:created>
<order:updated>value</order:updated>
<order:comments>value</order:comments>
<order:shipmethod>value</order:shipmethod>
<order:shipping>value</order:shipping>
<order:handling>value</order:handling>
<order:tax>value</order:tax>
<order:subtotal>value</order:subtotal>
<order:total>value</order:total>
<order:billtofirstname>value</order:billtofirstname>
<order:billtolastname>value</order:billtolastname>
<order:billtoaddress1>value</order:billtoaddress1>
<order:billtoaddress2>value</order:billtoaddress2>
<order:billtoaddress3>value</order:billtoaddress3>
<order:billtocity>value</order:billtocity>
<order:billtostate>value</order:billtostate>
<order:billtozip>value</order:billtozip>
<order:billtocountry>value</order:billtocountry>
<order:billtodayphone>value</order:billtodayphone>
<order:billtonightphone>value</order:billtonightphone>
<order:billtofax>value</order:billtofax>
<order:billtoemail>value</order:billtoemail>
<order:shiptosameasbillto>value</order:shiptosameasbillto>
<order:shiptofirstname>value</order:shiptofirstname>
<order:shiptolastname>value</order:shiptolastname>
<order:shiptoaddress1>value</order:shiptoaddress1>
<order:shiptoaddress2>value</order:shiptoaddress2>
<order:shiptoaddress3>value</order:shiptoaddress3>
<order:shiptocity>value</order:shiptocity>
<order:shiptostate>value</order:shiptostate>
<order:shiptozip>value</order:shiptozip>
<order:shiptocountry>value</order:shiptocountry>
<order:shiptodayphone>value</order:shiptodayphone>
<order:shiptonightphone>value</order:shiptonightphone>
<order:shiptofax>value</order:shiptofax>
<order:shiptoemail>value</order:shiptoemail>
</order:update>
</order:results>
<order:no-results>
...
</order:no-results>
</order:order(s)>
TAG REFERENCE
<order:add>
Adds an a item to the current order. You can specify the item properties as attributes in the tag itself:
<order:add
description="My New Part"
id="11111111-1111-1111-1111-111111111111"
sku="1234"
quantity="1"
price="1.23"
total="1.23"
/>
or you can add them as child elements:
<order:add>
<order:description>My New Part</order:description>
<order:id>11111111-1111-1111-1111-111111111111</order:id>
<order:sku>1234</order:sku>
<order:quantity>1</order:quantity>
<order:price>1.23</order:price>
<order:total>1.23</order:total>
</order:add>
or any combination of the two:
<order:add quantity="1">
<order:description>My New Part</order:description>
<order:id>11111111-1111-1111-1111-111111111111</order:id>
<order:sku>1234</order:sku>
<order:price>1.23</order:price>
<order:total>1.23</order:total>
</order:add>
This tag is only valid within the <order:results>
block for order
and orders
. See Handel::Order
for more information about adding parts to the order.
You can also access the newly added item using the <order:results>
.
<order:billtofirstname>
Context aware tag that gets or sets the bill to address first name.
<order:billtolastname>
Context aware tag that gets or sets the bill to address last name.
<order:billtoaddress1>
Context aware tag that gets or sets the bill to address line 1.
<order:billtoaddress2>
Context aware tag that gets or sets the bill to address line 2.
<order:billtoaddress3>
Context aware tag that gets or sets the bill to address line 3.
<order:billtocity>
Context aware tag that gets or sets the bill to address city.
<order:billtostate>
Context aware tag that gets or sets the bill to address state.
<order:billtozip>
Context aware tag that gets or sets the bill to address zip or postal code.
<order:billtocountry>
Context aware tag that gets or sets the bill to address country.
<order:billtodayphone>
Context aware tag that gets or sets the bill to address date time phone number.
<order:billtonightphone>
Context aware tag that gets or sets the bill to address night time phone number.
<order:billtofax>
Context aware tag that gets or sets the bill to address fax number.
<order:billtoemail>
Context aware tag that gets or sets the bill to email address.
<order:clear>
Deletes all items in the current order.
<order:order type="0">
<order:filter name="shopper">11111111-1111-1111-1111-111111111111</order:filter>
<order:results>
<order:clear/>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
<order:comments>
Context aware tag that gets or sets the orders comments.
<order:count>
Returns the number of items in the current order.
<order:order>
<order:results>
<order>
<id><order:id/></id>
<subtotal><order:subtotal/></subtotal>
<count><order:count/></count>
</order>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
<order:created>
Context aware tag that gets or sets the order creation date.
<order:description>
Context aware tag to get or set the description of various other parent tags. Within <order:add>
or <order:update>
it sets the current order items description:
<order:order>
<order:results>
<order:add>
<order:description>My New SKU Description</order:description>
</order:add>
<order:item sku="1234">
<order:results>
<description><order:description/></description>
<order:update>
<order:description>My Updated SKU Description</order:description>
<order:update>
</order:results>
<order:no-results>
<message>The order item could not be found for updating</message>
</order:no-results>
<order:item>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
<order:filter>
Adds a new name/value pair to the filter used in <order:order>
, <order:orders>
, <order:delete>
, <order:item>
, <order:cart<gt
>, and <order:items>
. Pass the name of the pair in the name
attribute and the value between the start and end filter tags:
<order:order type="0">
<order:filter name="id">12345678-9098-7654-3212-345678909876</order:filter>
<order:results>
<order:delete>
<order:filter name="sku">sku1234</order:filter>
<order:delete>
</order:results>
<order:no-results>
<message>The order item could not be found for deletion</message>
</order:no-results>
</order:order>
If the same attribute is specified in a filter, the child filter tag value takes precedence over the parent tags attribute.
<order:order type="0">
<!-- type == 0 -->
<order:filter name="type">1</order:filter>
<!-- type == 1 -->
</order:order>
You can supply as many filter
s as needed to get the job done.
<order:order>
<order:filter name="type">0</order:filter>
<order:filter name="shopper">12345678-9098-7654-3212-345678909876</order:filter>
</order:order>
<order:handling>
Context aware tag the gets or sets the handling charge for this order.
<order:id>
Context aware tag to get or set the record id within various other tags. In <order:order>
and <order:item>
it returns the record id for the object:
<order:order>
<order:results>
<id><order:id/></id>
<order:items>
<order:order:results>
<item>
<id><order:id/></id>
</item>
</order:results>
</order:items>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
Within <order:add>
, <order:delete>
, and <order:new>
it sets the id value used in the operation specified:
<order:order>
<order:results>
<order:delete>
<order:id>11111111-1111-1111-1111-111111111111</order:id>
</order:delete>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
...
<order:new>
<order:id>11112222-3333-4444-5555-6666777788889999</order:id>
<order:name>New Cart</order:name>
</order:new>
It cannot be used within <order:update>
and will return a Handel::Exception::Taglib
exception if you try updating the record ids which are the primary keys.
<order:items>
Loops through all items in the current order:
<order:order>
<order:results>
<order>
<order:items>
<order:results>
<item>
<sku><order:sku/></sku>
<description><order:description/></order:description>
<name><order:name/></name>
<quantity><order:quantity/></quantity>
<price><order:price/></price>
<total><order:total/></total>
</item>
</order:results>
<order:no-results>
<message>Your order is empty</message>
</order:no-results>
</order:items>
<order>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
<order:new>
BREAKING API CHANGE: Starting in version 0.17_04, new no longer automatically creates a checkout process for CHECKOUT_PHASE_INITIALIZE
. The $noprocess
parameter has been renamed to $process
. The have the new order automatically run a checkout process, set $process to 1.
Creates a new order using the supplied attributes and child tags:
<order:new process="0|1" type="1">
<order:id>22222222-2222-2222-2222-222222222222</order:id>
<order:shopper><request:shopper/></order:shopper>
<order:name>New Cart</order:name>
</order:new>
The child tags take precedence over the attributes of the same name. new
must be a top level tag within it's declared namespace. It will throw an Handel::Exception::Taglib
exception otherwise.
When true, the process
attribute forces new to automatically create a checkout process and initialize the current order. See "new" in Handel::Order for more information on the process flag.
<order:number>
Context aware tag that gets or sets the order number.
<order:order>
Container tag for the current order used to load a specific order.
If order
or its filter
s load more than one order, order
will contain only the first order. If you're looking for loop through multiple orders, try <order:orders>
instead.
<order:order type="1">
<order:filter name="id">11111111-1111-1111-1111-111111111111</order:filter>
<order:results>
<order>
<id><order:id/></id>
<billto>
<name><order:billtofirstname/> <order:billtolastname/></name>
...
</billto>
<subtotal><order:subtotal/></subtotal>
<order:items>
...
</order:items>
</order>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
<order:orders>
Loops through all loaded orders.
<order:orders type="1">
<order:filter name="shopper">11111111-1111-1111-1111-111111111111</order:filter>
<order:results>
<order>
<id><order:id/></id>
<created><order:created/></created>
<total><order:subtotal/></total>
<order:items>
...
</order:items>
</order>
</order:results>
<order:no-results>
<message>No orders were found matching your query.</message>
</order:no-results>
</order:orders>
</orders>
<order:price>
Context aware tag to get or set the price of a order item. In <order:add>
and <order:update>
it sets the price:
<order:order>
<order:results>
<order:add>
<order:price>1.24</order:price>
</order:add>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
In <order:item>
or <order:items>
it returns the price for the order item:
<order:order>
<order:results>
<order>
<order:items>
<order:results>
<item>
<price><order:price/></price>
</item>
</order:results>
<order:no-results>
<message>Your shopping order is empty</message>
</order:no-results>
</order:items>
</order>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
Currency Formatting
The currency formatting options from Handel::Currency
are now available within the taglib if Locale::Currency::Format
is installed.
<order:price format="0|1" code="USD|CAD|..." options="FMT_STANDARD|FMT_NAME|..." />
Currency formatting is available for any tag the returns a currency or price like price, total, shipping, handling, tax, etc.
- format
-
Toggle switch that enables or disables currency formatting. If empty, unspecified, or set to 0, no formatting will take place and the result price (usually in decimal form) is returned unaltered.
If
format
is set to anything else, the default formatting will be applied. SeeHandel::Currency
for the default currency formatting settings. - code
-
If formatting is enabled, the
code
attribute specifies the desired three letter ISO currency code to be used when formatting currency. SeeLocale::Currency::Format
for the available codes.If you are also using the currency conversion options below, the value of
to
will always be used first, even ifcode
is not empty. Ifto
is empty andcode
is also empty, theHandelCurrencyCode
configuration setting will be used instead. - options
-
If formatting is enabled, the
options
attribute specifies the desired formatting options to be used when formatting currency. SeeLocale::Currency::Format
for the available options.
Currency Conversion
The currency conversion options from Handel::Currency
are now available within the taglib if Finance::Currency::Convert::WebserviceX
is installed.
<order:price convert="0|1" from="USD|CAD|..." to="CAD|JPY|..." />
Currency conversion is available for any tag the returns a currency or price like price, total, shipping, handling, tax, etc.
- convert
-
Toggle switch that enables or disables currency conversion. If empty, unspecified, or set to 0, no currency conversion will take place and the result price is returned unaltered.
If
convert
is set to anything else, the default conversion will be applied. SeeHandel::Currency
for the default currency conversion settings. - from
-
If conversion is enabled, the
from
attribute specifies the three letter ISO currency code of the price to be converted. If nofrom
is specified, theHandelCurrencyCode
configuration setting will be used instead. SeeLocale::Currency
for the available codes. - to
-
If conversion is enabled, the
to
attribute specifies what the currentprice
should be converted to. If noto
is specified, thecode
attribute from the formatting options above will be used instead. If bothto
andcode
are empty, theHandelCurrencyCode
configuration setting will be used as a last resort.
If you try to convert from and to the same currency, the price
is returned as is.
Precedence
If you are using both the currency conversion and the currency formatting options, the conversion will be performed first, then the result will be formatted.
<order:quantity>
Context aware tag to get or set the quantity of a order item. In <order:add>
and <order:update>
it sets the quantity:
<order:order>
<order:results>
<order:add>
<order:quantity>1.24</order:quantity>
</order:add>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
In <order:item>
or <order:items>
it returns the quantity for the order item:
<order:order>
<order:results>
<order>
<order:items>
<order:results>
<item>
<quantity><order:quantity/></quantity>
</item>
</order:results>
<order:no-results>
<message>The item requested could not be found for updating</message>
</order:no-results>
</order:items>
</order>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
<order:updated>
Context aware tag that gets or sets the order last updated date.
<order:update>
Updates the current order values:
<order:order>
<order:results>
<order:update>
<order:type>ORDER_TYPE_TEMP</order:update>
<order:update>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
<order:id>
is not valid within an update statement.
<order:results>
Contains the results for the current action. both the singular and plural forms are valid for your syntactic sanity:
<order:order>
<order:result>
...
</order:result>
</order:result>
<order:orders>
<order:results>
</order:results>
</order:orders>
<order:no-results>
The anti-results or 'not found' tag. This tag is executed when order
, orders
, item
, or items
fails to find a match for it's filters. As with <order:results>
, both the singular and plural forms are available for your enjoyment:
<order:order>
<order:no-result>
...
</order:no-result>
</order:result>
<order:orders>
<order:no-results>
</order:no-results?
</order:orders>
<order:shiptofirstname>
Context aware tag that gets or sets the ship to address first name.
<order:shiptolastname>
Context aware tag that gets or sets the ship to address last name.
<order:shiptoaddress1>
Context aware tag that gets or sets the ship to address line 1.
<order:shiptoaddress2>
Context aware tag that gets or sets the ship to address line 2.
<order:shiptoaddress3>
Context aware tag that gets or sets the ship to address line 3.
<order:shiptocity>
Context aware tag that gets or sets the ship to address city.
<order:shiptostate>
Context aware tag that gets or sets the ship to address state.
<order:shiptozip>
Context aware tag that gets or sets the ship to address zip or postal code.
<order:shiptocountry>
Context aware tag that gets or sets the ship to address country.
<order:shiptodayphone>
Context aware tag that gets or sets the ship to address date time phone number.
<order:shiptonightphone>
Context aware tag that gets or sets the ship to address night time phone number.
<order:shiptofax>
Context aware tag that gets or sets the ship to address fax number.
<order:shiptoemail>
Context aware tag that gets or sets the ship to email address.
<order:shipmethod>
Context aware tag that gets or sets the selected shipping method.
<order:shipping>
Context aware tag that gets or sets the shipping cost.
<order:shiptosameasbillto>
Context aware tag that gets or sets the flag making the ship to address the same as the bill to address.
<order:shopper>
Context aware tag that gets or sets the shopper id for the current order.
<order:sku>
Context aware tag to get or set the sku of a order item. In <order:add>
and <order:update>
it sets the sku:
<order:order>
<order:results>
<order:add>
<order:sku>sku1234</order:sku>
</order:add>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
In <order:item>
or <order:items>
it returns the sku for the current order item:
<order:order>
<order:results>
<order>
<order:items>
<order:results>
<item>
<sku><order:sku/></sku>
</item>
</order:results>
<order:no-results>
<message>Your shopping order is empty</message>
</order:no-results>
</order:items>
</order>
<order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
<order:subtotal>
Gets or sets the subtotal of the items in the current order:
<order:order>
<order:results>
<subtotal><order:subtotal/></subtotal>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
The currency formatting options from Handel::Currency
are now available within the taglib.
<order:subtotal format="0|1" code="USD|CAD|..." options="FMT_STANDARD|FMT_NAME|..." />
The currency conversion options from Handel::Currency
are now available within the taglib.
<order:subtotal convert="0|1" from="USD|CAD|..." to="CAD|JPY|..." />
See <order:price> above for further details about price formatting.
<order:tax>
Gets or sets the order tax charge.
<order:total>
Gets or sets the total of the current order item:
<order:order>
<order:results>
<order>
<order:items>
<order:results>
<item>
<total><order:total/></total>
</item>
</order:results>
<order:no-results>
<message>Your shopping order is empty</message>
</order:no-results>
</order:items>
</order>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
The currency formatting options from Handel::Currency
are now available within the taglib.
<order:total format="0|1" code="USD|CAD|..." options="FMT_STANDARD|FMT_NAME|..." />
The currency conversion options from Handel::Currency
are now available within the taglib.
<order:total convert="0|1" from="USD|CAD|..." to="CAD|JPY|..." />
See <order:price> above for further details about price formatting.
<order:type>
Context aware tag to get or set the type within various other tags. In <order:order>
or <order:orders>
it returns the type for the object:
<order:order>
<order:results>
<order>
<type><order:type/></type>
</order>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
Within <order:update>
and <order:new>
it sets the type value used in the operation specified:
<order:order>
<order:results>
<order:update>
<order:type>1</order:type>
</order:update>
</order:results>
<order:no-results>
<message>The order requested could not be found.</message>
</order:no-results>
</order:order>
...
<order:new>
<order:type>1</order:type>
</order:new>
<order:uuid/>
This tag returns a new uuid/guid for use in new
and add
in the following format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
For those like me who always type the wrong thing, <order:guid/<gt
> returns the same things as <order:uuid/<gt
>.
AUTHOR
Christopher H. Laco
CPAN ID: CLACO
claco@chrislaco.com
http://today.icantfocus.com/blog/