Name

update — refresh specific set of internal data

ATTRIBUTES

Attribute Pos. Req. Default Description
function yes yes name of function (see below)
name cart name (cart function only)
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

[update cart] updates the cart. If the user has put in 0 for any quantity, delete that item from the cart. Also adjust the cart to take minimum and maximum order quantities as specified by the MinQuantityField and MaxQuantityField directives into account.

[update values] updates the value namespace from the volatile CGI namespace.

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

update is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/SystemTag/update.coretag
Lines: 13


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: update.coretag,v 1.5 2007-03-30 23:40:49 pajamian Exp $

UserTag update              Order        function
UserTag update              addAttr
UserTag update              Version      $Revision: 1.5 $
UserTag update              MapRoutine   Vend::Interpolate::update

Source: lib/Vend/Interpolate.pm
Lines: 5397

sub update {
my ($func, $opt) = @_;
if($func eq 'quantity') {
  Vend::Order::update_quantity();
}
elsif($func eq 'cart') {
  my $cart;
  if($opt->{name}) {
    $cart = $::Carts->{$opt->{name}};
  }
  else {
    $cart = $Vend::Items;
  }
  return if ! ref $cart;
  Vend::Cart::toss_cart($cart, $opt->{name});
}
elsif ($func eq 'process') {
  Vend::Dispatch::do_process();
}
elsif ($func eq 'values') {
  Vend::Dispatch::update_user();
}
elsif ($func eq 'data') {
  Vend::Data::update_data();
}
return;
}

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!