ekmTags - showdata

Ecommerce Software | Shopping Cart Software

ekmPowershop is the easiest way to setup your own online shop
Home
Home
Overview
Overview
Our Customers
Our Customers
Online Demo
Online Demo
Sign Up
Sign Up
Support
Support
Guides & Articles
User Guide & Tutorials
FAQ's
ekmCommunity
Contact Us
Contact Us
Your Account
Your Account
Call our uk ecommerce Sales Hotline on 0870 013 0626
Select Currency
UK Pound Sterling Euro US Dollar



support

  ekmTags: [ekm:showdata]

This is the most advanced tag within ekmPowershop and it enables you to output data directly from your shops database. It is used to display your products and categories.

Basic Usage
[ekm:showdata]
    data='all';
[/ekm:showdata]


data can be set to all, categories, products, specialoffers and relatedproducts


Full Usage
[ekm:showdata]

    ' Data to Show
    data='all';
    location='auto';

    ' Basic Layout & Navigation
    cols='2';
    rows='6';
    page_navigation='auto';

    ' Advanced Data Manipulation
    orderby='orderlocation, name';
    skiprecords='0';
    excludelist='';
    includelist='';

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

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

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

    category_title_font='auto';
    category_title_size='auto';
    category_title_style='auto';

    category_description_font='auto';
    category_description_size='auto';
    category_description_style='auto';

    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_start='<TABLE BORDER=0 CELLSPACING=5 WIDTH=100%>';
    output_row_start='<TR>';
    output_column_start='<TD WIDTH=50%>';
    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>';
    output_column_end='</TD>';
    output_row_end='</TR>';
    output_end='</TABLE>';

    ' Element Replace
    element_replace='null';

[/ekm:showdata]


Example Output
Example Output


Tag Parameters

data
Allows to you specify the type of data to output. This can be categories, products or both if your within a category.

If your on the main page you must specify a seperate show data tag for categories and one for products, the 'all' data type will not work.

Possible Values
all Outputs both Categories and Products. Within Categories Only
categories Outputs Categories
products Outputs Products
specialoffers Outputs any Products which have been marked as Special Offers
relatedproducts Outputs any Products which have been marked as Related Products


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


cols
Allows you to specify the number of columns you want your products and categories laid out over.

Possible Values
auto 2
User Defined Any number from 1 upwards


rows
Allows you to specify the number of rows you want your products and categories laid out over. If there are more products to be displayed a navigation element will appear to allow users to move to the next page.

Possible Values
auto 20
User Defined Any number from 1 upwards


page_navigation
If required should the page navigation element be shown to allow users to move to additional pages. This will only be required if the number of products and categories are too large to fit on one page.

Possible Values
auto
yes
no


orderby
Allows you to specify how your product and category data is ordered. You can use any of the database field names to order by, and you can use more than one. You can also use ASC (Ascending) and DESC (Descending)

For example: orderby='name ASC, price DESC';

Possible Values
auto Uses orderlocation, name
orderlocation A numeric value which is used to order the item
name The product or category name
price The products price
lastmodified The products last modified date.
productweight The products weight


skiprecords
Allows you to give a numeric amount of items to skip. So if you had 20 products in a category and you skipped 10 you would start outputting products from the 10th one.

Possible Values
user defined 0 - 1000+


excludelist
Allows you to give a list of comma separated id numbers of products or categories you wish to be excluded from the output. For example you might have a couple of categories 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 or categories you want to be included in the output, anything not listed will not be displayed. For example you might have a couple of categories 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


counterreset
Allows you to specify a limit for the [counter] value (as used in the output_item parameter). When this limit it hit the counter will reset to 1.

Possible Values
User Defined A numeric amount (default 10000)


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, 115 for a Category
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


max_image_width
Allows you to specify the maximum width of the image. If a image is used which is larger than this amount it will be resized to fit.

Possible Values
auto
User Defined - In pixel units


max_image_height
Allows you to specify the maximum height of the image. If a image is used which is larger than this amount it will be resized to fit.

Possible Values
auto
User Defined - In pixel units


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


category_title_font
Used to specify the font used when displaying a Category'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)


category_title_size
Used to specify the font size used when displaying a Category'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)


category_title_style
Used to specify the font style used when displaying a Category's name.

Possible Values
auto Uses Bold
nothing No formatting will be used. Useful if your using CSS.
User Defined Any HTML Font Style value (eg: bold, italic, underlined)


category_description_font
Used to specify the font used when displaying a Category'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)


category_description_size
Used to specify the font size used when displaying a Category'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)


category_description_style
Used to specify the font style used when displaying a Category'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)


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)


related_output
Specify whether multiple related products can be added to the basket from the product page.

Possible Values
auto Displays related products.
addrelated Allows multiple related products to be added to the basket when used with the [related-tickbox] and [related-addtocart] attributes.


output_start
This is output at the start of the showdata tag before any product or category data is shown. You can use it to open a table for example.

Possible Values
auto <TABLE BORDER=0 CELLSPACING=5 WIDTH=100%>
User Defined Any HTML Code or Plain Text


output_row_start
This is output for the start of a row.

Possible Values
auto <TR>
User Defined Any HTML Code or Plain Text


output_column_start
This is output for the start of a column.

Possible Values
auto <TD>
User Defined Any HTML Code or Plain Text


output_item
This is output for an item. This would be the actual product or category.

Possible Values
auto <TABLE BORDER=0 CELLPADDING=3 WIDTH=100%><TR><TD WIDTH=10>[image]</TD><TD ALIGN=LEFT>[name][shortdescription-BR][shortdescription]<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 or categories ID

[name]
Outputs the product or categories Name

[name-NOEDIT]
Outputs the product or categories 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 or categories Description

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

[shortdescription]
Outputs the categories Short Description

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

[image]
Outputs the product or categories 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

[counter]
A numeric amount which counts up each time a product or category is outputted. Can be reset with the CounterReset parameter.

[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.

[related-tickbox]
Displays a tickbox for selecting related products to be added to the basket.

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]';


output_column_end
This is output for the end of a column.

Possible Values
auto </TD>
User Defined Any HTML Code or Plain Text


output_row_end
This is output for the end of a row.

Possible Values
auto </TR>
User Defined Any HTML Code or Plain Text


output_end
This is output at the end of the showdata tag after any product or category data is shown. You can use it to close a table for example.

Possible Values
auto </TABLE>
User Defined You can use any HTML or plain text code. You can use the following tags to create the output_end...

[related-addtocart]
Outputs an Add to Cart button for use with related products

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

An example use of these tags would be...

output_item='[related-addtocart]</TABLE>';


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 &nbsp; so you would still maintain a grid style layout.

Possible Values
auto
User Defined Any HTML Code or Plain Text (eg: &nbsp;)


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

For example:

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

Output:

7 - 9 - 2008

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
About Us   |   Site Map   |   Terms   |   Privacy   
Our Services: hosted online shop - ecommerce software - shopping cart software - ecommerce hosting