1 # Copyright 2002-2007 Interchange Development Group and others
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version. See the LICENSE file for details.
8 # $Id: order.coretag,v 1.7 2007-03-30 23:40:49 pajamian Exp $
10 UserTag order Order code quantity
11 UserTag order attrAlias item code
12 UserTag order attrAlias sku code
13 UserTag order attrAlias table base
14 UserTag order attrAlias database base
15 UserTag order attrAlias db base
16 UserTag order attrAlias mv_ib base
17 UserTag order attrAlias href page
18 UserTag order attrAlias variant mv_sku
20 UserTag order PosNumber 2
21 UserTag order Version $Revision: 1.7 $
22 UserTag order Routine <<EOR
23 # Returns an href to place an order for the product PRODUCT_CODE.
24 # If AlwaysSecure is set, goes by the page accessed, otherwise
25 # if a secure order has been started (with a call to at least
26 # one secure_vendUrl), then it will be given the secure URL
28 my($code,$quantity,$opt) = @_;
29 $opt = {} unless $opt;
34 push(@parms, "mv_order_item=$code");
35 push(@parms, "mv_order_mv_ib=$opt->{base}")
38 push(@parms, "mv_cartname=$opt->{cart}")
41 push(@parms, "mv_order_quantity=$quantity")
44 push @parms, "mv_sku=$opt->{mv_sku}" if $opt->{mv_sku};
46 $opt->{form} .= "\n" . join "\n", @parms;
48 $opt->{page} = find_special_page('order')
52 return tag_area($opt->{page}, $opt->{arg}, $opt);
55 return tag_page($opt->{page}, $opt->{arg}, $opt);