ALPHA STORE DESIGN STUDIO - authorized Yahoo! Small Business Partner
call us at (908).338.3992
 
About Us
Portfolio
System Additions for Store Pages
Custom Graphic Design. How It Works
/
BLOG: A few "tips" and "RTML secrets" of Yahoo store.

OUR BLOG: Yahoo Store from A to Z and RTML development "secrets".


Custom Availability

By default, the Yahoo Store System uses pre-defined “availability” options.

In this article, we will show you how to implement a “Custom availability” text field together with a pre-defined property in your store. You should have basic RTML knowledge to use this method.

In order to define “custom availability”, open a list of store Templates. Within the Custom templates column find the template that corresponds to the Item order (this template is a copy of a default template called Item-order).

Store template Item-order

In this RTML template find the RTML expression WHEN @availability:

WHEN @availability
  DIV class "itemavailable"
    TEXT STRING-APPEND
           GRAB
             TAG tag "em"
               TEXT "Availability: "
           @availability

In this expression change the variable @availability to customavailability:

WHEN customavailability
  DIV class "itemavailable"
    TEXT STRING-APPEND
           GRAB
             TAG tag "em"
               TEXT "Availability: "
           customavailability

Create a New RTML operator WITH= and paste the above expression into it. In this operator, assign the variable value to customavailability:

WITH= variable customavailability
      value nil
  WHEN customavailability
    DIV class "itemavailable"
      TEXT STRING-APPEND
             GRAB
               TAG tag "em"
                 TEXT "Availability: "
             customavailability

Create a New RTML operator IF to check @custom-availability and @availability fields. Pass IF to WITH= operator:

WITH= variable customavailability
      value IF test NONEMPTY @custom-availability
               then @custom-availability
               else @availability
  WHEN customavailability
    DIV class "itemavailable"
      TEXT STRING-APPEND
             GRAB
               TAG tag "em"
                 TEXT "Availability: "
             customavailability

Finally, define the custom property @custom-availability (type text) in the item page or at the item type and fulfill it with its necessary value.

Tags: , , , ,

Leave a Reply