Request a Call Back

Enter your number and one of our friendly ecommerce experts will be in touch. All fields are required.

Speak to our experts today 0333 004 0333
Speak to one of our experts today or Request a Callback
User Guides

EKM Tag: [ekm:productstock]

This tag is used to output the stock level or a stock message.

This tag can only be used on the product page. Stock control must be enabled in the settings section.

  • Tag Information
  • Nesting This Tag
Basic Use
In its basic use the tag will output the numeric value of the stock level.

[ekm:productstock][/ekm:productstock]
                                
This outputs the following.
1
Advanced Use
The advanced use of this tag allows you to specify a message when the item is in stock or out of stock.

[ekm:productstock]
    instock='In Stock';
    outstock='Out Of Stock';
[/ekm:productstock]
                                
Tag Attributes
In Stock Message
instock='In Stock';

Define the message to be displayed when the item is in stock

Value
Description
{user defined}
Specify the text to be displayed the when the item is in stock. You cannot embed HTML within this attribute.
Out Of Stock Message
outstock='Not In Stock';

Define the message to be displayed when the item is not in stock

Value
Description
{user defined}
Specify the text to be displayed the when the item is not in stock. You cannot embed HTML within this attribute.
Font Formatting
font_formatting='no';

Specify whether or not you want formatting to be displayed around the text or value.

Value
Description
yes
Font formatting will be output
yes
Font formatting will not be output
Value Only
value_only='yes';

Specify whether or not you want to output only the number of items in stock. This will not work with prevent product variants from updating the stock value on the page.

Value
Description
yes
Only a numeric value will be displayed for the stock level.
no
Will output the message if defined

The EKM system allows for some tags to be nested within other tags.

Nesting This Tag

When nesting this tag you do not need to make any alterations.


[ekm:if]
    iftype='EQUALS';
    ifvalue='0';
    ifvalue2='0';
    ifthen='[ekm:productstock][/ekm:productstock]';
    ifelse='';
[/ekm:if]