EKM Tag: [ekm:productattributes]
This tag is used to output all or a selection of custom product attributes on a page.
This tag requires the product attributes feature to be installed before it will work.
- Tag Information
- Nesting This Tag
[ekm:productattributes][/ekm:productattributes]
Brand : ASOS
Colour : Blue
key
as well as adding custom HTML to the output.
[ekm:productattributes]
key='BRAND,COLOUR';
productid='auto';
output_start='<div>';
output_item='<strong>[name]:</strong> <em>[value]</em>';
output_end='</div>';
[/ekm:productattributes]
output_all_attributes='yes';
Specify whether or not to output default product attributes as part of this tag. This includes product weight, condition, etc.
key='BRAND,COLOUR';
Specify either a single attribute key or multiple keys separated by a comma (no space). The tag will then only output the product attributes for the given keys. Keys can be found in the variants section of a product.
productid='auto';
Specify the ID of a product you'd like to output product attributes for. When on a product page you can use the value auto
which will pull product attributes for the current product.
output_start='<div id="product-attributes">';
Define any HTML you wish to be output before the product attributes. This will only output if there are attributes to output.
output_item='<strong>[name]:</strong> <em>[value]</em>';
Define any HTML you want to output for each product attribute.
output_end='</div>';
Define any HTML you wish to be output after all product attributes have been output.
value_only='no';
Specify whether or not you want the attribute value outputting with no surrounding HTML.
The EKM system allows for some tags to be nested within other tags.
When nesting this tag you should prefix the [ekm:productattributes]
tag with nested_
in order for it to work.
[ekm:showdata]
data='products';
location='auto';
output_item='[ekm:nested_productattributes]productid="[id]";[/ekm:nested_productattributes]';
[/ekm:showdata]