Custom Yahoo Store Availability 2
In the previous “Custom Availability” post we explained how to use the Custom Availability property together with the system Availability property. This method requires basic RTML knowledge.
Next, we will show you how to implement a “Custom availability” text field instead of using the pre-defined property Availability. This method is simpler than the previous one.
First, open a list of store Templates. Then find custom Item-order template.
Click on it to open.
Find the RTML expression WHEN @availability.
Click on @availability.
Click the “New” button and create a NONEMPTY operator. Then click “Replace”. As a result, the NONEMPTY RTML operator will replace the original @availability expression.
Click the “EDIT” button and set the value of NONEMPTY operator to @custom-availability
WHEN NONEMPTY @custom-availability
Find the RTML expression STRING-APPEND:
TEXT STRING-APPEND
GRAB
TAG tag "em"
TEXT "Availability: "
@availability
We have to replace @availability property with @custom-availability. For this purpose click on the STRING-APPEND operator and then click the EDIT button. Change @availability to @custom-availability and click update:
WHEN NONEMPTY @custom-availability
DIV class "itemavailable"
TEXT STRING-APPEND
GRAB
TAG tag "em"
TEXT "Availability: "
@custom-availability
Finally, define the custom property @custom-availability (type text) at the item page or at the item type and fulfill it with its necessary value.
Tags: RTML Templates, Yahoo Development, Yahoo Store Customization, Yahoo Store Development
This entry was posted on Wednesday, April 7th, 2010 at 7:26 am and is filed under RTML: Tips & Tricks. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


