Store tags are only used when your store content is displayed on the Web Hosting side of your account and not in Store Editor. Store tags correspond to the item fields that you set up in Catalog Manager for all of your items. Just as there are many item fields for you to work with in Catalog Manager, there are likewise many store tags for you to use in your HTML pages. Each store tag can be set up to pull data from its matching Catalog Manager item field into your live web page. But first, you must build the tag-enabled HTML page and publish it on your live website.
The default and most commonly used store tag syntax looks like this:
<!--#ystore_catalog id="your_item_ID_here" field="your_field_name_here" -->
For example, the following store tag references the Name field of the whitestar1 item:
<!--#ystore_catalog id="whitestar1" field="name" -->
Things to remember
- Store tags use #ystore_catalog in the syntax.
- All store tags require that you enter your item ID.
- Image, Icon, Inset, Price, Sale-price, and Options support multiple formats, as described below.
Store tags that support different formats
Image, Icon, and Inset
The image, icon, and inset tags support different formats within the syntax:
<!--#ystore_catalog id="your_item_ID_here" field="image" -->
This tag returns your item image URL
or:
<!--#ystore_catalog id="your_item_ID_here" field="image" format="html" -->
This tag returns the following HTML:
<img border=0 width=235 height=141 src="we_put_your_image_URL_here">
Notice that for this example we are using the store tag for the Image field.
Price and Sale-price
The Price and Sale-price tags support different formats within the syntax:
<!--#ystore_catalog id="your_item_ID_here" field="price" -->
This tag returns the exact numerical value that you entered into the Price field in Catalog Manager.
or:
<!--#ystore_catalog id="your_item_ID_here" field="price" format="html" -->
This tag returns the numerical value that you entered into the Price field and includes a dollar sign. If you enter quantity prices into the Price field this tag returns this: $10, 4 for $28, 7 for $35, 0 for $0.00
Options
The Options tag supports different formats within the syntax:
<!--#ystore_catalog id="your_item_ID_here" field="options" format="html" -->
This format returns the HTML for a drop-down menu display. If you have multiple options entered into Catalog Manager, the drop-down menu presents each combination of options, such as the pull-down menu for Color and Size.
or:
<!--#ystore_catalog id="your_item_ID_here" field="options" format="text" -->
This format returns the exact text that you entered into the Options field in your Catalog Manager. Each option is listed as it was entered, as text, followed by a single space (for example, color red blue green size small medium large).
This format is useful for advanced developers who want to write a script to display options as radio buttons, but it doesn't create an attractive interface unless you plan to do some added programming.
In addition, the Option tag can support optionkey syntax for use with both HTML and text formats. The option key is the first word per line that you entered into Catalog Manager - it describes a particular set of choices for a given item, such as color, size, inseam, etc. If you entered Color Red Blue Green in Catalog Manager, Color is the option key. Using optionkey syntax provides a way to display a single option and its attributes.
The option tag below creates an HTML pull-down menu that just displays color. (Optionkey syntax can also be used in a text format Option tag.):
<!--#ystore_catalog id="your_item_ID_here" field="options" optionkey="Color" format="html" -->
Note: When using store tags for options, the store tag must be located within the form tag for the order button for that item. For more information, please check the Store Tag Index.