In an RTML Template the “ACTION” operator looks like:
This operator returns a special Yahoo Store URL that will perform a certain action. The possible arguments are :
:email (returns argument mailto: and the e-mail address from the email global variable),
:help (returns http://stores.yahoo.com/help.html),
:search (returns search page URL), and
:show-order (returns Yahoo basket URL).
FORM destination ACTION :show-order method "post"
In the Yahoo Store RTML Template a newly created “>=” operator looks like:
This operator compares two numbers. If the first argument is greater or equal to the second one, then the operator returns “true”.
In this example the operator “>=” checks a loop property “pos”. The loop continues to work as long as the “pos” value is greater or equal to zero.
In a Yahoo Store RTML Template a newly created “<=” operator looks like:
This operator compares two numbers. If the first argument is less than or equal to the second one, then operator returns “true”.
This operator could be used in combination with “IF“, “FOR” and “WHEN” operators.
In this example, the operator “<=” checks a loop property “pos“. The loop continues its work as long as the “pos” value is less or equal to 10.
By default, the Yahoo store system does not include a quantity box on its store pages. After a few changes in the RTML template it will be possible to apply this feature, and customers will then have the possibility to order more than one item.
First, make sure you have editable copies of your store RTML templates.
Find the template that corresponds to adding the items to the shopping cart. Because it is a copy of a default template called add-to-cart, it will be named something such as, your-store-add-to-cart. Click and open it.
Now you will see the template content. At this point, we recommend you make a copy of your existing template by clicking the Copy Template button (just in case if you need to restore it).
At the top of the template content click the operator “IF”. It will become active (not linked, black colored).
Click the button [NEW] at the toolbar. There you will see a selection field called “Complex”, scroll within it to find the operator “INPUT”.
Click the button [CREATE]
The newly created operator will appear in the “basement” area, below the template content. We need to place it before the recent operator IF.
Now, “IF” is active. “INPUT” is in the basement. Click the button [Replace] in the toolbar. These operators will then rotate their places: “IF” will go to the basement area, “INPUT” will become the first operator (active). Now click the button [Paste After] and then “IF” will be replaced after the “INPUT”.
The last step is to customize the operator “INPUT”.
Click it to make it active. Click the button [EDIT] in the top toolbar. Define the following values:
Name – :vwquantity
type – :text
value – 1
maxlength – 3
size – 3
All done. The quantity box will now appear at your store item pages.
If the property is going to be used only on a particular page, it is referred to as “Local” and is located on that page under the “Custom properties” header.
If the property is going to be used on the entire store, then it is called “Global” and is located in the “Variables” section (see page’s Editor toolbar) under “Custom Variables” header.
To add a Local custom property open a particular page, then click the [Edit] button on the Editor toolbar.
Click the [New Property] button. Input the Name of a new property, and select its type.
To add a Global custom property, click the button [Variables] at the Editor toolbar.
Click the button [Define New Variable] on the page toolbar.
Input the Name of a new property, and then select its type.