selectselectselect
Call our Sales Hotline
0844 858 8580
User Guides

Randomproducts

Use this tag if you want to display a random product on any page. Multiple instances can be used on each page.

Basic Usage
[ekm:randomproducts] [/ekm:randomproducts]


Full Usage
[ekm:randomproducts]

' Data to Show 
location='auto'; 

' Advanced Data Manipulation 
excludelist=;
includelist=; 

' Navigation Options when logged in 
editbuttons='YES'; 

' Image Sizes
image_ratio='auto';
image_width='auto';
image_height='auto'; 

' Font Face, Font Size and Font Style (Bold, Italic, etc) 
font_formatting='yes'; 

product_title_font='auto';
product_title_size='auto';
product_title_style='auto'; 

product_description_font='auto';
product_description_size='auto';
product_description_style='auto'; 

' Output Format 
output_item='<TABLE BORDER=0 CELLPADDING=3>
<TR><TD WIDTH=10>[image]</TD><TD>[name]
<FONT FACE="arial" SIZE=2 COLOR="DARKRED"><BR>
<B>[price]</B></FONT></TD></TR></TABLE>'; 

' Element Replace 
element_replace='null';

[/ekm:randomproducts]


Full Tag
Ekmtags randomproducts.jpg

Tag Parameters

location
Allows to you specify the location where you want to get the data to output from.

This is a category location ID, so for example you may have a category within your shop with an ID of 5. If you wanted to output this categories contents you would set the location to 5.

Category ID's are found by looking at the url in the address bar...

index.asp?function=DISPLAYCAT&catid=10

So in this example the category ID would be 10.

In most cases this value should be set to auto which will ensure it uses the current location data.

Possible Values
auto Uses the current location
user defined The ID number of the category you wish to use. 0 is the main page top level.
randomlocation Selects a random location


excludelist
Allows you to give a list of comma separated id numbers of products you wish to be excluded from the output.

For example you might have a couple of products which you do not want displaying so you would enter these two '234, 12' for example.

Possible Values
user defined  ?, ?, ? ,?


includelist
Allows you to give a list of comma separated id numbers of products you want to be included in the output, anything not listed will not be displayed.

For example you might have a couple of products displaying and nothing else, so you may enter '234, 12' for example.

Possible Values
user defined  ?, ?, ? ,?
randomproduct Will select a random product in the current location


editbuttons
Allows you to specify if the [edit] buttons should be shown when you are logged in.
Possible Values
yes default
no


image_ratio
Used to specify the image ratio size if a width and height have not been set.
Possible Values
auto 80 for a Product
User Defined A pixel amount


image_width
Used to specify the image width.
Possible Values
User Defined A pixel amount


image_height
Used to specify the image height.
Possible Values
User Defined A pixel amount


font_formatting
If this is set to 'YES' then ekmPowershop will insert FONT tags to control the font face, size and style of results.

If this is set to 'NO' then no font formatting will be performed. If you are using CSS in your design then you are best setting this to 'NO'.

Possible Values
yes Format the Fonts (default)
no Do not formart the fonts


product_title_font
Used to specify the font used when displaying a Product's name.
Possible Values
auto Uses default set within the Design & Layout Section
nothing No formatting will be used. Useful if your using CSS.
User Defined Any HTML Font Name (eg: Arial, Verdana)


product_title_size
Used to specify the font size used when displaying a Products's name.
Possible Values
auto Uses default set within the Design & Layout Section
nothing No formatting will be used. Useful if your using CSS.
User Defined Any HTML Font Size value (eg: 3, +4, 6)


product_title_style
Used to specify the font style used when displaying a Products's name.
Possible Values
auto No Style Applied
nothing No formatting will be used. Useful if your using CSS.
User Defined Any HTML Font Style value (eg: bold, italic, underlined)


product_description_font
Used to specify the font used when displaying a Products's description.
Possible Values
auto Uses default set within the Design & Layout Section
nothing No formatting will be used. Useful if your using CSS.
User Defined Any HTML Font Name (eg: Arial, Verdana)


product_description_size
Used to specify the font size used when displaying a Products's description.
Possible Values
auto Uses default set within the Design & Layout Section
nothing No formatting will be used. Useful if your using CSS.
User Defined Any HTML Font Size value (eg: 3, +4, 6)


product_description_style
Used to specify the font style used when displaying a Products's description.
Possible Values
auto No Style Applied
nothing No formatting will be used. Useful if your using CSS.
User Defined Any HTML Font Style value (eg: bold, italic, underlined)


output_item
This is output for an item. This would be the actual product.
Possible Values
auto
<TABLE BORDER=0 CELLPADDING=3 WIDTH=100%><TR>
<TD WIDTH=10>[image]</TD>
<TD ALIGN=LEFT>[name]
<FONT FACE="arial" SIZE=2 COLOR="DARKRED">[price-BR]
<B>[price]</B></FONT></TD></TR></TABLE>
User Defined You can use any HTML or plain text code. You can use the following tags to create the output_item...

[id]
Outputs the product ID

[name]
Outputs the product Name

[name-NOEDIT]
Outputs the product Name but without the standard ekmPowershop (EDIT | DELETE | ORDER) buttons. If you use this you need to use the tag [editbuttons] below, otherwise there isnt a way for customers to change this item

[description]
Outputs the product Description

[description-BR]
Outputs the a line break if there is a Description

[image]
Outputs the product Image

[productcode]
Outputs a products 'Product Code'

[stock]
Outputs a products Stock Level

[rrp]
Outputs a products RRP

[rrp-line]
Outputs a products RRP with a strikethrough

[price]
Outputs a products Price

[price-BR]
Outputs the a line break if there is a Price

[editbuttons]
Outputs the standard ekmPowershop (EDIT | DELETE | ORDER) buttons. Only needed if you use the [name-NOEDIT] tag.

[lastmodified]
Outputs the last modified date of a product. See formatdate below for more details.

Note: You do not need to close 'non-EKM:' tags.

An example use of these tags would be...


output_item='[image]<BR>[name]<BR>[shortdescription]
<BR>[price]';


element_replace
If any item in the output_item parameter doesnt exist or is empty replace it with this element. So for example if you had the code...

[name] - [description] And description was empty and your element_replace was set to 'nothing here' you would get the following...

Apple iPod - nothing here The main use for this tag is when your using a table layout and instead of an empty cell you could set the element_replace to   so you would still maintain a grid style layout.

Possible Values
auto
user defined Any HTML Code or Plain Text (eg:  )


formatdate
Allows you to specify how your [lastmodified] will be formated.

For example:

formatdate='[day_of_month] - [month] - [year]';

Output: 10 - 1 - 2012

Possible Values
User Defined [month]



[full_month]

[abbreviated_month]

[day_of_month]



[ordinal]



[day_of_the_year]

[year]

[year_partial]



[day_number]

[day_name_short]

[day_name]


« Back