X hide

Data Feed Generator Tags

From Plumrocket Documentation

You are viewing:  Rss-feed-generator-32.png  Data Feed Generator

Here you will learn how to use tags to properly configure the template that will be later generated by the Data Feed Generator Magento Extension. You will also find the full list of tags that can be in a template.

The Order of Using Tags

As you can see, a template consists of three separate sections: the header, the body and the footer. The header and footer are repeated only once, so only document tags can be used here. Otherwise, the system will automatically delete any other tags (like catalog tags or product tags) in the file that will be displayed to the user. The body of the template is repeatable and is generated every time for each catalog or product depending on the type of feed (products or categories). For instance, if there are one hundred categories in the feed, the system will generate one hundred blocks of texts that will appear between the header and the footer and data for changing tags will be generated for each category separately. For example, if there is a tag {category.name}, there will be a separate category name in each of the one hundred blocks of texts.

You can use document tags in the body irrespective of the type of the feed. You can also use tags of categories if the type of the feed is 'category', tags of products if the type of the feed is 'product'. When using the type of the feed "Product', the system will automatically use the category data this product belongs to for processing category tags.

Example (the type of the feed 'Product'):

<item>
<title>{product.name}</title>
<description>{product.description}</description>
<pubDate>{product.updated_at}</pubDate>
<link>{product.url}</link>
</item>

The Extension will generate several blocks according to the number of products available. The result will be as follows:

<item>
<title>BlackBerry 8100 Pearl</title>
<description>Like the BlackBerry 7105t, the BlackBerry 8100 Pearl is The BlackBerry 8100 Pearl sports 
a large 240 x 260 screen that supports over 65,000 colors-- plenty of real estate to view your e-mails,
Web browser content, messaging sessions, and attachments.</description>
<pubDate>2013-04-30 12:56:37</pubDate>
<link>http://www.private-sales-v20.plumrocket.net/all/electronics/blackberry-8100-pearl.html</link>
</item>

The List of Tags

Document Tags

There is a list of all document tags in the table below.

Tag Description
{site.now} Current time in the format "Y-m-d H:i:s"
{site.name} The name of the store according to global setings
{site.phone} Store contact phone number
{site.address} Store address
{site.url} URL store address

Formatting Tags:

Tag Description
{no_br}...{/no_br} Removes the hyphens replacing them with space gaps in order to prevent words overlapping
{no_html}...{/no_html} Removes all tags (Note! It does not produce tag codes but totally removes a tag)
{no_quotes}...{/no_quotes} Removes quotation marks

These tags can be randomly and partially overlapped. Below are the examples of usage:

{no_br}{ho_html}{product.description}{/no_html}{/no_br}


{ho_html}{no_br}{product.description}{/no_html}{/no_br}


Catalog Tags

There is a list of all category tags in the table below. The tag writing is carried out in the following way: {category.XXX}, where XXX is one of the tags like {category.meta_description} will show the meta description of the current category.

Tag Description
children_count The number of subcategories in a category
created_at The time and date of category creation
description Category description
entity_id Category ID
image File name of image, example "shirt.jpg"
image_url Full url of image, example "http://www.example.com/media/category/image/p/12/s/shirt.jpg" (Recommend)
meta_title Category meta title
meta_keywords Category meta keywords
meta_description Category meta description
name Category title
parent_id Parent category ID
privatesale_date_start The date and time of sales beginning (Private Sales Extension Required)
privatesale_date_end The date and time of sales ending (Private Sales Extension Required)
thumbnail Thumbnail file name, example "shirt.jpg"
thumbnail_url Full url of thumbnail, example "http://www.example.com/media/category/cache/128x24/h/shirt.jpg"
updated_at The date and time of the latest category update
url Absolute category path
open_url Absolute category path for guests (Url Manager Extension Required)
url_key Category name in URL
url_path Relative Category path
brand_name Brand name (Shop by Brand Extension Required)
brand_comment Comment to the brand (Shop by Brand Extension Required)
brand_link Brand link (Shop by Brand Extension Required)
brand_image Brand image (Shop by Brand Extension Required)


Products Tags

There is a list of all product tags in the table below. The tag writing is carried out in the following way: {product.XXX}, where XXX is an arbitrary tag like {product.name} - the name of the product.

Tag Description
created_at The Date and time of product creation
description Product Description
entity_id Product ID
image Product image relative path to product page
image_url Product image absolute path to product page
meta_description Product meta description
meta_keyword Product meta keyword
meta_title Product meta title
name Product title
news_from_date The date marking the “New Product” status
news_to_date The final date of the “New Product” status
price The Price of a product
short_description Short description of a product
sku Stock-keeping unit of a product
small_image Product image relative path to cart page
small_image_url Product image absolute path to cart page
sold The quantity of sold products
special_from_date The date marking the beginning of special price of the product
special_to_date The date marking the end of special price of the product
special_price Special Price. If the field is empty regular price will be displayed
thumbnail Product image relative path to the list of products
thumbnail_url Product image absolute path to the list of products
qty The quantity of products available in stock
updated_at The date and time of the latest product update
url Absolute product path
open_url Absolute product path for guests (Url Manager Extension Required)
url_key Product name in URL
url_path Relative product path
weight Product weight


Extended Tags:

Tag Description
{product.child_items}...{/product.child_items} Block with child items
{product.child}...{/product.child} The block with child items is added to {product.child_items}, and does not work beyond it. Its content will be repeated for each child item of the parent one, when tags parsing is launched.


Сhild Tags

Child tags coincide with those used for Product Tags (see described above), except for .child_items and .child. The tags {child.xxx} are available and processed only if they belong to the block {product.child} ... {/product.child}. Otherwise, these will be removed from the result.

Below are the examples of tags usage.

{product.child_items}
<variants>
 {product.child}
 <variant>
 <sku>{child.sku}</sku>
 <color>{child.color}</color>
 <size>{child.size}</size>
 <detail_url>{product.url}</detail_url>
 </variant>
 {/product.child}
</variants>
{/product.child_items}
As a result, if you use the code described above, the XML structure will look like this: 
<variants>
 <variant>
 <sku>ZOO0241-LB</sku>
 <color>BLACK</color>
 <size>L</size>
 <detail_url>http://www.shopeer.com/product.html?id=10802</detail_url>
 </variant>
 <variant>
 <sku>ZOO0241-MN</sku>
 <color>NAVY</color>
 <size>M</size>
 <detail_url>http://www.shopeer.com/product.html?id=10935</detail_url>
 </variant>
 <variant>
 <sku>ZOO0241-SR</sku>
 <color>RED</color>
 <size>S</size>
 <detail_url>http://www.shopeer.com/product.html?id=12618</detail_url>
 </variant>
</variants>




Navigation