在源文件的基础上
修改变量 attribute的固定格式[]和[|]
并添加prefix,suffix为变量 固定格式为{A1|B2|...}
并随机获取各自的值,输出$prefix $ var $suffix
以下为源文件说明:
模版参数说明:
[attribute] — e.g. [name], [price], [manufacturer], [color] — will be replaced with the respective product attribute value or removed if value is not available
[attribute1|attribute2|...] — e.g. [manufacturer|brand] — if the first attribute value is not available for the product the second will be used and so on untill it finds a value
[prefix {attribute} suffix] or
[prefix {attribute1|attribute2|...} suffix] — e.g. [({color} color)] — if an attribute value is available it will be prepended with prefix and appended with suffix, either prefix or suffix can be used alone.
Additional variables available for Product Meta Description: [category], [categories], [store_name], [website_name]
Note: The variables [category] and [categories] should be used when categories are added in product path only to avoid duplicates in meta tags.
举例:
Buy [name][ by {manufacturer|brand}][ of {color} color][ for only {price}][ in {categories}] at[ {store_name},][ website_name]. [short_description]
将转换为:
Buy HTC Touch Diamond by HTC of Black color for only € 517.50 in Cell Phones - Electronics at Digital Store, Digital-Store.com. HTC Touch Diamond signals a giant leap forward in combining hi-tech prowess with intuitive usability and exhilarating design