21. Praktische Anwendung <pfx:script> function onJSLoad() { var infobox = new UNOUNO.ajax.InfoBox(); infobox.initInfoBoxMagic(‘info.vodafonepassport.passportId’, [4, 220, 80, 0, -35]); } </pfx:script> <row> <left> <label for=“passportId“ mandatory=“true” /> </left> <right> <info for=“passportId” class=“big” style=“margin-right: 200px;”> Bei deutschen Ausweisen müssen 10 Stallen eingegeben werden <a href=“mustermann.jpg”>(siehe Beispiel)</a> Bei ausländischen kann alles vorkommen. </info> <item type=“multi”> <item class=“inline” maxlength=“10” name=“passportId” size=“10” type=“text” /> <item class=“inline nospace” type=“freetext” noid=“true”> siehe </item> </item> </right> </row>
22.
23.
24.
25.
26.
27.
28. Cart-Templates Use Case: Article in Cart <cart:article-in-cart article= " nis " > ... </cart:article-in-cart> Check whether an Article (NIS) is in Cart. <cart:article-not-in-cart article="nav"> ... </cart:article-not-in-cart> Check whether an Article (NAV) is not in Cart. Use Case: Property in Cart <cart:property-in-cart property="16000"> ... </cart:property-in-cart> Check whether a Property (16000) is in Cart. <cart:property-not-in-cart property="6000"> ... </cart:property-not-in-cart> Check whether a Property (6000) is not in Cart. Use Case: Article available This template is not available in all shops! <cart:article-available variant="old" article="nis"> ... </cart:article-availabel> Check whether an Article (NIS) is available in a variant (old). The variant therefore is optional. <cart:article-not-avaiable article="nav"> ... </cart:article-not-available> Check whether an Article is not available. Use Case: Attribute in Cart <cart:attribute-in-cart attribute="attr" value="val"> ... </cart:attribute-in-cart> Check whether any of the Articles in Cart has an Attribute (attr) with a given value(val).
29. Cart-Templates Use Case: Check Slots <cart:slot-available slot="tal">...</...> Check whether a Slot is available. <cart:slot-not-available slot="tal">...</...> Check whether a Slot is not available. <cart:slot-complete slot="tal">...</...> Check whether a Slot ist complete. <cart:slot-incomplete slot="tal">...</...> Check whether a Slot ist incomplete. <cart:slot-empty slot="tal">...</...> Check whether a Slot is empty. <cart:slot-not-empty slot="tal">...</...> Check whether a Slot is not empty. Use Case: Check Cart Overview <cart:overview-empty /> Check whether Cart Overview is empty. <cart:overview-not-empty /> Check whether Cart Overview is not empty. Use Case: Check Cart <cart:complete /> Check whether Cart Overview is complete. <cart:incomplete /> Check whether Cart Overview is incomplete. Use Case: Check Cart <cart:empty ignore-meta="true" /> Check whether Cart Overview is empty by ignoring Meta-Articles. <cart:not-empty ignore-meta="false" /> Check whether Cart Overview is not empty by including Meta-Articles.
30. Cart-Templates Use Case: Price of an Article This template is not available in all shops! <cart:article-costs [article= " ... " | type= " ... " | name= " ... " | formatted= " ... " | image= " ... " ]> ... </cart:article-costs> Fetches a Price of an Article. article – ID of the Artcle. type – Type of the Price. Can be once or monthly . name – Name of the Price. In general it should be set to default . formatted – Format Price. Must be true . image – Display Price as Image. Can be true or src-only . Use Case: Remove Articles from the Cart <cart:remove page="costs" type="image"> <cart:article id="nis" /> <cart:article id="nav" /> <pfx:image src="delete.gif" alt="Löschen" /> </cart:remove> Remove articles from cart. page – Remove article and jump to page (optional). type – Type of Link. Can be text or image . id – ID of the Article. Use Case: Add Articles or Bundles to the Cart <cart:add type= " text " label="Hier klicken"> <cart:article id="nis" amount="1" /> <cart:article id="nav" amount="2" /> </cart:add> Add Article(s) to the Cart. type – Type of Link. Can be text , markup or image . label – If type is text there must be a label . id – ID of the Article. amount – Amount of Articles added to Cart. <cart:add [ignoreFlow="true"|changeFlow="Order"]> <cart:bundle id="bundle1" /> </cart:add> Add a Bundle to the Cart. The Attributes ignorFlow and changeFlow can optionally be used to manipulate normal Flow. Use Case: Clear one or more Slots <cart:clear page="overview" type="markup"> <cart:slot id="vod-hardware" /> <cart:slot id="line" /> <strong>Löschen</strong> </cart:clear> Clear one or more Slots in the Cart (Remove Articles from Slots).
31. Cart-Templates Use Case: Change Workflow <cart:change-flow flow="Static" /> Change the current Workflow to flow . Use Case: Continue Workflow <cart:continue-flow /> Continue the current Workflow and go one step further. Use Case: Skip Step in Workflow <cart:skip-step /> <cart:skip-step step="OrderDomain" /> Skip the next Step in Workflow or skip custom step . Use Case: Check current Flowpage <cart:if-current-flowpage> ... </cart:if-current-flowpage> Check whether the current page is the current flow page.
32.
33.
34. Variant-Template Use Case: Selecting current Variant <variant:get-current/> Gets current Variant, e.g. lead:def . <variant:get-current-base/> Gets base of the current Variant, e.g. lead if variant is lead:def . Use Case: Choose a variant <variant:choose> <variant:when alias="myvariant"> Some foo Text. </variant:when> <variant:otherwise> Otherwise for other Variants. </variant:otherwise> </variant:choose> Works the same as the well known xsl:choose . Attributes used with Variant Templates The following Attributes are possible when working with Variant Templates. variant Matches the exact full Name of the Variant base Matches the Part before first Double Point end Matches the End of a Variant start Matches when Variant starts with this String alias Matches the Alias of a Variant Use Case: Restrict Block to a Variant <variant:restrict-to variant="lead:def"> Some foo Text. </variant:restrict-to> Text (or other Markup) is only shown if Variant is lead:def . Use Case: Restrict Block to a Variant <variant:except base="PS"> Some foo Text. <variant:except> Text (or other Markup) is shown in all Variants except Variants with Base PS .