Quantity Box


You might have seen online stores that let the customer type a quantity right on the item's page before clicking the Order button. Although this feature is not readily available in the Yahoo! Store Editor, it is easy to add in RTML (see Figure 7.5).

Figure 7.5. Quantity input box.


The quantity box is a simple text box. Its name makes it work as a quantity box. If you name a text box vwquantity and submit it to the shopping cart page, the Yahoo! store system takes the value in this box as the order quantity.

The key to add this feature to your store is the template called order. To add the quantity box, you must modify your copy of this template. Toward the bottom of the order. template, locate the part that reads as follows:

INPUT type :submit        value @order-text 


This RTML expression generates the Order button. You have to add the quantity box before this expression. To begin, click the New button, select INPUT from the operator list, and click Create. Next, click the INPUT expression just above the one that creates the Order button. The one to click reads as follows:

INPUT name :vwcatalog        type :hidden        value account 


After you have selected this INPUT expression, click the Paste After button. This inserts the blank INPUT operator you created earlier right above the Order button. Now click Edit and fill in the parameters as follows:

  • For name, enter :vwquantity.

  • For type, enter :text.

  • For value, enter 1.

  • For maxlength and size, enter 3.

Note that the entries for name and type have no quotes around them and both begin with a colon. In addition, the number 1 you entered for value is the default quantity that will appear in the quantity box on your item pages. You might need to change this if another number makes more sense for your store. When you have entered these values, click the Update button. The finished INPUT expression should look like this:

INPUT name :vwquantity        type :text        value 1        maxlength 3        size 3 


Now you have a functioning quantity box next to the Order button. You might want to add a TEXT Quantity expression just before the box or tweak the appearance a little to suit your particular needs.




Succeeding At Your Yahoo! Business
Succeeding At Your Yahoo! Business
ISBN: 0789735342
EAN: 2147483647
Year: N/A
Pages: 208

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net