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: process.coretag,v 1.13 2007-10-31 11:25:53 kwalsh Exp $
10 UserTag process-target Alias process
11 UserTag process-order Alias process
13 UserTag process Order target secure
14 UserTag process addAttr
15 UserTag process Version $Revision: 1.13 $
16 UserTag process Routine <<EOR
17 # Returns the href to process the completed order form or do the search.
19 my($target,$secure,$opt) = @_;
21 $secure = defined $secure ? $secure : $CGI::secure;
23 my $page = $opt->{href} || $Vend::Cfg->{ProcessPage};
24 $opt->{add_dot_html} = $::Scratch->{mv_add_dot_html} unless defined $opt->{add_dot_html};
26 if($opt->{download_name}) {
27 $page .= "/$opt->{download_name}";
29 elsif (Vend::Util::is_yes($opt->{add_dot_html})) {
30 $page .= '.html' unless $page =~ m{(?:/|\.html?)$};
35 $url = $Vend::Cfg->{SecurePostURL} || $Vend::Cfg->{SecureURL};
38 $url = $Vend::Cfg->{PostURL} || $Vend::Cfg->{VendURL};
43 if($Global::TolerateGet and ! $opt->{no_session}) {
45 push @args, "$::VN->{mv_session_id}=$Vend::SessionID"
46 unless $::Scratch->{no_session_id};
47 push @args, "$::VN->{mv_pc}=" . ++$Vend::Session->{pageCount}
48 unless $::Scratch->{no_count};
49 push @args, "$::VN->{mv_cat}=" . ++$Vend::Cat
53 $url .= join($Global::UrlJoiner, @args);
56 return $url unless $target;
57 return qq{$url" target="$target};