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

You are not logged in

Powered by Interchange version 5.7.0

update

Various data update functions.

Summary

  • [update function]

Parameter Description Default
function Data update function. None
name Specify a cart name if function is "cart". None

Examples

Perl example

$Tag->update({
    function => $function,
});

or similarly with positional parameters:

$Tag->update($function, $attribute_hash_reference)

Description

This tag can be used to trigger one of several data update functions, as follows:

Function Description
cart Update the shopping cart to reflect quantity changes.  Items will be removed from the cart if the quantity is zero.  Other quantities will be adjusted according to the values collected using the MinQuantityField and/or MaxQuantityField local configuration directives. 

The cart name to operate upon can be specified using the "name" parameter.
data

Updates data in a table, taking instructions from the following $CGI variables:

Name Description
mv_data_table Table name.
mv_data_key Primary key column in the specified table.
mv_data_fields Space, comma or NULL-separated list of column names to operate upon.
mv_data_function Set to "update", "insert" or "delete", as appropriate.

Various other variables are also used and will be documented here in due course.


Note

Note

This function is influenced by the dml pragma.

Note

Note

The "mv_data_enable" scratchpad variable must be set true before this function will have any effect.

process  
quantity Update the shopping cart to reflect various changes specified using $CGI variables.  The "cart" function will automatically be called after this function is complete. 

The entire cart should be specified in terms of $CGI variables such as "quantity0" (first cart row's quantity value). 

This function only operates on the current cart, so the "name" parameter will have no effect.
values Copy volatile $CGI variables into the persistent $Values space.

Parameters

function

The specific update function to perform, which can be one of "cart", "data", "process", "quantity" or "values".  See above for the meaning of each update function.

name

Used to specify a cart name if function is specified as "cart".  The current cart will be used if no name is specified.

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Thursday 15 May 2008 at 11:20 PM (CDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us