For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

seti

Sets a scratchpad variable to the value specified in the and saves the scratchpad variable into the user's session.  This tag will interpolate its body text by default.

Summary

  • [seti name] String to save [/seti]

Parameter Description Default
name The name of the scratchpad variable you would like to set. None
interpolate

Parse Interchange tags, included in the body text, before this container tag executes.

Yes

Examples

Tag expansion example

[seti foo] Hello world [/seti]

The above sets up for the following example of a subsequent retrieval:

[scratch foo]
Hello World

Perl example

$Tag->seti({
    name => $name,
    body => $value,
});

or similarly with positional parameters:

$Tag->seti($name, $value);

The following is more efficient than calling $Tag->seti(), and yields the same result:

$Scratch->{$name} = $value;

Description

Sets a scratchpad variable to the value specified in the tag body.

This tag interpolates its body text automatically.  Interpolation can be turned off by either passing the interpolate=0 parameter, or by simply using the [set] tag instead.

Most of the mv_* variables that are used for search and order conditionals are in another namespace.  They can be set by means of hidden fields in a form.

For instance, you can set an order profile with the following:

<input="hidden" name="mv_order_profile" value="checkout">

[set checkout]
    name=required
    address=required
[/set]

A search profile could be set with the following:

[set substring_case]
    mv_substring_match=yes
    mv_case=yes
[/set]

<input="hidden" name="mv_profile" value="substring_case">

Any of these profile values can be set in the OrderProfile files instead, of course.

Note

Note

The [seti] tag is not appropriate for setting scratchpad-based order/search profiles or mv_click / mv_check callback actions.  This is because any ICML tags, contained in the tag's body text will be interpolated long before the callback is executed.  The [set] tag is far more appropriate for callback functions.

The "set scratchpad variable" tags are all very similar.  The following table will help you select the one that's correct for your requirements:

Tag name Temporary Interpolates
set No No
seti No Yes
tmpn Yes No
tmp Yes Yes

Parameters

name

The name of the scratchpad variable whose value you want to set.

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Monday 12 February 2007 at 2:54 AM (CST)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us