/
order.coretag
56 lines (48 loc) · 1.86 KB
/
order.coretag
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# 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.
UserTag order Order code quantity
UserTag order attrAlias item code
UserTag order attrAlias sku code
UserTag order attrAlias table base
UserTag order attrAlias database base
UserTag order attrAlias db base
UserTag order attrAlias mv_ib base
UserTag order attrAlias href page
UserTag order attrAlias variant mv_sku
UserTag order addAttr
UserTag order PosNumber 2
UserTag order Version 1.7
UserTag order Routine <<EOR
# Returns an href to place an order for the product PRODUCT_CODE.
# If AlwaysSecure is set, goes by the page accessed, otherwise
# if a secure order has been started (with a call to at least
# one secure_vendUrl), then it will be given the secure URL
sub {
my($code,$quantity,$opt) = @_;
$opt = {} unless $opt;
my @parms = (
"mv_action=refresh",
);
push(@parms, "mv_order_item=$code");
push(@parms, "mv_order_mv_ib=$opt->{base}")
if($opt->{base});
push(@parms, "mv_cartname=$opt->{cart}")
if($opt->{cart});
push(@parms, "mv_order_quantity=$quantity")
if($quantity);
push @parms, "mv_sku=$opt->{mv_sku}" if $opt->{mv_sku};
$opt->{form} .= "\n" . join "\n", @parms;
$opt->{page} = find_special_page('order')
unless $opt->{page};
if ($opt->{area}) {
return tag_area($opt->{page}, $opt->{arg}, $opt);
}
else {
return tag_page($opt->{page}, $opt->{arg}, $opt);
}
}
EOR