For a complete introduction to Interchange variables, please see the variable glossary entry.
Table of Contents
disable the use of password encryption server-wide
ACTIVE_SESSION_MINUTES — specify maximum session age for [dump-session]
This variable specifies the maximum session age in minutes and is used
only by the dump_session tag.
Interchange 5.7.0:
Source: code/UI_Tag/dump_session.coretag
Line 41 (context shows lines 31-45 in show_part():14)
my ($name, $opt) = @_;
my $joiner = $opt->{joiner} || ' ';
return "Cannot dump or find sessions with session type $Vend::Cfg->{SessionType}."
if ($Vend::Cfg->{SessionType} ne 'File' && $Vend::Cfg->{SessionType} ne 'DBI');
if ($Vend::Cfg->{SessionType} eq 'File') {
if($opt->{find}) {
require File::Find;
my $expire = $Vend::Cfg->{SessionExpire};
if( int($::Variable->{ACTIVE_SESSION_MINUTES}) ) {
$expire = $::Variable->{ACTIVE_SESSION_MINUTES} * 60;
}
my $now = time();
$expire = $now - $expire;
Source: code/UI_Tag/dump_session.coretag
Line 78 (context shows lines 68-82 in show_part():14)
$out = Vend::Util::uneval($ref);
};
return uneval($ref) if $@;
return $out;
}
}
if ($Vend::Cfg->{SessionType} eq 'DBI') {
if($opt->{find}) {
my $expire = $Vend::Cfg->{SessionExpire};
if( int($::Variable->{ACTIVE_SESSION_MINUTES}) ) {
$expire = $::Variable->{ACTIVE_SESSION_MINUTES} * 60;
}
my $now = time();
$expire = $now - $expire;
BACKUP_DIRECTORY — specify directory used to dump database backups
Interchange 5.7.0:
Source: code/UI_Tag/backup_database.coretag
Line 16 (context shows lines 6-20)
# (at your option) any later version. See the LICENSE file for details.
UserTag backup-database Order tables
UserTag backup-database AddAttr
UserTag backup-database Version 1.11
UserTag backup-database Routine <<EOR
sub {
my ($tables, $opt) = @_;
my (@tables) = grep /\S/, split /['\s\0]+/, $tables;
my $backup_dir = $opt->{dir}
|| $::Variable->{BACKUP_DIRECTORY}
|| "$Vend::Cfg->{VendRoot}/backup";
my $gnum = $opt->{gnumeric};
my $agg = "$backup_dir/DBDOWNLOAD.all";
BASKET_EXPIRY
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 413 (context shows lines 403-417 in googlecheckout():399)
my $ordersdir = charge_param('ordersdir') || 'orders';
my $currency = $::Values->{currency} || charge_param('currency') || 'GBP';
my $editbasketurl = charge_param('edit_basket_url') || $::Variable->{EDIT_BASKET_URL};
$editbasketurl =~ s/\.html$//i;
$editbasketurl .= ".html?id=$::Session->{id}";
my $continueshoppingurl = charge_param('continue_shopping_url') || $::Variable->{CONTINUE_SHOPPING_URL};
my $receipturl = charge_param('receipt_url') || $::Variable->{RECEIPT_URL};
my $gcoipn_url = charge_param('gcoipn_url') || $::Variable->{GCOIPN_URL};
my $gcocmd_url = charge_param('gcocmd_url') || $::Variable->{GCOCMD_URL}; \
\
\
\
\
# from IC admin panel, not from GCO
my $chargecard = $::Values->{charge_card} || charge_param('charge_card') || '1';
my $basket_expiry = charge_param('basket_expiry') || $::Variable->{BASKET_EXPIRY} || '1 month';
my $default_taxrate = $::Values->{default_taxrate} || charge_param('default_taxrate') || '0.00';
my $reduced_taxrate = $::Values->{reduced_taxrate} || charge_param('reduced_taxrate') || '0.00';
my $taxratefield = charge_param('taxrate_field') || 'taxrate';
my $reduced_taxfield = charge_param('reduced_tax_field') || 'reduced';
BREADCRUMB_EXCLUDE
Interchange 5.7.0:
Source: dist/standard/config/breadcrumbs.tag
Line 18 (context shows lines 8-22)
# $Id: breadcrumbs.tag,v 1.5 2007-08-09 13:40:53 pajamian Exp $
UserTag breadcrumbs Order number
UserTag breadcrumbs addAttr
UserTag breadcrumbs Routine <<EOR
sub {
my ($number, $opt) = @_;
use vars qw/$Tag $Scratch $CGI $Session $Variable/;
my $only_last = $::Variable->{BREADCRUMB_ONLY_LAST} || 'ord/basket login';
my $exclude = $::Variable->{BREADCRUMB_EXCLUDE};
my $max = $number || $::Variable->{BREADCRUMB_MAX} || 6;
my %exclude;
my %only_last;
BREADCRUMB_MAX
Interchange 5.7.0:
Source: dist/standard/config/breadcrumbs.tag
Line 19 (context shows lines 9-23)
UserTag breadcrumbs Order number
UserTag breadcrumbs addAttr
UserTag breadcrumbs Routine <<EOR
sub {
my ($number, $opt) = @_;
use vars qw/$Tag $Scratch $CGI $Session $Variable/;
my $only_last = $::Variable->{BREADCRUMB_ONLY_LAST} || 'ord/basket login';
my $exclude = $::Variable->{BREADCRUMB_EXCLUDE};
my $max = $number || $::Variable->{BREADCRUMB_MAX} || 6;
my %exclude;
my %only_last;
BREADCRUMB_ONLY_LAST
Interchange 5.7.0:
Source: dist/standard/config/breadcrumbs.tag
Line 17 (context shows lines 7-21)
#
# $Id: breadcrumbs.tag,v 1.5 2007-08-09 13:40:53 pajamian Exp $
UserTag breadcrumbs Order number
UserTag breadcrumbs addAttr
UserTag breadcrumbs Routine <<EOR
sub {
my ($number, $opt) = @_;
use vars qw/$Tag $Scratch $CGI $Session $Variable/;
my $only_last = $::Variable->{BREADCRUMB_ONLY_LAST} || 'ord/basket login';
my $exclude = $::Variable->{BREADCRUMB_EXCLUDE};
my $max = $number || $::Variable->{BREADCRUMB_MAX} || 6;
my %exclude;
CAPTCHA_IMAGE_LOCATION — specify directory containing generated "captcha" images
The variable specifies a directory where the generated captcha image files should be saved to.
This directory must also be available as a web server location.
Interchange 5.7.0:
Source: code/SystemTag/captcha.coretag
Line 50 (context shows lines 40-54)
$opt->{length} ||= 4;
my $en = $opt->{error_name} || 'captcha';
my $subdir = $opt->{image_subdir}
|| $::Variable->{CAPTCHA_IMAGE_SUBDIR}
|| 'captcha';
my $tmpdir = "$Vend::Cfg->{ScratchDir}/$subdir";
mkdir($tmpdir) unless -d $tmpdir;
my $imgdir = $opt->{image_location} || $::Variable->{CAPTCHA_IMAGE_LOCATION};
unless ($imgdir ) {
if(! $Global::NoAbsolute and $::Variable->{DOCROOT}) {
$imgdir = "$::Variable->{DOCROOT}$::Variable->{IMAGE_DIR}/$subdir";
CAPTCHA_IMAGE_PATH — specify web server path containing "captcha" images
The variable specifies a web server location where the generated captcha image files are found, and from where they can be requested by clients.
Interchange 5.7.0:
Source: code/SystemTag/captcha.coretag
Line 62 (context shows lines 52-66)
unless ($imgdir ) {
if(! $Global::NoAbsolute and $::Variable->{DOCROOT}) {
$imgdir = "$::Variable->{DOCROOT}$::Variable->{IMAGE_DIR}/$subdir";
}
else {
$imgdir = "images/$subdir";
}
}
my $imgpath = $opt->{image_path}
|| $::Variable->{CAPTCHA_IMAGE_PATH}
|| "$::Variable->{IMAGE_DIR}/$subdir";
my $captcha = Authen::Captcha->new(
CAPTCHA_IMAGE_SUBDIR — specify subdirectory containing "captcha" images
The variable specifies just a subdirectory name where the generated captcha image are to be saved, and from where they can be requested by clients.
Interchange 5.7.0:
Source: code/SystemTag/captcha.coretag
Line 44 (context shows lines 34-48)
$func =~ s/[^a-z]+//g;
my $result = '';
if($func eq 'code') {
$result = $Vend::Session->{captcha};
}
$opt->{length} ||= 4;
my $en = $opt->{error_name} || 'captcha';
my $subdir = $opt->{image_subdir}
|| $::Variable->{CAPTCHA_IMAGE_SUBDIR}
|| 'captcha';
my $tmpdir = "$Vend::Cfg->{ScratchDir}/$subdir";
mkdir($tmpdir) unless -d $tmpdir;
CAPTCHA_UMASK
Interchange 5.7.0:
Source: code/SystemTag/captcha.coretag
Line 99 (context shows lines 89-103)
elsif($status == -2) {
$Tag->error( { name => $en, set => "Code never generated" });
return 0;
}
elsif($status == -3) {
$Tag->error( { name => $en, set => "Code doesn't match" });
return 0;
}
}
else {
my $save_u = umask($::Variable->{CAPTCHA_UMASK} || 2);
if($opt->{reset}) {
undef $Vend::Captcha;
delete $Vend::Session->{captcha};
CAT_ROOT
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 402 (context shows lines 392-406 in googlecheckout():399)
}
package Vend::Payment;
use strict;
my ($gcourl,$merchantid,$merchantkey,$gcoserver,$xmlOut, $taxrate, $state, \
\
$header, $gcorequest, $actual, $orderID);
sub googlecheckout {
my ($opt, $purchaseID, $mv_order_number, $msg, $cart, %result);
$gcoserver = charge_param('googlehost') || $::Variable->{MV_PAYMENT_HOST} \
\
|| 'https://checkout.google.com/api/checkout/v2'; # live
my $catroot = charge_param('cat_root') || $::Variable->{CAT_ROOT};
my $ordersdir = charge_param('ordersdir') || 'orders';
my $currency = $::Values->{currency} || charge_param('currency') || 'GBP';
my $editbasketurl = charge_param('edit_basket_url') || $::Variable->{EDIT_BASKET_URL};
$editbasketurl =~ s/\.html$//i;
CGIWRAP_WORKAROUND — fix Cobalt CGIWrap problem
The variable controls the behavior of the Cobalt CGIwrap problem work-around code. When set, causes the script name to be removed from the URL pathinfo.
Example: Turn on the workaround code
Add the following to interchange.cfg:
Variable CGIWRAP_WORKAROUND 1
Interchange 5.7.0:
Source: lib/Vend/Dispatch.pm
Line 917 (context shows lines 907-921 in adjust_cgi():882)
$host = $Global::IpQuad == 0 ? 'nobody' : '';
my @ip;
@ip = split /\./, $CGI::ip;
$CGI::ip = '';
$CGI::ip = join ".", @ip[0 .. ($Global::IpQuad - 1)] if $Global::IpQuad;
}
#
# end AOL fix
# Fix Cobalt/CGIwrap problem
if($Global::Variable->{CGIWRAP_WORKAROUND}) {
$CGI::path_info =~ s!^$CGI::script_name!!;
}
$CGI::host = $host || $CGI::ip;
COMPANY — specify company or entity name
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 1166 (context shows lines 1156-1170 in readin():1078)
if(-f "$dir/.autoload") {
my $status = ::interpolate_html( readfile("$dir/.autoload") );
$status =~ s/\s+//g;
undef $level if $status;
}
$gate = check_gate($file,$dir)
if defined $level;
}
if( defined $level and ! check_security($file, $level, $gate) ){
my $realm = $::Variable->{COMPANY} || $Vend::Cat;
if(-f "$try/violation$suffix") {
$fn = "$try/violation$suffix";
}
else {
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 935 (context shows lines 925-939 in googlecheckout():399)
$sth = $dbh->prepare("UPDATE transactions SET txtype='GCO - $gco_financial_state', \
gco_fulfillment_state='$gco_fulfillment_state',gco_timestamp='$gco_timestamp' \
WHERE gco_order_number='$gco_order_number'");
}
$sth->execute() or die errmsg("Cannot update transactions tbl for \
gco '$gco_order_number'") unless defined $::Values->{mv_order_number};
#::logDebug(":GCO:".__LINE__.": gco_finstate=$gco_financial_state; txtype=$txtype; \
neworderno=$new_order_no; pID=$purchaseID");
}
my ($mailout, $finstatus);
if ($gco_financial_state =~ /PAYMENT_DECLINED/i) {
$mailout = <<EOM;
Card payment for Google Order number $gco_order_number from $::Variable->{COMPANY}, \
$order_total, was
declined by your bank. Please use an alternative means of payment if you \
wish to proceed with this order.
EOM
$finstatus = "declined by your bank";
}
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 942 (context shows lines 932-946 in googlecheckout():399)
if ($gco_financial_state =~ /PAYMENT_DECLINED/i) {
$mailout = <<EOM;
Card payment for Google Order number $gco_order_number from $::Variable->{COMPANY}, \
\
$order_total, was
declined by your bank. Please use an alternative means of payment if you \
\
wish to proceed with this order.
EOM
$finstatus = "declined by your bank";
}
elsif ($gco_financial_state =~ /CANCELLED/i) {
$mailout = <<EOM;
Google Order number $gco_order_number from $::Variable->{COMPANY} has been cancelled.
EOM
$finstatus = "cancelled";
}
Source: lib/Vend/Payment/iTransact.pm
Line 222 (context shows lines 212-226 in itransact():217)
}
package Vend::Payment;
sub itransact {
my ($opt, $amount) = @_;
my $user = $opt->{id} || charge_param('id');
my $company = $opt->{company} || "$::Variable->{COMPANY} Order";
my %actual;
if($opt->{actual}) {
%actual = %{$opt->{actual}};
Source: lib/Vend/Payment/Protx2.pm
Line 569 (context shows lines 559-573 in protx():525)
::logError("%s: using logdir %s instead of disallowed %s", __PACKAGE__, \
$default_logdir, $logdir);
$logdir = $default_logdir;
}
$logdir = Vend::File::make_absolute_file($logdir);
my $logzero = charge_param('logzero') || 'no';
my $available = charge_param('available') || 'no';
my $logempty = $::Values->{logempty} || charge_param('logempty') || 'no';
my $double_pay = $::Values->{double_pay} || charge_param('double_pay') || 'no';
my $findcard = charge_param('find_card_type') || 'no'; # yes for \
auto, page for input, no for IC
my $description = charge_param('description') || $::Variable->{COMPANY};
$description = substr($description,0,99);
my $applyAVSCV2 = $::Values->{applyavscv2} || charge_param('applyavscv2') || '0';
# if payment is logged as made, raise an error message and exit
Source: lib/Vend/Payment/SagePay.pm
Line 1133 (context shows lines 1123-1137 in sagepay():576)
for my $line (split /\r\n/, $page) {
$result{VPSTxID} = $1 if ($line =~ /VPSTxId=(.*)/i);
$result{Authorised} = $1 if ($line =~ /^Authorised=(.*)/i);
$result{TxAuthNo} = $1 if ($line =~ /VPSAuthCode=(.*)/i);
}
#::logDebug("SP".__LINE__.": checkstatus,result=$result{Authorised}; authcode=$result{VPSAuthCode}; \
vtxcode=$vendorTxCode");
unless ($result{Authorised} =~ /YES/i) {
my $unknown = <<EOF;
ATTENTION: our payment processor has met an unexpected problem and we do not know if payment has
been taken or not. Please check back with $::Variable->{COMPANY} on $::Variable->{PHONE}, \
quoting this
important reference point:
<p>
VendorTxCode: $::Session->{sagepay}{vendorTxCode}
<p>
Source: dist/standard/config/breadcrumbs.tag
Line 119 (context shows lines 109-123)
key => $record->{category},
title => $record->{category},
description => undef,
url => $Tag->area({ search => join "\n", @parms }),
};
}
}
if(! $ptitle) {
$ptitle = $Scratch->{page_title};
$ptitle =~ s/(\s*\W+\s*)?$Variable->{COMPANY}(\s*\W+\s*)?//;
}
$ptitle =~ s/^\s+//;
$ptitle =~ s/\s+$//;
CONTINUE_SHOPPING_URL
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 408 (context shows lines 398-412 in googlecheckout():399)
sub googlecheckout {
my ($opt, $purchaseID, $mv_order_number, $msg, $cart, %result);
$gcoserver = charge_param('googlehost') || $::Variable->{MV_PAYMENT_HOST} \
\
\
\
|| 'https://checkout.google.com/api/checkout/v2'; # live
my $catroot = charge_param('cat_root') || $::Variable->{CAT_ROOT};
my $ordersdir = charge_param('ordersdir') || 'orders';
my $currency = $::Values->{currency} || charge_param('currency') || 'GBP';
my $editbasketurl = charge_param('edit_basket_url') || $::Variable->{EDIT_BASKET_URL};
$editbasketurl =~ s/\.html$//i;
$editbasketurl .= ".html?id=$::Session->{id}";
my $continueshoppingurl = charge_param('continue_shopping_url') || $::Variable->{CONTINUE_SHOPPING_URL};
my $receipturl = charge_param('receipt_url') || $::Variable->{RECEIPT_URL};
my $gcoipn_url = charge_param('gcoipn_url') || $::Variable->{GCOIPN_URL};
my $gcocmd_url = charge_param('gcocmd_url') || $::Variable->{GCOCMD_URL}; \
# from IC admin panel, not from GCO
my $chargecard = $::Values->{charge_card} || charge_param('charge_card') || '1';
CONTRAST
Interchange 5.7.0:
Source: lib/Vend/Options/Simple.pm
Line 341 (context shows lines 331-345 in admin_page():255)
return ''; [/perl] [/if] <form action="[area @@MV_PAGE@@]" method="post"> [if scratch ui_failure] <p> <blockquote> <font color="__CONTRAST__">[scratch ui_failure][set ui_failure][/set]</font> </blockquote> <p> [/if]
Source: lib/Vend/Options/Simple.pm
Line 349 (context shows lines 339-353 in admin_page():255)
<p> <blockquote> <font color="__CONTRAST__">[scratch ui_failure][set ui_failure][/set]</font> </blockquote> <p> [/if] [if scratch ui_message] <p> <blockquote> <font color="__CONTRAST__">[scratch ui_message][set ui_message][/set]</font> </blockquote> <p> [/if]
Source: lib/Vend/Payment/SagePay.pm
Line 106 (context shows lines 96-110)
<input type="hidden" name="TermUrl" value="[scratch termurl]" />
<input type="hidden" name="MD" value="[scratch md]" />
</form>
</body>
along with whatever <noscript> equivalent you want. This will retrieve \
the bank's page within the iframe.
Add a page in pages/ord/, tdsreturn.html, consisting of this:
[charge route="sagepay" sagepayrequest="3dsreturn"]
<p>
<blockquote>
<font color="__CONTRAST__">
[error all=1 keep=1 show_error=1 show_label=1 joiner="<br>"]
</font>
</blockquote>
CREDIT_CARDS_ACCEPTED
Interchange 5.7.0:
Source: lib/Vend/Payment/PaypalExpress.pm
Line 460 (context shows lines 450-464 in paypalexpress():266)
$::Scratch->{token} = $result{Token};
if (!$result{Token}) {
if ($result{Ack} eq 'Failure') {
foreach my $i ($result{Errors}) {
$::Session->{errors}{PaypalExpress} .= "$i->{LongMessage}, ";
}
$::Session->{errors}{PaypalExpress} =~ s/, $//;
}
else {
my $accepted = uc($::Variable->{CREDIT_CARDS_ACCEPTED});
$::Session->{errors}{PaypalExpress} = errmsg("Paypal is currently \
unavailable - please use our secure payment system instead. We accept $accepted cards");
}
return $Tag->deliver({ location => $checkouturl })
}
CSS_CONTRAST — CSS class to designate problems
CSS_CONTRAST is used by error and formel to
designate problems. Both use mv_contrast as default if
CSS_CONTRAST has no value.
Interchange 5.7.0:
Source: code/UserTag/formel.tag
Line 41 (context shows lines 31-45)
}
else {
$error = $Tag->error({name => $checkfor, keep => $keep});
}
if ($error) {
if ($opt->{signal}) {
sprintf($opt->{signal}, $label);
}
else {
my $contrast = $::Variable->{CSS_CONTRAST} || 'mv_contrast';
qq{<span class="$contrast">$label</span>};
}
}
else {
Source: code/SystemTag/error.coretag
Line 133 (context shows lines 123-137 in tag_error():33)
# store the error label in user's session for later
# possible use in [error show_label=1] calls
$Vend::Session->{errorlabels}{$var} = $opt->{std_label};
if($text) {
# do nothing
}
elsif(defined $::Variable->{MV_ERROR_STD_LABEL}) {
$text = $::Variable->{MV_ERROR_STD_LABEL};
}
else {
my $contrast = $::Variable->{CSS_CONTRAST} || 'mv_contrast';
$text = <<EOF;
<span class="$contrast">{LABEL} <small><i>(%s)</i></small></span>
[else]{REQUIRED <b>}{LABEL}{REQUIRED </b>}[/else]
EOF
CYBER_ID — specify ID for communication with selected payment gateways
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 301 (context shows lines 291-305 in echo():274)
my (%actual) = map_actual();
my @errMsgs = ();
# Required for validation
if (! $user) {
$user = $opt->{id} ||
charge_param('id') ||
$::Variable->{ECHO_PAYMENT_ID} ||
$::Variable->{MV_PAYMENT_ID} ||
$::Variable->{CYBER_ID}
or push @errMsgs, "No payment ID found.";
}
# Required for validation
CYBER_PRECISION — specify precision to be used with selected payment gateways
The variable defines the precision (number of decimal places) to be used with selected payment gateways.
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 334 (context shows lines 324-338 in echo():274)
charge_param('server') ||
$::Variable->{ECHO_PAYMENT_SERVER} ||
$::Variable->{MV_PAYMENT_SERVER} ||
$::Variable->{CYBER_SERVER} ||
'https://wwws.echo-inc.com/scripts/INR200.EXE';
my $precision = $opt->{precision} ||
charge_param('precision') ||
$::Variable->{ECHO_PAYMENT_PRECISION} ||
$::Variable->{MV_PAYMENT_PRECISION} ||
$::Variable->{CYBER_PRECISION} ||
2;
##### ECHO SPECIFIC VARIABLES #####
CYBER_SECRET — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 311 (context shows lines 301-315 in echo():274)
$::Variable->{CYBER_ID}
or push @errMsgs, "No payment ID found.";
}
# Required for validation
if (! $secret) {
$secret = $opt->{secret} ||
charge_param('secret') ||
$::Variable->{ECHO_PAYMENT_SECRET} ||
$::Variable->{MV_PAYMENT_SECRET} ||
$::Variable->{CYBER_SECRET}
or push @errMsgs, "No payment secret found.";
}
if (scalar @errMsgs) {
CYBER_SERVER — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 327 (context shows lines 317-331 in echo():274)
::logError($_);
}
return 0;
}
@errMsgs = ();
my $server = $opt->{server} ||
charge_param('server') ||
$::Variable->{ECHO_PAYMENT_SERVER} ||
$::Variable->{MV_PAYMENT_SERVER} ||
$::Variable->{CYBER_SERVER} ||
'https://wwws.echo-inc.com/scripts/INR200.EXE';
my $precision = $opt->{precision} ||
charge_param('precision') ||
DEBUG — enable Interchange debugging
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 2116 (context shows lines 2106-2120 in send_mail():1998)
last SMTP unless $none and $mhost;
eval {
require Net::SMTP;
};
last SMTP if $@;
$ok = 0;
$using = "Net::SMTP (mail server $mhost)";
#::logDebug("using $using");
undef $none;
my $smtp = Net::SMTP->new($mhost, Debug => $Global::Variable->{DEBUG}, \
Hello => $helo) or last SMTP;
#::logDebug("smtp object $smtp");
my $from = $::Variable->{MV_MAILFROM}
|| $Global::Variable->{MV_MAILFROM}
Source: lib/Vend/Email.pm
Line 679 (context shows lines 669-683 in send_mail_legacy():561)
last SMTP unless $none and $mhost;
eval {
require Net::SMTP;
};
last SMTP if $@;
$ok = 0;
$using = "Net::SMTP (mail server $mhost)";
#::logDebug("using $using");
undef $none;
my $smtp = Net::SMTP->new($mhost, Debug => $Global::Variable->{DEBUG}, Hello => $helo);
#::logDebug("smtp object $smtp");
my $from = $::Variable->{MV_MAILFROM}
|| $Global::Variable->{MV_MAILFROM}
DESCRIPTIONFIELDS
Interchange 5.7.0:
Source: code/SystemTag/image.tag
Line 22 (context shows lines 12-26)
UserTag image AttrAlias resize makesize
UserTag image AddAttr
UserTag image Version $Revision: 1.24 $
UserTag image Routine <<EOR
sub {
my ($src, $opt) = @_;
my ($image, $path, $secure, $sku);
my ($imagedircurrent, $imagedir, $imagedirsecure);
my @descriptionfields = grep /\S/, split /\s+/,
$opt->{descriptionfields} || $::Variable->{DESCRIPTIONFIELDS} || $Vend::Cfg->{DescriptionField};
@descriptionfields = qw( description ) if ! @descriptionfields;
my @imagefields = grep /\S/, split /\s+/,
$opt->{imagefields} || $::Variable->{IMAGEFIELDS};
DOCROOT — filesystem path to catalog's document root
Interchange 5.7.0:
Source: code/UserTag/button.tag
Line 38 (context shows lines 28-42)
my @js;
my $image;
my @from_html = qw/class id style/;
if($src) {
if( $opt->{srcliteral} || $src =~ m{^https?://}i ) {
$image = $src;
}
else {
my $dr = $::Variable->{DOCROOT};
my $id = $Tag->image( { dir_only => 1 } );
$id =~ s:/+$::;
$id =~ s:/~[^/]+::;
Source: code/SystemTag/image.tag
Line 124 (context shows lines 114-128)
}
}
}
}
push @srclist, $sku if $sku;
push @srclist, $opt->{default} if $opt->{default};
if ($opt->{imagesubdir}) {
$opt->{imagesubdir} .= '/' unless $opt->{imagesubdir} =~ m:/$:;
}
my $dr = $::Variable->{DOCROOT};
my $id = $imagedircurrent;
$id =~ s:/+$::;
$id =~ s:/~[^/]+::;
Source: code/SystemTag/captcha.coretag
Line 53 (context shows lines 43-57)
my $subdir = $opt->{image_subdir}
|| $::Variable->{CAPTCHA_IMAGE_SUBDIR}
|| 'captcha';
my $tmpdir = "$Vend::Cfg->{ScratchDir}/$subdir";
mkdir($tmpdir) unless -d $tmpdir;
my $imgdir = $opt->{image_location} || $::Variable->{CAPTCHA_IMAGE_LOCATION};
unless ($imgdir ) {
if(! $Global::NoAbsolute and $::Variable->{DOCROOT}) {
$imgdir = "$::Variable->{DOCROOT}$::Variable->{IMAGE_DIR}/$subdir";
}
else {
$imgdir = "images/$subdir";
ECHO_PAYMENT_DEBUG
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 346 (context shows lines 336-350 in echo():274)
##### ECHO SPECIFIC VARIABLES #####
my $order_type = $::Variable->{ECHO_PAYMENT_ORDER_TYPE} || 'S';
my $isp_echo_id = $::Variable->{ECHO_PAYMENT_ISP_ECHO_ID};
my $isp_pin = $::Variable->{ECHO_PAYMENT_ISP_PIN};
my $merchant_email = $::Variable->{ECHO_PAYMENT_MERCHANT_EMAIL};
# Set to 'C' for Certify mode to check compliance with the ECHO spec on a
# transaction-by-transaction basis. 'T' or 'TRUE' for full ECHO debugging.
my $debug = $::Variable->{ECHO_PAYMENT_DEBUG};
##########################
$actual{mv_credit_card_exp_month} =~ s/\D//g;
ECHO_PAYMENT_ID — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 299 (context shows lines 289-303 in echo():274)
#::logDebug("echo called, args=" . ::uneval(\@_));
my (%actual) = map_actual();
my @errMsgs = ();
# Required for validation
if (! $user) {
$user = $opt->{id} ||
charge_param('id') ||
$::Variable->{ECHO_PAYMENT_ID} ||
$::Variable->{MV_PAYMENT_ID} ||
$::Variable->{CYBER_ID}
or push @errMsgs, "No payment ID found.";
}
ECHO_PAYMENT_ISP_ECHO_ID
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 340 (context shows lines 330-344 in echo():274)
my $precision = $opt->{precision} ||
charge_param('precision') ||
$::Variable->{ECHO_PAYMENT_PRECISION} ||
$::Variable->{MV_PAYMENT_PRECISION} ||
$::Variable->{CYBER_PRECISION} ||
2;
##### ECHO SPECIFIC VARIABLES #####
my $order_type = $::Variable->{ECHO_PAYMENT_ORDER_TYPE} || 'S';
my $isp_echo_id = $::Variable->{ECHO_PAYMENT_ISP_ECHO_ID};
my $isp_pin = $::Variable->{ECHO_PAYMENT_ISP_PIN};
my $merchant_email = $::Variable->{ECHO_PAYMENT_MERCHANT_EMAIL};
# Set to 'C' for Certify mode to check compliance with the ECHO spec on a
ECHO_PAYMENT_ISP_PIN
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 341 (context shows lines 331-345 in echo():274)
charge_param('precision') ||
$::Variable->{ECHO_PAYMENT_PRECISION} ||
$::Variable->{MV_PAYMENT_PRECISION} ||
$::Variable->{CYBER_PRECISION} ||
2;
##### ECHO SPECIFIC VARIABLES #####
my $order_type = $::Variable->{ECHO_PAYMENT_ORDER_TYPE} || 'S';
my $isp_echo_id = $::Variable->{ECHO_PAYMENT_ISP_ECHO_ID};
my $isp_pin = $::Variable->{ECHO_PAYMENT_ISP_PIN};
my $merchant_email = $::Variable->{ECHO_PAYMENT_MERCHANT_EMAIL};
# Set to 'C' for Certify mode to check compliance with the ECHO spec on a
# transaction-by-transaction basis. 'T' or 'TRUE' for full ECHO debugging.
ECHO_PAYMENT_MERCHANT_EMAIL
ECHO_PAYMENT_MERCHANT_EMAIL is available in Interchange versions:
4.6.0-5.7.0 (git-head)
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 342 (context shows lines 332-346 in echo():274)
$::Variable->{ECHO_PAYMENT_PRECISION} ||
$::Variable->{MV_PAYMENT_PRECISION} ||
$::Variable->{CYBER_PRECISION} ||
2;
##### ECHO SPECIFIC VARIABLES #####
my $order_type = $::Variable->{ECHO_PAYMENT_ORDER_TYPE} || 'S';
my $isp_echo_id = $::Variable->{ECHO_PAYMENT_ISP_ECHO_ID};
my $isp_pin = $::Variable->{ECHO_PAYMENT_ISP_PIN};
my $merchant_email = $::Variable->{ECHO_PAYMENT_MERCHANT_EMAIL};
# Set to 'C' for Certify mode to check compliance with the ECHO spec on a
# transaction-by-transaction basis. 'T' or 'TRUE' for full ECHO debugging.
my $debug = $::Variable->{ECHO_PAYMENT_DEBUG};
ECHO_PAYMENT_ORDER_TYPE
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 339 (context shows lines 329-343 in echo():274)
my $precision = $opt->{precision} ||
charge_param('precision') ||
$::Variable->{ECHO_PAYMENT_PRECISION} ||
$::Variable->{MV_PAYMENT_PRECISION} ||
$::Variable->{CYBER_PRECISION} ||
2;
##### ECHO SPECIFIC VARIABLES #####
my $order_type = $::Variable->{ECHO_PAYMENT_ORDER_TYPE} || 'S';
my $isp_echo_id = $::Variable->{ECHO_PAYMENT_ISP_ECHO_ID};
my $isp_pin = $::Variable->{ECHO_PAYMENT_ISP_PIN};
my $merchant_email = $::Variable->{ECHO_PAYMENT_MERCHANT_EMAIL};
ECHO_PAYMENT_PRECISION — (partly documented)
The variable specifies the precision (number of decimal places) to use with the ECHO gateway.
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 332 (context shows lines 322-336 in echo():274)
my $server = $opt->{server} ||
charge_param('server') ||
$::Variable->{ECHO_PAYMENT_SERVER} ||
$::Variable->{MV_PAYMENT_SERVER} ||
$::Variable->{CYBER_SERVER} ||
'https://wwws.echo-inc.com/scripts/INR200.EXE';
my $precision = $opt->{precision} ||
charge_param('precision') ||
$::Variable->{ECHO_PAYMENT_PRECISION} ||
$::Variable->{MV_PAYMENT_PRECISION} ||
$::Variable->{CYBER_PRECISION} ||
2;
ECHO_PAYMENT_SECRET — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 309 (context shows lines 299-313 in echo():274)
$::Variable->{ECHO_PAYMENT_ID} ||
$::Variable->{MV_PAYMENT_ID} ||
$::Variable->{CYBER_ID}
or push @errMsgs, "No payment ID found.";
}
# Required for validation
if (! $secret) {
$secret = $opt->{secret} ||
charge_param('secret') ||
$::Variable->{ECHO_PAYMENT_SECRET} ||
$::Variable->{MV_PAYMENT_SECRET} ||
$::Variable->{CYBER_SECRET}
or push @errMsgs, "No payment secret found.";
}
ECHO_PAYMENT_SERVER — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 325 (context shows lines 315-329 in echo():274)
if (scalar @errMsgs) {
for (@errMsgs) {
::logError($_);
}
return 0;
}
@errMsgs = ();
my $server = $opt->{server} ||
charge_param('server') ||
$::Variable->{ECHO_PAYMENT_SERVER} ||
$::Variable->{MV_PAYMENT_SERVER} ||
$::Variable->{CYBER_SERVER} ||
'https://wwws.echo-inc.com/scripts/INR200.EXE';
EDIT_BASKET_URL
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 405 (context shows lines 395-409 in googlecheckout():399)
package Vend::Payment;
use strict;
my ($gcourl,$merchantid,$merchantkey,$gcoserver,$xmlOut, $taxrate, $state, \
\
\
$header, $gcorequest, $actual, $orderID);
sub googlecheckout {
my ($opt, $purchaseID, $mv_order_number, $msg, $cart, %result);
$gcoserver = charge_param('googlehost') || $::Variable->{MV_PAYMENT_HOST} \
\
\
|| 'https://checkout.google.com/api/checkout/v2'; # live
my $catroot = charge_param('cat_root') || $::Variable->{CAT_ROOT};
my $ordersdir = charge_param('ordersdir') || 'orders';
my $currency = $::Values->{currency} || charge_param('currency') || 'GBP';
my $editbasketurl = charge_param('edit_basket_url') || $::Variable->{EDIT_BASKET_URL};
$editbasketurl =~ s/\.html$//i;
$editbasketurl .= ".html?id=$::Session->{id}";
my $continueshoppingurl = charge_param('continue_shopping_url') || $::Variable->{CONTINUE_SHOPPING_URL};
my $receipturl = charge_param('receipt_url') || $::Variable->{RECEIPT_URL};
FORUM_ANON_NAME
Interchange 5.7.0:
Source: code/UserTag/forum.tag
Line 14 (context shows lines 4-18)
# 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 forum-userlink PosNumber 0
UserTag forum-userlink addAttr
UserTag forum-userlink Version 1.7
UserTag forum-userlink Routine <<EOR
sub {
my ($row) = @_;
return $row->{name} || $Variable->{FORUM_ANON_NAME} || 'Anonymous Coward'
if $row->{anon} or ! $row->{username};
my $realname = tag_data('userdb', 'handle', $row->{username})
|| tag_data('userdb', 'fname', $row->{username});
return $realname || $row->{username};
GCOCMD_URL
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 411 (context shows lines 401-415 in googlecheckout():399)
$gcoserver = charge_param('googlehost') || $::Variable->{MV_PAYMENT_HOST} \
\
\
\
\
\
\
|| 'https://checkout.google.com/api/checkout/v2'; # live
my $catroot = charge_param('cat_root') || $::Variable->{CAT_ROOT};
my $ordersdir = charge_param('ordersdir') || 'orders';
my $currency = $::Values->{currency} || charge_param('currency') || 'GBP';
my $editbasketurl = charge_param('edit_basket_url') || $::Variable->{EDIT_BASKET_URL};
$editbasketurl =~ s/\.html$//i;
$editbasketurl .= ".html?id=$::Session->{id}";
my $continueshoppingurl = charge_param('continue_shopping_url') || $::Variable->{CONTINUE_SHOPPING_URL};
my $receipturl = charge_param('receipt_url') || $::Variable->{RECEIPT_URL};
my $gcoipn_url = charge_param('gcoipn_url') || $::Variable->{GCOIPN_URL};
my $gcocmd_url = charge_param('gcocmd_url') || $::Variable->{GCOCMD_URL}; \
\
\
\
# from IC admin panel, not from GCO
my $chargecard = $::Values->{charge_card} || charge_param('charge_card') || '1';
my $basket_expiry = charge_param('basket_expiry') || $::Variable->{BASKET_EXPIRY} || '1 month';
my $default_taxrate = $::Values->{default_taxrate} || charge_param('default_taxrate') || '0.00';
my $reduced_taxrate = $::Values->{reduced_taxrate} || charge_param('reduced_taxrate') || '0.00';
GCOIPN_URL
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 410 (context shows lines 400-414 in googlecheckout():399)
my ($opt, $purchaseID, $mv_order_number, $msg, $cart, %result);
$gcoserver = charge_param('googlehost') || $::Variable->{MV_PAYMENT_HOST} \
\
\
\
\
\
|| 'https://checkout.google.com/api/checkout/v2'; # live
my $catroot = charge_param('cat_root') || $::Variable->{CAT_ROOT};
my $ordersdir = charge_param('ordersdir') || 'orders';
my $currency = $::Values->{currency} || charge_param('currency') || 'GBP';
my $editbasketurl = charge_param('edit_basket_url') || $::Variable->{EDIT_BASKET_URL};
$editbasketurl =~ s/\.html$//i;
$editbasketurl .= ".html?id=$::Session->{id}";
my $continueshoppingurl = charge_param('continue_shopping_url') || $::Variable->{CONTINUE_SHOPPING_URL};
my $receipturl = charge_param('receipt_url') || $::Variable->{RECEIPT_URL};
my $gcoipn_url = charge_param('gcoipn_url') || $::Variable->{GCOIPN_URL};
my $gcocmd_url = charge_param('gcocmd_url') || $::Variable->{GCOCMD_URL}; \
\
\
# from IC admin panel, not from GCO
my $chargecard = $::Values->{charge_card} || charge_param('charge_card') || '1';
my $basket_expiry = charge_param('basket_expiry') || $::Variable->{BASKET_EXPIRY} || '1 month';
my $default_taxrate = $::Values->{default_taxrate} || charge_param('default_taxrate') || '0.00';
GIFT_CERT_COUNTER
Interchange 5.7.0:
Source: dist/standard/config/pay_cert.tag
Line 17 (context shows lines 7-21)
#
# $Id: pay_cert.tag,v 1.4 2009-05-01 13:50:00 pajamian Exp $
UserTag pay-cert Order code
UserTag pay-cert addAttr
UserTag pay-cert Routine <<EOR
sub {
my ($code, $opt) = @_;
use vars qw/$Tag/;
my $counter_file = $::Variable->{GIFT_CERT_COUNTER} || 'etc/pay_cert.number';
my $cert_table = $::Variable->{GIFT_CERT_TABLE} || 'pay_certs';
my $redeem_table = $::Variable->{GIFT_CERT_REDEEM_TABLE} || 'pay_cert_redeem';
my $lock_table = $::Variable->{GIFT_CERT_LOCK_TABLE} || 'pay_cert_lock';
GIFT_CERT_LOCK_TABLE
Interchange 5.7.0:
Source: dist/standard/config/pay_cert.tag
Line 20 (context shows lines 10-24)
UserTag pay-cert Order code
UserTag pay-cert addAttr
UserTag pay-cert Routine <<EOR
sub {
my ($code, $opt) = @_;
use vars qw/$Tag/;
my $counter_file = $::Variable->{GIFT_CERT_COUNTER} || 'etc/pay_cert.number';
my $cert_table = $::Variable->{GIFT_CERT_TABLE} || 'pay_certs';
my $redeem_table = $::Variable->{GIFT_CERT_REDEEM_TABLE} || 'pay_cert_redeem';
my $lock_table = $::Variable->{GIFT_CERT_LOCK_TABLE} || 'pay_cert_lock';
my $ldb = dbref($lock_table)
or die errmsg("cannot open payment certs lock table '%s'", $lock_table);
GIFT_CERT_REDEEM_TABLE
Interchange 5.7.0:
Source: dist/standard/config/pay_cert.tag
Line 19 (context shows lines 9-23)
UserTag pay-cert Order code
UserTag pay-cert addAttr
UserTag pay-cert Routine <<EOR
sub {
my ($code, $opt) = @_;
use vars qw/$Tag/;
my $counter_file = $::Variable->{GIFT_CERT_COUNTER} || 'etc/pay_cert.number';
my $cert_table = $::Variable->{GIFT_CERT_TABLE} || 'pay_certs';
my $redeem_table = $::Variable->{GIFT_CERT_REDEEM_TABLE} || 'pay_cert_redeem';
my $lock_table = $::Variable->{GIFT_CERT_LOCK_TABLE} || 'pay_cert_lock';
my $ldb = dbref($lock_table)
or die errmsg("cannot open payment certs lock table '%s'", $lock_table);
GIFT_CERT_TABLE
Interchange 5.7.0:
Source: dist/standard/config/pay_cert.tag
Line 18 (context shows lines 8-22)
# $Id: pay_cert.tag,v 1.4 2009-05-01 13:50:00 pajamian Exp $
UserTag pay-cert Order code
UserTag pay-cert addAttr
UserTag pay-cert Routine <<EOR
sub {
my ($code, $opt) = @_;
use vars qw/$Tag/;
my $counter_file = $::Variable->{GIFT_CERT_COUNTER} || 'etc/pay_cert.number';
my $cert_table = $::Variable->{GIFT_CERT_TABLE} || 'pay_certs';
my $redeem_table = $::Variable->{GIFT_CERT_REDEEM_TABLE} || 'pay_cert_redeem';
my $lock_table = $::Variable->{GIFT_CERT_LOCK_TABLE} || 'pay_cert_lock';
my $ldb = dbref($lock_table)
GPG_PATH — location of the gpg program
Interchange 5.7.0:
Source: code/UI_Tag/get_gpg_keys.coretag
Line 16 (context shows lines 6-20)
# (at your option) any later version. See the LICENSE file for details.
#
# $Id: get_gpg_keys.coretag,v 1.5 2007-03-30 23:40:54 pajamian Exp $
UserTag get-gpg-keys Order dir
UserTag get-gpg-keys addAttr
UserTag get-gpg-keys Version $Revision: 1.5 $
UserTag get-gpg-keys Routine <<EOR
sub {
my ($dir, $opt) = @_;
my $gpgexe = $Global::Variable->{GPG_PATH} || 'gpg';
my $flags = "--list-keys";
if($dir) {
$dir = filter_value('filesafe', $dir);
Source: code/UI_Tag/add_gpg_key.coretag
Line 16 (context shows lines 6-20)
# (at your option) any later version. See the LICENSE file for details.
#
# $Id: add_gpg_key.coretag,v 1.6 2007-03-30 23:40:54 pajamian Exp $
UserTag add-gpg-key Order name
UserTag add-gpg-key addAttr
UserTag add-gpg-key Version $Revision: 1.6 $
UserTag add-gpg-key Routine <<EOR
sub {
my ($name, $opt) = @_;
my $gpgexe = $Global::Variable->{GPG_PATH} || 'gpg';
my $outfile = "$Vend::Cfg->{ScratchDir}/$Vend::Session->{id}.gpg_results";
my $flags = "--import --batch 2> $outfile";
HEADERBG
Interchange 5.7.0:
Source: code/UserTag/title_bar.tag
Line 20 (context shows lines 10-24)
UserTag title-bar Order width size color
UserTag title-bar PosNumber 3
UserTag title-bar Interpolate 1
UserTag title-bar HasEndTag 1
UserTag title-bar Version $Revision: 1.4 $
UserTag title-bar Routine <<EOR
sub {
my ($width, $size, $color, $text) = @_;
$width = 500 unless defined $width;
$size = 6 unless defined $size;
$color = ($::Variable->{HEADERBG} || '#444444') unless defined $color;
$color = qq{BGCOLOR="$color"} unless $color =~ /^\s*bgcolor=/i;
my $tcolor = $::Variable->{HEADERTEXT} || 'WHITE';
$text = qq{<FONT COLOR="$tcolor" SIZE="$size">$text</FONT>};
return <<EOF;
HEADERTEXT
Interchange 5.7.0:
Source: code/UserTag/title_bar.tag
Line 22 (context shows lines 12-26)
UserTag title-bar Interpolate 1
UserTag title-bar HasEndTag 1
UserTag title-bar Version $Revision: 1.4 $
UserTag title-bar Routine <<EOR
sub {
my ($width, $size, $color, $text) = @_;
$width = 500 unless defined $width;
$size = 6 unless defined $size;
$color = ($::Variable->{HEADERBG} || '#444444') unless defined $color;
$color = qq{BGCOLOR="$color"} unless $color =~ /^\s*bgcolor=/i;
my $tcolor = $::Variable->{HEADERTEXT} || 'WHITE';
$text = qq{<FONT COLOR="$tcolor" SIZE="$size">$text</FONT>};
return <<EOF;
<TABLE CELLSPACING=0 CELLPADDING=6 WIDTH="$width"><TR><TD VALIGN=CENTER \
$color>$text</TD></TR></TABLE>
EOF
HTMLAREA_FLAVOUR — selects rich text editor flavour
Interchange 5.7.0:
Source: code/Widget/htmlarea.widget
Line 155 (context shows lines 145-159)
{CONFIG?}{CONFIG}({NAME}FCKeditor);{/CONFIG?}
{NAME}FCKeditor.ReplaceTextarea() ;
});
</script>
|,
area => qq|<textarea id="{NAME}" rows="{HEIGHT}" cols="{WIDTH}" \
name="{NAME}">{VALUE}</textarea>|,
post => ''
});
my $flavour = $opt->{flavour} || $::Variable->{HTMLAREA_FLAVOUR} || 'htmlarea';
my $fname = $opt->{form_name} || 'editor';
my $callpage = $opt->{append} || 'special/kupu';
HTMLAREA_LANG
Interchange 5.7.0:
Source: code/Widget/htmlarea.widget
Line 175 (context shows lines 165-179)
$pname =~ s/\W/_/g;
unless(defined $opt->{close_window}) {
$opt->{close_window} = 1;
}
if(! $::Scratch->{htmlarea_added}) {
$Tag->tmp({ name => 'htmlarea_added', body => 1 });
$::Scratch->{meta_header} ||= '';
my $path = $::Variable->{HTMLAREA_PATH} || $flavours{$flavour}->{path};
my $lang = $::Variable->{HTMLAREA_LANG} || $::Scratch->{mv_locale} || 'en';
$lang = substr($lang, 0, 2);
$path =~ s:/*$:/:;
$::Scratch->{meta_header} .= $Tag->uc_attr_list({hash => {path => $path, \
\
lang => $lang}}, $flavours{$flavour}->{header});
}
HTMLAREA_PATH
Interchange 5.7.0:
Source: code/Widget/htmlarea.widget
Line 174 (context shows lines 164-178)
$pname =~ s/\W/_/g;
unless(defined $opt->{close_window}) {
$opt->{close_window} = 1;
}
if(! $::Scratch->{htmlarea_added}) {
$Tag->tmp({ name => 'htmlarea_added', body => 1 });
$::Scratch->{meta_header} ||= '';
my $path = $::Variable->{HTMLAREA_PATH} || $flavours{$flavour}->{path};
my $lang = $::Variable->{HTMLAREA_LANG} || $::Scratch->{mv_locale} || 'en';
$lang = substr($lang, 0, 2);
$path =~ s:/*$:/:;
$::Scratch->{meta_header} .= $Tag->uc_attr_list({hash => {path => $path, \
lang => $lang}}, $flavours{$flavour}->{header});
IMAGEFIELDS
Interchange 5.7.0:
Source: code/SystemTag/image.tag
Line 26 (context shows lines 16-30)
sub {
my ($src, $opt) = @_;
my ($image, $path, $secure, $sku);
my ($imagedircurrent, $imagedir, $imagedirsecure);
my @descriptionfields = grep /\S/, split /\s+/,
$opt->{descriptionfields} || $::Variable->{DESCRIPTIONFIELDS} || $Vend::Cfg->{DescriptionField};
@descriptionfields = qw( description ) if ! @descriptionfields;
my @imagefields = grep /\S/, split /\s+/,
$opt->{imagefields} || $::Variable->{IMAGEFIELDS};
@imagefields = qw( image ) if ! @imagefields;
my @imagesuffixes = qw( jpg gif png jpeg );
my $filere = qr/\.\w{2,4}$/;
IMAGE_DIR — (obsolete)
Interchange 5.7.0:
Source: code/SystemTag/captcha.coretag
Line 63 (context shows lines 53-67)
if(! $Global::NoAbsolute and $::Variable->{DOCROOT}) {
$imgdir = "$::Variable->{DOCROOT}$::Variable->{IMAGE_DIR}/$subdir";
}
else {
$imgdir = "images/$subdir";
}
}
my $imgpath = $opt->{image_path}
|| $::Variable->{CAPTCHA_IMAGE_PATH}
|| "$::Variable->{IMAGE_DIR}/$subdir";
my $captcha = Authen::Captcha->new(
data_folder => $tmpdir,
IMAGE_MOGRIFY — specify path to the ImageMagick mogrify command
Specify full filesystem path to the ImageMagick mogrify command.
ImageMagick's functions are used to perform image manipulation, such as resizing and format conversion (and that's not all, ImageMagick is a very capable tool).
On a case by case basis, Interchange code might attempt an autodetection of the mogrify command location.
Interchange 5.7.0:
Source: code/SystemTag/image.tag
Line 211 (context shows lines 201-215)
my $mgkpath = $newpath;
my $ext;
$mgkpath =~ s/\.(\w+)$/.mgk/
and $ext = $1;
File::Copy::copy($path, $newpath)
or do {
logError("%s: Unable to create image '%s'", 'image tag', $newpath);
last MOGIT;
};
my $exec = $Global::Variable->{IMAGE_MOGRIFY};
if(! $exec) {
my @dirs = split /:/, "/usr/X11R6/bin:$ENV{PATH}";
for(@dirs) {
next unless -x "$_/mogrify";
Source: code/SystemTag/image.tag
Line 217 (context shows lines 207-221)
or do {
logError("%s: Unable to create image '%s'", 'image tag', $newpath);
last MOGIT;
};
my $exec = $Global::Variable->{IMAGE_MOGRIFY};
if(! $exec) {
my @dirs = split /:/, "/usr/X11R6/bin:$ENV{PATH}";
for(@dirs) {
next unless -x "$_/mogrify";
$exec = "$_/mogrify";
$Global::Variable->{IMAGE_MOGRIFY} = $exec;
last;
}
}
last MOGIT unless $exec;
LANG — contains the current locale for language (localization) display
This variable contains the current locale for language localization and display. The variable is not set in the configuration files, but is manipulated by the Interchange daemon while it is runnning.
If you want to define catalog default language, set the
MV_LANG variable.
Example: Defining default language for a catalog
Put the following in catalog.cfg:
Variable MV_LANG fr_FR
Interchange 5.7.0:
Source: lib/Vend/Dispatch.pm
Line 1661 (context shows lines 1651-1665 in dispatch():1240)
# LEGACY
ROUTINES: {
last ROUTINES unless index($Vend::FinalPath, "/$Vend::Cfg->{ProcessPage}/") == 0;
while ($Vend::FinalPath =~ s{/$Vend::Cfg->{ProcessPage}/(locale|language \
|currency)/([^/]*)/}{/$Vend::Cfg->{ProcessPage}/}) {
$::Scratch->{"mv_$1"} = $2;
}
$Vend::FinalPath =~ s{/$Vend::Cfg->{ProcessPage}/page/}{/};
}
if(my $locale = $::Scratch->{mv_language}) {
$Global::Variable->{LANG}
= $::Variable->{LANG} = $locale;
}
# END LEGACY
Source: lib/Vend/Config.pm
Line 3291 (context shows lines 3281-3295 in parse_hash():3173)
}
},
Locale => sub {
#::logDebug("Doing Locale dispatch...");
my $locale = $::Scratch->{mv_locale};
my $curr = $::Scratch->{mv_currency};
$locale || $curr or return;
if($locale and ! $::Scratch->{mv_language}) {
$Global::Variable->{LANG}
= $::Variable->{LANG}
= $::Scratch->{mv_language}
= $locale;
}
Source: lib/Vend/File.pm
Line 165 (context shows lines 155-169 in readfile_db():153)
return unless $Vend::Cfg->{FileDatabase};
my ($tab, $col) = split /:+/, $Vend::Cfg->{FileDatabase};
my $db = $Vend::Interpolate::Db{$tab} || ::database_exists_ref($tab)
or return undef;
#::logDebug("tab=$tab exists, db=$db");
# I guess this is the best test
if($col) {
return undef unless $db->column_exists($col);
}
elsif ( $col = $Global::Variable->{LANG} and $db->column_exists($col) ) {
#do nothing
}
else {
$col = 'default';
LINE
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 490 (context shows lines 480-494 in googlecheckout():399)
if ($gcorequest eq 'post') {
undef $gcorequest;
my $salestax = $::Values->{tax} || Vend::Interpolate::salestax() || '0.00';
my $shipmode = $::Values->{mv_shipmode} || charge_param('default_shipmode') || 'upsg';
my $shipping = $::Session->{final_shipping} || Vend::Ship::shipping($shipmode) \
|| charge_param('default_shipping') || '0.00';
my $handling = $::Values->{handlingtotal} || Vend::Ship::tag_handling() || '';
$shipping += $handling;
my $shipmsg = $::Session->{ship_message};
my $subtotal = $::Values->{amount} || Vend::Interpolate::subtotal();
my $ordertotal = charge_param('amount') || Vend::Interpolate::total_cost();
print "GCO".__LINE__.": tax=$salestax; shipping=$shipping, $::Values->{mv_shipping}; \
shipmode=$shipmode\n";
my $defaultcountry = charge_param('defaultcountry');
my $defaultstate = charge_param('defaultstate');
my $country = uc($actual->{country});
$country = $defaultcountry unless $country;
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 504 (context shows lines 494-508 in googlecheckout():399)
$country = $defaultcountry unless $country;
my $state = uc($actual->{state});
$state = $defaultstate unless $state;
my $zip_pattern = $actual->{zip} || $::Values->{zip};
$zip_pattern =~ /(\S\S\S).*/;
$zip_pattern = "$1"."*";
my $taxshipping = 'false';
$taxshipping = 'true' if (($country =~ /$::Variable->{TAXSHIPPING}/) \
\
\
or ($state =~ /$::Variable->{TAXSHIPPING}/) or ($alwaystaxshipping == '1'));
::logDebug(":GCO:".__LINE__.": shipping=$::Session->{final_shipping}, $shipping; \
\
\
handling=$handling; taxshipping=$::Variable->{TAXSHIPPING}; \
\
\
country=$country; tx=$taxshipping");
my $stax = Vend::Interpolate::salestax();
print "GCO:".__LINE__.": stax=$stax; mvst=$::Values->{mv_salestax}, $::Values->{salestax}\n";
if ($salestax == '0') {
$taxrate = '0.00';
}
elsif ($taxshipping eq 'true') {
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 517 (context shows lines 507-521 in googlecheckout():399)
}
elsif ($taxshipping eq 'true') {
$taxrate = ($salestax / ($subtotal + $shipping) || '0');
}
elsif ($calculate_included_tax == '1') {
$taxrate = $default_taxrate;
}
else {
$taxrate = ($salestax / $subtotal || '0');
}
::logDebug(":GCO:".__LINE__.": subtotal=$subtotal; taxrate=$taxrate");
### Check that the currency sent to GCO is the one registered with them, or return to the checkout
my $user_currency = $::Scratch->{iso_currency_code} || $::Values->{iso_currency_code} || $currency;
#::logDebug(" ".__LINE__.": user currency = $user_currency, $::Scratch->{iso_currency_code}, \
$::Values->{iso_currency_code}; currency=$currency");
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 920 (context shows lines 910-924 in googlecheckout():399)
$cart = eval ($cart);
my $dbi = dbref('inventory') or die errmsg("cannot open inventory table");
my $dbhi = $dbi->dbh() or die errmsg("cannot get handle for tbl 'inventory'");
my ($sthi, $itm, $qty);
foreach my $items (@{$cart}) {
$itm = $items->{'code'};
$qty = $items->{'quantity'};
$sthi = $dbh->prepare("UPDATE inventory SET quantity = quantity \
-'$qty' WHERE sku = '$itm'");
$sthi->execute() or die errmsg("Cannot update table inventory");
::logDebug(":GCO:".__LINE__.": Decremented inventory for $itm by $qty");
}
}
}
else {
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 1337 (context shows lines 1327-1341 in sendxml():1325)
my $xmlOut = shift;
my $agent = LWP::UserAgent->new;
my $data = "$merchantid:$merchantkey";
my $signature = encode_base64($data, "");
$header = HTTP::Headers->new;
$header->header('Authorization' => "Basic " . $signature);
$header->header('Content-Type' => "application/xml; charset=UTF-8");
$header->header('Accept' => "application/xml");
my $request = HTTP::Request->new(POST => $gcourl, $header, $xmlOut);
my $response = $agent->request($request);
::logDebug(":GCO:".__LINE__.": sendxml: gcourl=$gcourl\nxmlOut=$xmlOut");
return $response->content;
}
1;
Source: lib/Vend/Payment/SagePay.pm
Line 781 (context shows lines 771-785 in sagepay():576)
my $customerEmail = $actual->{email};
$customerEmail =~ s/[^a-zA-Z0-9.\@\-_]//gi;
my $contactFax = $::Values->{fax} || '';
$contactFax =~ s/[\(\)]/ /g;
$contactFax =~ s/[^0-9-+ ]//gi;
my $giftAidPayment = $::Values->{giftaidpayment} || charge_param('giftaidpayment') || '0';
my $authCode = $::Values->{authcode} || '';
my $clientIPAddress = $CGI::remote_addr if $CGI::remote_addr;
$::Values->{authcode} = '';
::logDebug("SP".__LINE__.": bCity=$billingCity; mvccType=$cardType; start=$mvccStartDate; \
issue=$issue;");
# ISO currency code sent to SagePay, from the page or fall back to config files.
my $currency = $::Values->{iso_currency_code} || $::Values->{currency_code} \
|| $Vend::Cfg->{Locale}{iso_currency_code} ||
charge_param('currency') || $::Variable->{MV_PAYMENT_CURRENCY} || 'GBP';
Source: lib/Vend/Payment/SagePay.pm
Line 991 (context shows lines 981-995 in sagepay():576)
push @query, "$key=$query{$key}";
}
my $string = join '&', @query; # replicates the string as actually sent: \
useful to quote this for debugging
#::logDebug("SP".__LINE__.": string to SagePay: $string");
$post = post_data($opt, \%query);
$response = $post->{status_line};
$page = $post->{result_page};
::logDebug("SP".__LINE__.": response page:\n-------------------------\n$page \
\n---------------------------\nend of SagePay results page\n\n");
$result{TxType} = $txtype;
$result{Currency} = $currency;
$result{CardRef} = $::Session->{sagepay}{CardRef};
Source: lib/Vend/Payment/SagePay.pm
Line 1070 (context shows lines 1060-1074 in sagepay():576)
$result{'Status'} = 'OK';
$::Scratch->{mstatus} = 'success';
$::Scratch->{order_id} = $result{'order-id'};
$::Values->{mv_payment} = "Real-time card $result{CardInfo}";
$::Values->{psp} = charge_param('psp') || 'SagePay';
$::CGI::values{mv_todo} = 'submit';
if ($result{SecureStatus} =~ /OK|ATTEMPTONLY/i) {
$::Scratch->{tds} = 'yes' ;
$Vend::Session->{payment_result} = \%result;
::logDebug("SP".__LINE__.": secureStatus=$result{SecureStatus} so now to \
run routes; result hash=".::uneval(\%result));
Vend::Dispatch::do_process();
}
}
Source: lib/Vend/Payment/SagePay.pm
Line 1195 (context shows lines 1185-1199 in sagepay():576)
$::Values->{mv_payment} = "Processing card $result{CardInfo}";
$CGI::values{mv_todo} = 'submit';
#::logDebug("SP".__LINE__.": request=$request; tds=$::Scratch->{tds}");
}
undef $request;
$::Values->{request} = '';
::logDebug("SP".__LINE__.":result=".::uneval(\%result));
# Now extra logging for backup order and/or log of events
if ($logorder =~ /y|1/) {
#--- write the full basket and address to failsafe file
Source: lib/Vend/Payment/Worldpay.pm
Line 422 (context shows lines 412-426 in worldpay():397)
my $testMode = charge_param('testmode') || '0';
my $callbackurl = charge_param('callbackurl') || ''; #URL on your server WP will callback
my $callpw = charge_param('callpw') || 'password'; #Must be same as Worldpay \
admin panel callback password
my $desc = charge_param('desc') || ''; #Transaction description
my $fixcontact = charge_param('fixcontact') || '0'; #0=details editable \
at WP 1=details fixed as sent
my $affsubtotal = $Tag->subtotal({noformat => 1,});# This is used to \
send subtotal as as MC_ parameter to read back for affilate sales calculations
$affsubtotal =~ s/^\D*//g;
$affsubtotal =~ s/\,//g;
$affsubtotal = sprintf '%.2f', $affsubtotal;
::logDebug("WP:".__LINE__.": Session = $::Session->{id} Host = $host instid \
= $instId currency = $currency testmode = $testMode callbackurl \
= $callbackurl pw = $callpw desc = $desc fix = $fixcontact affsubtotal=$affsubtotal");
if ($testMode > '0') { # send to test url not live
$host = $testhost;
}
Source: lib/Vend/Payment/Worldpay.pm
Line 434 (context shows lines 424-438 in worldpay():397)
if ($testMode > '0') { # send to test url not live
$host = $testhost;
}
my $ordernumber = charge_param('ordernumber') || 'etc/order.number';
my $wpcounter = charge_param('wpcounter') || 'etc/username.counter';
$worldpayrequest = charge_param('worldpayrequest') || $::Values->{worldpayrequest} || 'post';
$opt = {};
::logDebug("WP:".__LINE__.": Request = $worldpayrequest");
##-----------Post Information and send customer to Worldpay------------##
if ($worldpayrequest eq 'post') {
::logDebug("WP:".__LINE__.": Sending customer to Worldpay");
Source: lib/Vend/Payment/Worldpay.pm
Line 438 (context shows lines 428-442 in worldpay():397)
my $ordernumber = charge_param('ordernumber') || 'etc/order.number';
my $wpcounter = charge_param('wpcounter') || 'etc/username.counter';
$worldpayrequest = charge_param('worldpayrequest') || $::Values->{worldpayrequest} || 'post';
$opt = {};
::logDebug("WP:".__LINE__.": Request = $worldpayrequest");
##-----------Post Information and send customer to Worldpay------------##
if ($worldpayrequest eq 'post') {
::logDebug("WP:".__LINE__.": Sending customer to Worldpay");
::logDebug("WP:".__LINE__.": TestMode = $testMode : Host = $host");
my $separator = ' ';
my $name = "$::Values->{b_fname} $::Values->{b_lname}";
Source: lib/Vend/Payment/Worldpay.pm
Line 478 (context shows lines 468-482 in worldpay():397)
my $cartId = $::Scratch->{purchaseID};
#go to worldpay
my $redirecturl = "$host?instId=$instId¤cy=$currency&testMode=$testMode \
&amount=$amount&cartId=$cartId&desc=$desc&name=$name&address=$address";
$redirecturl .= "&postcode=$postcode&country=$country&email=$email&tel=$tel \
&MC_mv_order_number=$cartId&MC_callback=$callbackurl&MC_affsubtotal=$affsubtotal";
$redirecturl .= "&fixContact" if ($fixcontact == 1);
::logDebug("WP:".__LINE__.": URL = $redirecturl");
$::Tag->tag({ op => 'header', body => <<EOB });
Status: 302 moved
Location: $redirecturl
Source: lib/Vend/Payment/Worldpay.pm
Line 500 (context shows lines 490-504 in worldpay():397)
return %result;
}
####----------------Handle the callback from Worldpay--------------####
elsif ($worldpayrequest eq 'callback'){
my $newsess = $::Session->{id};
::logDebug("WP:".__LINE__.": Processing Callback Session = $newsess");
my $reporttitle = charge_param('reporttitle') || '0';
my $update_status = charge_param('update_status') || 'pending';
my $dec_inventory = charge_param('dec_inventory') || '0';
Source: lib/Vend/Payment/Worldpay.pm
Line 522 (context shows lines 512-526 in worldpay():397)
my $authcurrency = $::CGI->{authCurrency}; #Currency of authorisation
my $rawauthmessage = $::CGI->{rawAuthMessade}; #Raw auth message
my $callbackpw = $::CGI->{callbackPW}; #Callback password as set in admin panel
my $cardtype = $::CGI->{cardType}; #Card type used
my $countrymatch = $::CGI->{countryMatch}; #Y=Match N=No match B=Not \
available I=Country not supplied S=Country issue not available
my $avs = $::CGI->{AVS}; #AVS Results
my $wafmerchmessage = $::CGI->{wafMerchMessage}; #Risk result
my $authentication = $::CGI->{authentication}; #VbyV or Mastercard \
Securecode authentication type
my $ipaddress = $::CGI->{ipAdress}; #Shopper IP address
::logDebug("WP:".__LINE__.": transid=$transid testmode=$check_testmode \
transstatus=$transstatus authamount=$authamount transtime=$transtime \
authcurrency=$authcurrency rawauthmessage=$rawauthmessage");
::logDebug("WP:".__LINE__.": callbackpw=$callbackpw cardtype=$cardtype \
countrymatch=$countrymatch avs=$avs wafmerchmessage=$wafmerchmessage \
authentication=$authentication ipaddress=$ipaddress");
my $wp_order_number = $::CGI->{MC_mv_order_number};
Source: lib/Vend/Payment/Worldpay.pm
Line 532 (context shows lines 522-536 in worldpay():397)
::logDebug("WP:".__LINE__.": transid=$transid testmode=$check_testmode \
\
\
transstatus=$transstatus authamount=$authamount transtime=$transtime \
\
\
authcurrency=$authcurrency rawauthmessage=$rawauthmessage");
::logDebug("WP:".__LINE__.": callbackpw=$callbackpw cardtype=$cardtype \
\
\
countrymatch=$countrymatch avs=$avs wafmerchmessage=$wafmerchmessage \
\
\
authentication=$authentication ipaddress=$ipaddress");
my $wp_order_number = $::CGI->{MC_mv_order_number};
my $db = dbref('transactions') or die errmsg("cannot open transactions table");
my $dbh = $db->dbh() or die errmsg("cannot get handle for tbl 'transactions'");
my $sth;
my $stho;
::logDebug("WP:".__LINE__.": Callback order number = $wp_order_number");
#if success
Source: lib/Vend/Payment/Worldpay.pm
Line 538 (context shows lines 528-542 in worldpay():397)
my $dbh = $db->dbh() or die errmsg("cannot get handle for tbl 'transactions'");
my $sth;
my $stho;
::logDebug("WP:".__LINE__.": Callback order number = $wp_order_number");
#if success
if (($transstatus eq 'Y') and ($callbackpw eq $callpw)) {
::logDebug("WP:".__LINE__.": Transaction Suucessful");
$sth = $dbh->prepare("SELECT total_cost,email,txtype,order_number \
FROM transactions WHERE order_number='$wp_order_number'") or die errmsg \
("Cannot select from transactions tbl for $wp_order_number");
$sth->execute() or die errmsg("Cannot get data from transactions tbl");
my @d = $sth->fetchrow_array;
Source: lib/Vend/Payment/Worldpay.pm
Line 555 (context shows lines 545-559 in worldpay():397)
my $txtype = $d[2];
my $old_tid = $d[3];
my $new_order_no = $::Values->{mv_order_number} = Vend::Interpolate::tag_counter \
("$ordernumber") ; #generate the IC Order Number
my $charged = 'WP Charged';
#Check if transaction was in test mode
if ($check_testmode > '0') { # Transaction was in test mode
$update_status = $update_status .'-TEST'; #Append Test to end of order \
status to show order was made in test mode
$charged = $charged .'-TEST'; #Variable we write to txtype
}
::logDebug("WP:".__LINE__.": Check testmode = $check_testmode Update Status \
= $update_status Set txtype = $charged");
#Replace temporary order number with IC order number
::logDebug("WP:".__LINE__.": Replacing order number: Old TID = $old_tid \
with New Order No = $new_order_no");
$sth = $dbh->prepare("UPDATE transactions SET code='$new_order_no', \
order_number='$new_order_no', txtype='$charged' WHERE order_number='$wp_order_number'");
Source: lib/Vend/Payment/Worldpay.pm
Line 565 (context shows lines 555-569 in worldpay():397)
::logDebug("WP:".__LINE__.": Check testmode = $check_testmode Update Status \
\
\
= $update_status Set txtype = $charged");
#Replace temporary order number with IC order number
::logDebug("WP:".__LINE__.": Replacing order number: Old TID = $old_tid \
\
\
with New Order No = $new_order_no");
$sth = $dbh->prepare("UPDATE transactions SET code='$new_order_no', \
\
\
order_number='$new_order_no', txtype='$charged' WHERE order_number='$wp_order_number'");
$stho = $dbh->prepare("UPDATE orderline SET code=replace(code, '$old_tid', \
\
'$new_order_no'), order_number='$new_order_no' WHERE order_number='$old_tid'");
$stho->execute() or die errmsg("Cannot update transactions tbl for WP '$wp_order_number'");
$sth->execute() or die errmsg("Cannot update transactions tbl for WP '$wp_order_number'");
#Log transaction information & change order status
::logDebug("WP:".__LINE__.": Logging transaction details to tbl for order $new_order_no");
$sth = $dbh->prepare("UPDATE transactions SET status='$update_status', \
order_id='$transid', wp_transtime='$transtime', wp_cardtype='$cardtype', \
wp_countrymatch='$countrymatch', wp_avs='$avs', wp_risk='$wafmerchmessage', \
wp_authentication='$authentication', wp_authamount='$authamount' \
WHERE order_number='$new_order_no'");
$stho = $dbh->prepare("UPDATE orderline SET status='$update_status' \
WHERE order_number='$new_order_no'");
$stho->execute() or die errmsg("Cannot update orderline tbl for worldpay \
order '$new_order_no'");
$sth->execute() or die errmsg("Cannot update transactions tbl for worldpay \
order '$new_order_no'");
Source: lib/Vend/Payment/Worldpay.pm
Line 625 (context shows lines 615-629 in worldpay():397)
$Tag->assign( { salestax => $salestax, } );
$::Values->{mv_handling} = 1;
$Tag->assign( { handling => $handling, } );
my (@cart, $acart);
$cart =~ s/\"/\'/g;
$cart =~ s/\\//;
@cart = eval($cart);
$acart = eval ($cart);
::logDebug("WP:".__LINE__.": cart=$cart Email=$email");
$::Values->{mv_payment} = 'Worldpay';
$::Values->{wp_order_number} = $wp_order_number;
$::Session->{values}->{iso_currency_code} = $currency;
Source: lib/Vend/Payment/Worldpay.pm
Line 633 (context shows lines 623-637 in worldpay():397)
@cart = eval($cart);
$acart = eval ($cart);
::logDebug("WP:".__LINE__.": cart=$cart Email=$email");
$::Values->{mv_payment} = 'Worldpay';
$::Values->{wp_order_number} = $wp_order_number;
$::Session->{values}->{iso_currency_code} = $currency;
$::Session->{scratch}->{mv_locale} = $mv_locale;
$::Session->{scratch}->{mv_currency} = $mv_currency;
::logDebug("WP:".__LINE__.": Shipmode = $shipmode Shipping = $shipping \
Tax = $salestax Handling = $handling");
#Set new report title with final order number and WP transaction ID
if ($reporttitle == '1') {
MV_AUTOLOAD — (partly documented)
It specifies the value to be placed in the beginning of the html if the $Vend::PageInit is defined and not 0.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 654 (context shows lines 644-658 in interpolate_html():642)
return undef if ! defined($html);
return undef if $Vend::NoInterpolate;
my ($name, @post);
my ($bit, %post);
local($^W);
my $toplevel;
if(defined $Vend::PageInit and ! $Vend::PageInit) {
defined $::Variable->{MV_AUTOLOAD}
and $html =~ s/^/$::Variable->{MV_AUTOLOAD}/;
$toplevel = 1;
}
#::logDebug("opt=" . uneval($opt));
MV_BAD_LOCK — work around a problem in systems with broken locking mechanism
The variable allows systems with broken locking mechanism to still work
properly.
If the variable is set, it makes sure the PIDFile lock is
not destroyed when the lock file is read.
interchange -stop will then work properly.
Interchange 5.7.0:
Source: lib/Vend/Server.pm
Line 1630 (context shows lines 1620-1634 in server_start_message():1621)
sub server_start_message {
my ($fmt, $reverse) = @_;
$fmt = 'START server (%s) (%s)' unless $fmt;
my @types;
push (@types, 'INET') if $Global::Inet_Mode;
push (@types, 'UNIX') if $Global::Unix_Mode;
push (@types, 'SOAP') if $Global::SOAP;
push (@types, 'mod_perl') if $Global::mod_perl;
my $server_type = join(" and ", @types);
my $pid = ( $Global::PreFork || $Global::Variable->{MV_BAD_LOCK} )
? $$
: read_pidfile();
my @args = $reverse ? ($server_type, $pid) : ($pid, $server_type);
return ::errmsg ($fmt , @args );
MV_COMPONENT_CACHE
Interchange 5.7.0:
Source: code/UserTag/component.tag
Line 45 (context shows lines 35-49)
$name ||= $control->{component};
$name ||= $opt->{default};
if (! $name or $name eq 'none') {
# Increment control_index so empty component has no side effect
$::Scratch->{control_index}++;
return;
}
my $t = $opt->{comp_table} || $::Variable->{MV_COMPONENT_TABLE} || 'component';
my $ctab = $::Variable->{MV_COMPONENT_CACHE} || 'component_cache';
my $record;
my $db = database_exists_ref($t);
my $nocache;
MV_COMPONENT_DIR — (partly documented)
Interchange 5.7.0:
Source: code/UserTag/component.tag
Line 75 (context shows lines 65-79)
}
$record = $db->row_hash($name);
}
$record ||= $opt;
my $body = $record->{comptext};
if(! length($body)) {
my $dir = $opt->{comp_dir}
|| $::Variable->{MV_COMPONENT_DIR}
|| 'templates/components';
$body = readfile("$dir/$name",undef,1);
}
MV_COMPONENT_TABLE — database name for components
The term database in Interchange lingo has a different meaning as in common language, please check database for more information.
Interchange 5.7.0:
Source: code/UserTag/component.tag
Line 44 (context shows lines 34-48)
$name ||= $control->{component};
$name ||= $opt->{default};
if (! $name or $name eq 'none') {
# Increment control_index so empty component has no side effect
$::Scratch->{control_index}++;
return;
}
my $t = $opt->{comp_table} || $::Variable->{MV_COMPONENT_TABLE} || 'component';
my $ctab = $::Variable->{MV_COMPONENT_CACHE} || 'component_cache';
my $record;
my $db = database_exists_ref($t);
MV_COUNTRY_FIELD — name of form field whose value will be used as key to perform lookup in the MV_COUNTRY_TABLE
Form field whose value will be used as the key to perform lookup in the
MV_COUNTRY_TABLE database.
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 457 (context shows lines 447-461 in guess_cc_type():453)
guess_cc_type($cardinfo->{MV_CREDIT_CARD_NUMBER});
return Vend::Interpolate::tag_attr_list($template, $cardinfo);
}
sub guess_cc_type {
my ($ccnum) = @_;
$ccnum =~ s/\D+//g;
my $country = $::Values->{$::Variable->{MV_COUNTRY_FIELD} || 'country'} || '';
if(my $subname = $Vend::Cfg->{SpecialSub}{guess_cc_type}) {
my $sub = $Vend::Cfg->{Sub}{$subname} || $Global::GlobalSub->{$subname};
my $guess;
Source: lib/Vend/Order.pm
Line 1186 (context shows lines 1176-1190 in _get_cval():1184)
}
else {
return (undef, $var,
errmsg( $state_error{CA}, $val )
);
}
}
sub _get_cval {
my ($ref, $var) = @_;
my $cfield = $::Variable->{MV_COUNTRY_FIELD} || 'country';
my $cval = $ref->{$cfield} || $::Values->{$cfield};
if($var =~ /^b_/ and $ref->{"b_$cfield"} || $::Values->{"b_$cfield"}) {
$cval = $ref->{"b_$cfield"} || $::Values->{"b_$cfield"};
MV_COUNTRY_TABLE — name of database containing countries, country codes, etc.
Table to search for country-related information, such as selector and ISO names or shipping methods available.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5472 (context shows lines 5462-5476 in tax_vat():5464)
}
sub tax_vat {
my($type, $opt) = @_;
#::logDebug("entering VAT, opts=" . uneval($opt));
my $cfield = $::Variable->{MV_COUNTRY_TAX_VAR} || 'country';
my $country = $opt->{country} || $::Values->{$cfield};
return 0 if ! $country;
my $ctable = $opt->{country_table}
|| $::Variable->{MV_COUNTRY_TABLE}
|| 'country';
my $c_taxfield = $opt->{country_tax_field}
|| $::Variable->{MV_COUNTRY_TAX_FIELD}
|| 'tax';
MV_COUNTRY_TAX_FIELD — name of column containing country-wide tax information
Column name in the MV_COUNTRY_TABLE database that will be looked up
to retrieve country-wide tax information.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5475 (context shows lines 5465-5479 in tax_vat():5464)
my($type, $opt) = @_;
#::logDebug("entering VAT, opts=" . uneval($opt));
my $cfield = $::Variable->{MV_COUNTRY_TAX_VAR} || 'country';
my $country = $opt->{country} || $::Values->{$cfield};
return 0 if ! $country;
my $ctable = $opt->{country_table}
|| $::Variable->{MV_COUNTRY_TABLE}
|| 'country';
my $c_taxfield = $opt->{country_tax_field}
|| $::Variable->{MV_COUNTRY_TAX_FIELD}
|| 'tax';
#::logDebug("ctable=$ctable c_taxfield=$c_taxfield country=$country");
$type ||= tag_data($ctable, $c_taxfield, $country)
or return 0;
MV_COUNTRY_TAX_VAR
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5467 (context shows lines 5457-5471 in tax_vat():5464)
sub percent_rate {
my $rate = shift;
$rate =~ s/\s*%\s*$// and $rate /= 100;
return $rate;
}
sub tax_vat {
my($type, $opt) = @_;
#::logDebug("entering VAT, opts=" . uneval($opt));
my $cfield = $::Variable->{MV_COUNTRY_TAX_VAR} || 'country';
my $country = $opt->{country} || $::Values->{$cfield};
return 0 if ! $country;
my $ctable = $opt->{country_table}
MV_CREDIT_CARD_INFO_TEMPLATE
MV_CREDIT_CARD_INFO_TEMPLATE is available in Interchange versions:
4.6.0-5.7.0 (git-head)
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 439 (context shows lines 429-443 in build_cc_info():410)
}
if(my $num = $cardinfo->{MV_CREDIT_CARD_NUMBER}) {
my @quads;
$num =~ s/\D//g;
@quads = $num =~ m{(\d\d\d\d)(\d\d\d\d)(\d\d\d\d)(\d+)};
$cardinfo->{MV_CREDIT_CARD_QUADS} = join "-", @quads;
}
$template = $template ||
$::Variable->{MV_CREDIT_CARD_INFO_TEMPLATE} ||
join("\t", qw(
{MV_CREDIT_CARD_TYPE}
{MV_CREDIT_CARD_NUMBER}
{MV_CREDIT_CARD_EXP_MONTH}/{MV_CREDIT_CARD_EXP_YEAR}
MV_DEFAULT_LINK_CLASS
Interchange 5.7.0:
Source: lib/Vend/Menu.pm
Line 2201 (context shows lines 2191-2205 in menu():2133)
$opt->{file} = "$dir/default.txt";
}
}
}
$opt->{dhtml_browser} = dhtml_browser()
unless defined $opt->{dhtml_browser};
$opt->{menu_type} ||= 'simple';
my $prefix = $opt->{prefix} || 'menu';
$opt->{link_class} ||= $::Variable->{MV_DEFAULT_LINK_CLASS};
$opt->{parse_header_footer} = 1 unless defined $opt->{parse_header_footer};
if($opt->{parse_header_footer}) {
MV_DEFAULT_MATCHLIMIT — specifies the number of search results per page
The MV_DEFAULT_MATCHLIMIT variable specifies the default for the number of search results displayed on one page. You can override this value for a specific search with the mv_matchlimit search parameter. The default value for MV_DEFAULT_MATCHLIMIT is 50.
Interchange 5.7.0:
Source: lib/Vend/Scan.pm
Line 947 (context shows lines 937-951 in _matchlimit():943)
$limit = -1 if $limit =~ /^[^-0-9]/;
$ref->{mv_dict_end} = $ref->{mv_dict_look};
substr($ref->{mv_dict_end},$limit,1) =~ s/(.)/chr(ord($1) + 1)/e;
return $_[1];
}
sub _matchlimit {
shift;
my $val = lc(shift);
return -1 if $val eq 'none' or $val eq 'all';
return int($val) || $::Variable->{MV_DEFAULT_MATCHLIMIT} || 50;
}
1;
__END__
MV_DEFAULT_SEARCH_DB — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Scan.pm
Line 519 (context shows lines 509-523 in perform_search():416)
SEARCH: {
$options{mv_return_all} = 1
if $options{mv_dict_look} and ! $options{mv_searchspec};
if (defined $pre_made) {
$q = $pre_made;
@{$q}{keys %options} = (values %options);
}
elsif (
! $options{mv_searchtype} && $::Variable->{MV_DEFAULT_SEARCH_DB}
or $options{mv_searchtype} =~ /db|sql/i
)
{
$q = new Vend::DbSearch %options;
Source: lib/Vend/Scan.pm
Line 889 (context shows lines 879-893 in _file_security():879)
sub _file_security {
my ($junk, $param, $passed) = @_;
$passed = [] unless $passed;
my(@files) = grep /\S/, split /\s*[,\0]\s*/, $param, -1;
for(@files) {
my $ok = allowed_file($_);
if(!$ok) {
$ok = 1 if $_ eq $::Variable->{MV_SEARCH_FILE};
$ok = 1 if $::Scratch->{$_};
}
if(/^\w+$/ and ! $::Variable->{MV_DEFAULT_SEARCH_DB}) {
$_ = $Vend::Cfg->{Database}{$_}{file}
if defined $Vend::Cfg->{Database}{$_};
}
if ($ok and $Vend::Cfg->{NoSearch} and /$Vend::Cfg->{NoSearch}/) {
MV_DEFAULT_SEARCH_FILE — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/TextSearch.pm
Line 82 (context shows lines 72-86 in init():67)
$s->{mv_begin_string} = [];
$s->{mv_all_chars} = [1];
$s->{mv_case} = [];
$s->{mv_column_op} = [];
$s->{mv_negate} = [];
$s->{mv_numeric} = [];
$s->{mv_orsearch} = [];
$s->{mv_searchspec} = [];
$s->{mv_search_group} = [];
$s->{mv_search_field} = [];
$s->{mv_search_file} = $::Variable->{MV_DEFAULT_SEARCH_FILE}
|| ['products.asc'];
$s->{mv_searchspec} = [];
$s->{mv_sort_option} = [];
$s->{mv_substring_match} = [];
Source: lib/Vend/TextSearch.pm
Line 119 (context shows lines 109-123 in search():103)
my($dict_limit,$f,$key,$val);
my($searchfile, @searchfiles);
my(@specs);
my(@pats);
while (($key,$val) = each %options) {
$s->{$key} = $val;
}
unless (@searchfiles = @{$s->{mv_search_file}}) {
@searchfiles = @{$::Variable->{MV_DEFAULT_SEARCH_FILE}};
}
#::logDebug("searchfiles=@searchfiles");
for(@searchfiles) {
$_ = Vend::Util::catfile($s->{mv_base_directory}, $_)
Source: lib/Vend/Glimpse.pm
Line 85 (context shows lines 75-89 in init():66)
$s->{mv_negate} = [];
$s->{mv_numeric} = [];
$s->{mv_orsearch} = [];
$s->{mv_searchspec} = [];
$s->{mv_search_group} = [];
$s->{mv_search_field} = [];
$s->{mv_search_file} = [];
$s->{mv_searchspec} = [];
$s->{mv_sort_option} = [];
$s->{mv_substring_match} = [];
$s->{mv_field_file} = $::Variable->{MV_DEFAULT_SEARCH_FILE}[0];
$s->{glimpse_cmd} = $Vend::Cfg->{Glimpse} || 'glimpse';
for(keys %$options) {
$s->{$_} = $options->{$_};
MV_DEFAULT_SEARCH_TABLE — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/RefSearch.pm
Line 73 (context shows lines 63-77 in init():67)
mv_min_string => 1,
verbatim_columns => 1,
);
sub init {
my ($s, $options) = @_;
# autovivify references of nested data structures we use below, since they
# don't yet exist at daemon startup time before configuration is done
$Vend::Cfg->{ProductFiles}[0] or 1;
$::Variable->{MV_DEFAULT_SEARCH_TABLE} or 1;
@{$s}{keys %Default} = (values %Default);
$s->{mv_all_chars} = [1];
Source: lib/Vend/RefSearch.pm
Line 89 (context shows lines 79-93 in init():67)
### that we will use if no base=table param is specified
$s->{mv_base_directory} = $Vend::Cfg->{ProductFiles}[0];
$s->{mv_begin_string} = [];
$s->{mv_case} = [];
$s->{mv_column_op} = [];
$s->{mv_negate} = [];
$s->{mv_numeric} = [];
$s->{mv_orsearch} = [];
$s->{mv_search_field} = [];
$s->{mv_search_file} = [ @{
$::Variable->{MV_DEFAULT_SEARCH_TABLE}
|| $Vend::Cfg->{ProductFiles}
} ];
$s->{mv_search_group} = [];
$s->{mv_searchspec} = [];
Source: lib/Vend/DbSearch.pm
Line 74 (context shows lines 64-78 in init():68)
mv_min_string => 1,
verbatim_columns => 1,
);
sub init {
my ($s, $options) = @_;
# autovivify references of nested data structures we use below, since they
# don't yet exist at daemon startup time before configuration is done
$Vend::Cfg->{ProductFiles}[0] or 1;
$::Variable->{MV_DEFAULT_SEARCH_TABLE} or 1;
@{$s}{keys %Default} = (values %Default);
$s->{mv_all_chars} = [1];
Source: lib/Vend/DbSearch.pm
Line 98 (context shows lines 88-102 in init():68)
$s->{mv_search_field} = [];
$s->{mv_search_group} = [];
$s->{mv_searchspec} = [];
$s->{mv_sort_option} = [];
$s->{mv_substring_match} = [];
for(keys %$options) {
$s->{$_} = $options->{$_};
}
$s->{mv_search_file} = [ @{
$::Variable->{MV_DEFAULT_SEARCH_TABLE}
|| $Vend::Cfg->{ProductFiles}
} ]
unless ref($s->{mv_search_file}) and scalar(@{$s->{mv_search_file}});
MV_DHTML_BROWSER — regular expression matching HTTP user agents with DHTML support
This variable specifies regexp to use in matching DHTML-capable client browsers (HTTP user agents). program binary.
Interchange 5.7.0:
Source: lib/Vend/Menu.pm
Line 1801 (context shows lines 1791-1805 in dhtml_browser():1798)
my %menu_default_img = (
clear => 'bg.gif',
closed => 'fc.gif',
open => 'fo.gif',
);
sub dhtml_browser {
my $regex;
eval {
$regex = $::Variable->{MV_DHTML_BROWSER}
and $regex = qr/$regex/;
};
$regex ||= qr/MSIE [5-9].*Windows|Mozilla.*Gecko|Opera.*[7-9]/;
return $Vend::Session->{browser} =~ $regex;
MV_DOLLAR_ZERO — control visual display of Interchange processes in the process list
Define what to do with the Perl's $0 variable which contains the system's name of the running process. That process name will appear in commands like ps or top.
Setting the variable to a false value (0 or undefined) leaves the string unchanged. Setting it to 1 displays the process in the form of interchange --> (. Setting it to a string displays that same string.
CATROOT)
This is a workaround for a bug in stock Perl that used to ship with FreeBSD. The bug sometimes
caused a segmentation fault when Interchange daemon was starting.
Example: Setting MV_DOLLAR_ZERO to "1"
Set the following in interchange.cfg:
Variable MV_DOLLAR_ZERO 1
Note that this variable is set globally once when the Interchange daemon starts. It is pointless to change the variable afterwards in runtime.
This variable will have no effect on BSD kernels.
Interchange 5.7.0:
Source: lib/Vend/Server.pm
Line 3119 (context shows lines 3109-3123 in set_process_name():3117)
unlink $Global::PIDfile;
exit 0;
}
}
}
}
# Set the process name ($0) according to MV_DOLLAR_ZERO and a status indicator.
sub set_process_name {
my $status = shift;
my $base = $Global::Variable->{MV_DOLLAR_ZERO};
# Setting MV_DOLLAR_ZERO to 1 should do the same thing as not setting it for
# backwards compatibility.
$base = 'interchange' if !$base or $base eq '1';
MV_EMAIL_CHARSET
Interchange 5.7.0:
Source: lib/Vend/Email.pm
Line 192 (context shows lines 182-196 in tag_mime_lite_email():91)
# Data (msg body), encoding and type
($data, $encoding, $type, $charset) = (
delete $opt->{data},
delete $opt->{encoding},
delete $opt->{type},
delete $opt->{charset},
);
$data ||= $opt->{body} || $body; delete $opt->{body};
$encoding ||= 'quoted-printable';
$type ||= 'text/plain';
$charset ||= $::Variable->{MV_EMAIL_CHARSET} || $Global::Variable->{MV_EMAIL_CHARSET};
if ($charset) {
$type .= "; charset=$charset";
}
MV_EMAIL_INTERCEPT — intercept all outgoing email and redirect it to the specified address
If defined, the variable causes all outgoing e-mail to be intercepted, and sent to a specified address or comma-separated addresses.
This feature is intended to allow developers to write and test functions that send e-mail, without worrying about accidentally sending mail to end users.
A header in the form of X-Intercepted-To: is inserted
in the message to show the original destination. At the same time,
the interception is also noted in the catalog error log file.
Example: Setting MV_EMAIL_INTERCEPT to "root@mydomain.local"
Set the following in interchange.cfg or catalog.cfg:
Variable MV_EMAIL_INTERCEPT root@mydomain.local
Note that this only works for Interchange's built-in e-mail sending routines. If you use other methods to send e-mail, for example by directly running sendmail or talking to an SMTP server you'll have to add implement support yourself.
Be aware that this setting can mask certain programming errors. For
example, trying to send an e-mail without a
To: address would normally result
in an error. With email interception, however, a valid
To: address would be used, and seemingly work as
expected. Before switching off the interception, the only
way to know whether you did everything right is to check the
X-Intercepted-To:
header and verify its correctness. Probably even easier, you should
just monitor error log files as the original e-mail destination is
reported there as well.
Interchange 5.7.0:
Source: code/UserTag/email_raw.tag
Line 23 (context shows lines 13-27)
UserTag email-raw Version $Revision: 1.8 $
UserTag email-raw Routine <<EOR
sub {
my($opt, $body) = @_;
my($ok);
$body =~ s/^\s+//;
# If configured, intercept all outgoing email and re-route
if (
my $intercept = $::Variable->{MV_EMAIL_INTERCEPT}
|| $Global::Variable->{MV_EMAIL_INTERCEPT}
) {
$body =~ s/\A(.*?)\r?\n\r?\n//s;
my $header_block = $1;
# unfold valid RFC 2822 "2.2.3. Long Header Fields"
Source: lib/Vend/Util.pm
Line 2033 (context shows lines 2023-2037 in send_mail():1998)
}
elsif($_) {
push @extra_headers, $_;
}
}
}
# If configured, intercept all outgoing email and re-route
if (
my $intercept = $::Variable->{MV_EMAIL_INTERCEPT}
|| $Global::Variable->{MV_EMAIL_INTERCEPT}
) {
my @info_headers;
$to = "To: $to";
for ($to, @extra_headers) {
Source: lib/Vend/Email.pm
Line 336 (context shows lines 326-340 in tag_mime_lite_email():91)
::logError("Header injection attempted in tag_mime_lite_email: %s", $1);
return;
};
}
#
# Support e-mail interception (re-writing to/cc/bcc to specified
# address(es)).
#
$intercept ||= $::Variable->{MV_EMAIL_INTERCEPT} ||
$Global::Variable->{MV_EMAIL_INTERCEPT};
if ( $intercept && $Have_MIME_Lite) {
for my $field (qw/to cc bcc/) {
if ( $opt->{$field} ) {
Source: lib/Vend/Email.pm
Line 596 (context shows lines 586-600 in send_mail_legacy():561)
}
elsif($_) {
push @extra_headers, $_;
}
}
}
# If configured, intercept all outgoing email and re-route
if (
my $intercept = $::Variable->{MV_EMAIL_INTERCEPT}
|| $Global::Variable->{MV_EMAIL_INTERCEPT}
) {
my @info_headers;
$to = "To: $to";
for ($to, @extra_headers) {
MV_ERROR_STD_LABEL — (partly documented)
Interchange 5.7.0:
Source: code/SystemTag/error.coretag
Line 129 (context shows lines 119-133 in tag_error():33)
unless $opt->{std_label} || $text || $opt->{show_error};
$err = filter_value($opt->{filter}, $err)
if $opt->{filter};
if($opt->{std_label}) {
# store the error label in user's session for later
# possible use in [error show_label=1] calls
$Vend::Session->{errorlabels}{$var} = $opt->{std_label};
if($text) {
# do nothing
}
elsif(defined $::Variable->{MV_ERROR_STD_LABEL}) {
$text = $::Variable->{MV_ERROR_STD_LABEL};
}
else {
my $contrast = $::Variable->{CSS_CONTRAST} || 'mv_contrast';
Source: code/SystemTag/error.coretag
Line 145 (context shows lines 135-149 in tag_error():33)
<span class="$contrast">{LABEL} <small><i>(%s)</i></small></span>
[else]{REQUIRED <b>}{LABEL}{REQUIRED </b>}[/else]
EOF
}
$text =~ s/{LABEL}/$opt->{std_label}/g;
$text =~ s/{REQUIRED\s+([^}]*)}/$opt->{required} ? $1 : ''/ge;
$err =~ s/\s+$//;
}
$text = '' unless defined $text;
$text .= '%s' unless ($text =~ /\%s/ ||
length $::Variable->{MV_ERROR_STD_LABEL});
$text = pull_else($text, $found_error);
$text =~ s/\%s/$err/;
return $text;
MV_FILE — contains the name of the last file read or of an external Perl routine
This variable contains the filename of the most recently returned contents. The value is not set in the configuration files, but is manipulated by the Interchange daemon while it is runnning.
Example: Display the content of the MV_FILE variable
Add the follwing to a test Interchange page:
The last filename is: @@MV_FILE@@
Interchange 5.7.0:
Source: lib/Vend/File.pm
Line 234 (context shows lines 224-238 in readfile():193)
}
}
if(! $file) {
$contents = readfile_db($ifile);
return undef unless defined $contents;
}
else {
return undef unless open(READIN, "< $file");
$Global::Variable->{MV_FILE} = $file;
binmode(READIN) if $Global::Windows;
if ($encoding) {
MV_FORTUNE_COMMAND — location of the Unix fortune program
Interchange 5.7.0:
Source: code/UserTag/fortune.tag
Line 16 (context shows lines 6-20)
# (at your option) any later version. See the LICENSE file for details.
#
# $Id: fortune.tag,v 1.7 2007-03-30 23:40:57 pajamian Exp $
UserTag fortune Order short
UserTag fortune addAttr
UserTag fortune Version $Revision: 1.7 $
UserTag fortune Routine <<EOR
sub {
my ($short, $opt) = @_;
my $cmd = $Global::Variable->{MV_FORTUNE_COMMAND} || '/usr/games/fortune';
my @flags;
push @flags, '-s' if is_yes($short);
for(grep length($_) == 1, keys %$opt) {
push @flags, "-$_" if $opt->{$_};
MV_GETPPID_BROKEN — fix getppid() which is broken on Linux systems with thread-enabled Perl
The variable enables a fix for the broken getppid() function on Linux systems with thread-enabled Perl installations. Interchange then uses syscall64() instead of the getppid() call.
Example: Enabling MV_GETPPID_BROKEN
Add the following to interchange.cfg:
Variable MV_GETPPID_BROKEN 1
Starting with Interchange 5.0, this directive is present in the default Debian GNU /etc/interchange/features.cfg file to let Interchange run on Debian systems later than 3.0 (which do have threaded Perl installation).
Running Interchange in production on thread-enabled Perl machines is discouraged (for the time being).
Interchange 5.7.0:
Source: lib/Vend/Server.pm
Line 2973 (context shows lines 2963-2977 in run_server():2966)
return $pid;
}
sub run_server {
my $next;
#::logDebug("trying to run server");
@$Global::SocketFile = "$Global::VendRoot/etc/socket"
unless @$Global::SocketFile and $Global::SocketFile->[0];
if($Global::Variable->{MV_GETPPID_BROKEN}) {
#::logDebug("setting getppid broken");
my $num = $Global::Variable->{MV_GETPPID_BROKEN} > 1
? $Global::Variable->{MV_GETPPID_BROKEN}
: 64;
MV_HELO — the HELO string to send when using SMTP to send mail
If SMTP is used to send mail, MV_HELO variable specifies the HELO string to present to the remote system.
Example: Using SMTP to send mail and setting a HELO string
Add the following to interchange.cfg:
SendMailProgram Net::SMTP Variable MV_HELO myhost.mydomain.local
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 2105 (context shows lines 2095-2109 in send_mail():1998)
or last SEND;
print MVMAIL Vend::Interpolate::do_tag('mime boundary') . '--'
if $use_mime;
print MVMAIL "\r\n\cZ" if $Global::Windows;
close MVMAIL or last SEND;
$ok = ($? == 0);
}
SMTP: {
my $mhost = $::Variable->{MV_SMTPHOST} || $Global::Variable->{MV_SMTPHOST};
my $helo = $Global::Variable->{MV_HELO} || $::Variable->{SERVER_NAME};
last SMTP unless $none and $mhost;
eval {
require Net::SMTP;
};
Source: lib/Vend/Email.pm
Line 668 (context shows lines 658-672 in send_mail_legacy():561)
or last SEND;
print MVMAIL Vend::Interpolate::do_tag('mime boundary') . '--'
if $use_mime;
print MVMAIL "\r\n\cZ" if $Global::Windows;
close MVMAIL or last SEND;
$ok = ($? == 0);
}
SMTP: {
my $mhost = $::Variable->{MV_SMTPHOST} || $Global::Variable->{MV_SMTPHOST};
my $helo = $Global::Variable->{MV_HELO} || $::Variable->{SERVER_NAME};
last SMTP unless $none and $mhost;
eval {
require Net::SMTP;
};
MV_HTML4_COMPLIANT — output HTML4-compliant HTML code
Example: Enabling the MV_HTML4_COMPLIANT feature
Add the following to interchange.cfg:
Variable MV_HTML4_COMPLIANT 1
Currently, this variable only affects the "joiner" element when the links are created. & is used instead of plain & when this variable is set.
Interchange 5.7.0:
Source: lib/Vend/Config.pm
Line 3728 (context shows lines 3718-3732 in parse_url_sep_char():3706)
"%s character value '%s' longer than one character.",
$var,
$val,
);
}
elsif($val !~ /[&;:]/) {
config_warn("%s character value '%s' not a recommended value.", $var, $val);
}
if($val eq '&') {
$Global::UrlJoiner = $Global::Variable->{MV_HTML4_COMPLIANT} ? '&' : '&';
$Global::UrlSplittor = qr/\&/;
}
else {
$Global::UrlJoiner = $val;
MV_HTTP_CHARSET
Interchange 5.7.0:
Source: lib/Vend/Server.pm
Line 574 (context shows lines 564-578 in respond():566)
}
sub respond {
# $body is now a reference
my ($s, $body) = @_;
#show_times("begin response send") if $Global::ShowTimes;
# Safe kludge: duplicate Vend::CharSet::default_charset method here
# so that $Document->send() will work from within Safe
my $c = $Global::Selector{$CGI::script_name};
my $response_charset = $c->{Variable}{MV_HTTP_CHARSET} || $Global::Variable->{MV_HTTP_CHARSET};
my $status;
return if $Vend::Sent;
if($Vend::StatusLine) {
Source: lib/Vend/CharSet.pm
Line 100 (context shows lines 90-104 in default_charset():98)
# this can/will come in handy.
sub mime_name {
my $encoding_name = shift;
$encoding_name =~ s/-strict//i;
return lc $encoding_name;
}
sub default_charset {
my $c = $Global::Selector{$CGI::script_name};
return $c->{Variable}{MV_HTTP_CHARSET} || $Global::Variable->{MV_HTTP_CHARSET};
}
# this sub taken from the perluniintro man page, for diagnostic purposes
sub display_chars {
MV_MAILFROM — specifies the default sender e-mail address when SMTP is used to send mail
If SMTP is used to send mail from Interchange, this variable specifies the default sender e-mail address.
Example: Setting the MV_MAILFROM variable
Add the following to interchange.cfg:
Variable MV_MAILFROM interchange
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 2120 (context shows lines 2110-2124 in send_mail():1998)
last SMTP if $@;
$ok = 0;
$using = "Net::SMTP (mail server $mhost)";
#::logDebug("using $using");
undef $none;
my $smtp = Net::SMTP->new($mhost, Debug => $Global::Variable->{DEBUG}, \
\
\
Hello => $helo) or last SMTP;
#::logDebug("smtp object $smtp");
my $from = $::Variable->{MV_MAILFROM}
|| $Global::Variable->{MV_MAILFROM}
|| $Vend::Cfg->{MailOrderTo};
for(@extra_headers) {
s/\s*$/\n/;
Source: lib/Vend/Email.pm
Line 288 (context shows lines 278-292 in tag_mime_lite_email():91)
# TO
if (!( $opt->{to} and @{ $opt->{to} } )) {
::logError('mime_lite_email called without the required to= option.');
return;
}
# FROM
if (! $opt->{from} ) {
$opt->{from} =
$::Variable->{MV_MAILFROM} ||
$Global::Variable->{MV_MAILFROM} ||
$Vend::Cfg->{MailOrderTo};
}
$opt->{from} or do {
::logError('Cannot find value for From: header. Make sure ' .
Source: lib/Vend/Email.pm
Line 683 (context shows lines 673-687 in send_mail_legacy():561)
last SMTP if $@;
$ok = 0;
$using = "Net::SMTP (mail server $mhost)";
#::logDebug("using $using");
undef $none;
my $smtp = Net::SMTP->new($mhost, Debug => $Global::Variable->{DEBUG}, Hello => $helo);
#::logDebug("smtp object $smtp");
my $from = $::Variable->{MV_MAILFROM}
|| $Global::Variable->{MV_MAILFROM}
|| $Vend::Cfg->{MailOrderTo};
for(@extra_headers) {
s/\s*$/\n/;
MV_MENU_DIRECTORY — directory for menu files
Interchange 5.7.0:
Source: lib/Vend/Menu.pm
Line 2279 (context shows lines 2269-2283 in menu():2133)
$opt->{toggle_anchor_clear} = Vend::Tags->image( {
src => $opt->{img_clear} || $menu_default_img{clear},
getsize => 0,
border => 0,
extra => $opt->{img_clear_extra},
});
#::logDebug("toggle_anchor_clear=$opt->{toggle_anchor_clear}");
}
if($opt->{use_file}) {
$opt->{file} = $::Variable->{MV_MENU_DIRECTORY} || 'include/menus';
if(! $opt->{name}) {
logError("No file or name specified for menu.");
}
my $nm = escape_chars($opt->{name});
Source: lib/Vend/Menu.pm
Line 2340 (context shows lines 2330-2344 in menu():2133)
$opt->{img_clear_extra} ||= qq{height="1" width="$1"};
}
$opt->{toggle_anchor_clear} = Vend::Tags->image( {
src => $opt->{img_clear} || $menu_default_img{clear},
getsize => 0,
border => 0,
extra => $opt->{img_clear_extra},
});
}
if($opt->{use_file}) {
$opt->{file} = $::Variable->{MV_MENU_DIRECTORY} || 'include/menus';
if(! $opt->{name}) {
logError("No file or name specified for menu.");
}
my $nm = escape_chars($opt->{name});
Source: lib/Vend/Menu.pm
Line 2357 (context shows lines 2347-2361 in menu():2133)
}
return old_flyout($name,$opt,$template) unless $opt->{dhtml_browser};
return dhtml_flyout($name,$opt,$template);
}
elsif($opt->{menu_type} eq 'simple') {
if($opt->{search} || $opt->{list}) {
## Do nothing
}
elsif(! $opt->{file}) {
$opt->{file} = $::Variable->{MV_MENU_DIRECTORY} || 'include/menus';
if(! $opt->{name}) {
logError("No file or name specified for menu.");
}
my $nm = escape_chars($opt->{name});
MV_NO_CRYPT —
disable the use of password encryption server-wide
If configured, this variable disables the use
of crypt() function and/or MD5 password hashing server-wide.
Example: Enabling the MV_NO_CRYPT feature
Add the following to interchange.cfg:
Variable MV_NO_CRYPT 1
Interchange 5.7.0:
Source: lib/Vend/UserDB.pm
Line 404 (context shows lines 394-408 in new():348)
PASSWORD => $options{password} || $CGI::values{mv_password} || '',
VERIFY => $options{verify} || $CGI::values{mv_verify} || '',
NICKNAME => $options{nickname} || '',
PROFILE => $options{profile} || '',
LAST => '',
USERMINLEN => $options{userminlen} || 2,
PASSMINLEN => $options{passminlen} || 4,
VALIDCHARS => $options{validchars} ? ('[' . $options{validchars} \
. ']') : $USERNAME_GOOD_CHARS,
CRYPT => defined $options{'crypt'}
? $options{'crypt'}
: ! $::Variable->{MV_NO_CRYPT},
CGI => ( defined $options{cgi} ? is_yes($options{cgi}) : 1),
PRESENT => { },
DB_ID => $options{database} || 'userdb',
OPTIONS => \%options,
Source: lib/Vend/Util.pm
Line 1433 (context shows lines 1423-1437 in check_authorization():1418)
":",
MIME::Base64::decode_base64($auth),
2,
);
my $cmp_pw;
my $use_crypt = 1;
if( $user eq $Vend::Cfg->{RemoteUser} and
$Vend::Cfg->{Password} )
{
$cmp_pw = $Vend::Cfg->{Password};
undef $use_crypt if $::Variable->{MV_NO_CRYPT};
}
else {
$pwinfo = $Vend::Cfg->{UserDatabase} unless $pwinfo;
undef $use_crypt if $::Variable->{MV_NO_CRYPT};
Source: lib/Vend/Util.pm
Line 1437 (context shows lines 1427-1441 in check_authorization():1418)
my $cmp_pw;
my $use_crypt = 1;
if( $user eq $Vend::Cfg->{RemoteUser} and
$Vend::Cfg->{Password} )
{
$cmp_pw = $Vend::Cfg->{Password};
undef $use_crypt if $::Variable->{MV_NO_CRYPT};
}
else {
$pwinfo = $Vend::Cfg->{UserDatabase} unless $pwinfo;
undef $use_crypt if $::Variable->{MV_NO_CRYPT};
$cmp_pw = Vend::Interpolate::tag_data($pwinfo, 'password', $user)
if defined $Vend::Cfg->{Database}{$pwinfo};
}
MV_ONFLY_FIELDS
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 666 (context shows lines 656-670 in onfly():652)
$item_text = $opt->{text} || '';
}
else {
$item_text = $opt;
$opt = {};
}
# return create_onfly() if $opt->{create};
my $joiner = $::Variable->{MV_ONFLY_JOINER} || '|';
my $split_fields= $::Variable->{MV_ONFLY_FIELDS} || undef;
$item_text =~ s/\s+$//;
$item_text =~ s/^\s+//;
my @parms;
MV_ONFLY_JOINER
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 665 (context shows lines 655-669 in onfly():652)
if (ref $opt) {
$item_text = $opt->{text} || '';
}
else {
$item_text = $opt;
$opt = {};
}
# return create_onfly() if $opt->{create};
my $joiner = $::Variable->{MV_ONFLY_JOINER} || '|';
my $split_fields= $::Variable->{MV_ONFLY_FIELDS} || undef;
$item_text =~ s/\s+$//;
$item_text =~ s/^\s+//;
MV_OPTION_TABLE — name of database for product options
If the Interchange variable MV_OPTION_TABLE is not set, it
defaults to "options", which combines options for Simple, Matrix, and
Modular into that one table.
The term database in Interchange lingo has a different meaning as in common language, please check database for more information.
Interchange 5.7.0:
Source: lib/Vend/Options.pm
Line 104 (context shows lines 94-108 in find_options_type():61)
};
$item->{$attrib} = tag_data($tab, $field, $sku);
}
$module = $item->{$attrib} || '';
}
else {
## Old style options
my $loc = $Vend::Cfg->{Options_repository}{Old48} || {};
my $table = $opt->{table}
||= (
$loc->{table} || $::Variable->{MV_OPTION_TABLE} || 'options'
);
my $db = $Vend::Interpolate::Db{$table} || database_exists_ref($table)
or return;
$db->record_exists($sku)
Source: lib/Vend/Options/Simple.pm
Line 152 (context shows lines 142-156 in display_options():138)
$loc ||= $Vend::Cfg->{Options_repository}{Simple} || {};
my $map = $loc->{map} || {};
my $sku = $item->{code};
my $db;
my $tab;
if(not $db = $opt->{options_db}) {
$tab = $opt->{table} ||= $loc->{table}
||= $::Variable->{MV_OPTION_TABLE}
||= 'options';
$db = database_exists_ref($tab)
or do {
logOnce(
Source: lib/Vend/Options/Old48.pm
Line 87 (context shows lines 77-91 in display_options_matrix():77)
sub display_options_matrix {
my ($item, $opt, $loc) = @_;
$loc ||= $Vend::Cfg->{Options_repository}{Old48} || \%Default;
#::logDebug("Matrix options by module, old");
my $sku = $item->{mv_sku} || $item->{code};
my $db;
my $tab;
if(not $db = $opt->{options_db}) {
$tab = $opt->{table} || $::Variable->{MV_OPTION_TABLE} || 'options';
$db = database_exists_ref($tab)
or do {
logOnce(
"Matrix options: unable to find table %s for item %s",
Source: lib/Vend/Options/Old48.pm
Line 359 (context shows lines 349-363 in display_options_simple():348)
my ($item, $opt) = @_;
#::logDebug("Simple options, item=" . ::uneval($item) . "\nopt=" . ::uneval($opt));
my $map = $opt->{options_map} ||= {};
#::logDebug("Simple options by module, old");
my $sku = $item->{code};
my $db;
my $tab;
if(not $db = $opt->{options_db}) {
$tab = $opt->{table} ||= $::Variable->{MV_OPTION_TABLE_SIMPLE}
||= $::Variable->{MV_OPTION_TABLE}
||= 'options';
$db = database_exists_ref($tab)
or do {
logOnce(
MV_OPTION_TABLE_MAP — applies column mapping to all options types
It is a quoted space-delimited list of fields in the form of "field1=field2" to map options into.
Interchange 5.7.0:
Source: lib/Vend/Data.pm
Line 1387 (context shows lines 1377-1391 in remap_options():1372)
my @del;
my ($k, $v);
while (($k, $v) = each %opt_map) {
next unless defined $record->{$v};
$rec{$k} = $record->{$v};
push @del, $v;
}
delete @{$record}{@del};
@{$record}{keys %rec} = (values %rec);
}
elsif($::Variable->{MV_OPTION_TABLE_MAP}) {
$opt_remap = $::Variable->{MV_OPTION_TABLE_MAP};
$opt_remap =~ s/^\s+//;
$opt_remap =~ s/\s+$//;
map { m{(.*?)=(.*)} and $opt_map{$2} = $1} split /[\0,\s]+/, $opt_remap;
Source: lib/Vend/Options/Old48.pm
Line 124 (context shows lines 114-128 in display_options_matrix():77)
if(not $opt->{display_type} ||= $record->{display_type}) {
$opt->{display_type} = $record->{o_matrix} == 2 ? 'separate' : 'single';
}
$opt->{display_type} = lc $opt->{display_type};
my $map;
if(not $map = $opt->{options_map}) {
$map = $opt->{options_map} = {};
if(my $remap = $opt->{remap} || $::Variable->{MV_OPTION_TABLE_MAP}) {
remap_option_record($record, $map, $remap);
}
}
MV_OPTION_TABLE_SIMPLE
Interchange 5.7.0:
Source: lib/Vend/Options/Old48.pm
Line 358 (context shows lines 348-362 in display_options_simple():348)
sub display_options_simple {
my ($item, $opt) = @_;
#::logDebug("Simple options, item=" . ::uneval($item) . "\nopt=" . ::uneval($opt));
my $map = $opt->{options_map} ||= {};
#::logDebug("Simple options by module, old");
my $sku = $item->{code};
my $db;
my $tab;
if(not $db = $opt->{options_db}) {
$tab = $opt->{table} ||= $::Variable->{MV_OPTION_TABLE_SIMPLE}
||= $::Variable->{MV_OPTION_TABLE}
||= 'options';
$db = database_exists_ref($tab)
or do {
MV_ORDER_COUNTER_FILE
Interchange 5.7.0:
Source: lib/Vend/Payment/PRI.pm
Line 124 (context shows lines 114-128)
=item regkey
PRI will supply you with both a test regkey and production regkey. Enter \
both of these numbers into the the variables above. You do not \
need your production regkey to test.
=item refid
The PRI interface allows (requires) a field called REFID. This field is \
stored along with the transaction on the PRI server and allows your \
to do quick searches for transactions if this number has meaning. \
There are three possible values for the PRI_REFID_MODE variable. \
1,2 or any other character or null.
1. A "1" in the pri_refid_mode instructs interchange to read the current
order number in $Variable->{MV_ORDER_COUNTER_FILE} or "etc/order.number",
increment it by one and use that. Do not use this mode if you have a \
busy catalog. PRI might reject orders as duplicates if two people \
try to checkout at the same time.
2. A "2" in the pri_refid_mode instructs interchange to use the users
session_id as the value. This is the recommended mode.
Source: lib/Vend/Payment/PRI.pm
Line 365 (context shows lines 355-369 in PRI():316)
$transtype = $type_map{$transtype};
}
if ( ! $amount ) {
$amount = Vend::Interpolate::total_cost();
$amount = Vend::Util::round_to_frac_digits($amount,$precision);
}
# figure out what refid should be
if ( $opt->{refid_mode} == 1 ) {
my $cfn = $Variable->{MV_ORDER_COUNTER_FILE} || 'etc/order.number';
$new_order_number = $Tag->file($cfn);
$new_order_number =~ s/.*\n([A-Za-z0-9]+).*$/$1/s;
++$new_order_number;
$refid = $new_order_number;
MV_PAGE — contains the relative pathname of the current page
This variable contains relative, system-wide path of the current page being served, without the suffix. The variable is not set in the configuration files, but is manipulated by the Interchange daemon while it is runnning.
Example: Reading the value of MV_PAGE
Add the following to a test Interchange page:
Filename: @@MV_PAGE@@
Interchange 5.7.0:
Source: code/UserTag/css.tag
Line 34 (context shows lines 24-38)
my $id = "";
if (! $opt->{no_imagedir} ) {
$id = $opt->{imagedir} || $Vend::Cfg->{ImageDir};
$id =~ s:/*$:/:;
}
$dir =~ s:/+$::;
if($opt->{relative}) {
my @dirs = split m{/}, $Global::Variable->{MV_PAGE};
pop @dirs;
if(@dirs) {
$id .= join "/", @dirs, '';
$dir = join "/", $dir, @dirs;
Source: code/UserTag/bar_button.tag
Line 18 (context shows lines 8-22)
# $Id: bar_button.tag,v 1.5 2007-03-30 23:40:56 pajamian Exp $
UserTag bar-button Order page current
UserTag bar-button PosNumber 2
UserTag bar-button HasEndTag 1
UserTag bar-button Version $Revision: 1.5 $
UserTag bar-button Routine <<EOR
sub {
use strict;
my ($page, $current, $html) = @_;
$current = $Global::Variable->{MV_PAGE}
if ! $current;
$html =~ s!\[selected\]((?s:.)*)\[/selected]!!i;
my $alt = $1;
return $html if $page ne $current;
Source: code/UserTag/forum.tag
Line 133 (context shows lines 123-137)
EOF
my $lastlevel = 0;
my @uls;
my $Tag = new Vend::Tags;
my $row = shift;
$opt->{reply_page} ||= 'forum/reply';
$opt->{submit_page} ||= 'forum/submit';
$opt->{display_page} ||= $Global::Variable->{MV_PAGE};
$opt->{date_format} ||= '%B %e, %Y @%H:%M';
my $menu_row = sub {
shift;
my $row = shift;
Source: code/UserTag/page_meta.tag
Line 16 (context shows lines 6-20)
# (at your option) any later version. See the LICENSE file for details.
#
# $Id: page_meta.tag,v 1.4 2007-03-30 23:40:57 pajamian Exp $
UserTag page-meta Order page
UserTag page-meta addAttr
UserTag page-meta Version $Revision: 1.4 $
UserTag page-meta Routine <<EOR
sub {
my ($page, $opt) = @_;
$page ||= $Global::Variable->{MV_PAGE};
$page = "pages/$page";
my $meta = Vend::Table::Editor::meta_record($page)
or return;
while (my ($k, $v) = each %$meta) {
Source: code/UI_Tag/return_to.coretag
Line 63 (context shows lines 53-67)
if($opt->{stack} or $CGI::values{ui_return_stack}) {
$type = 'formlink';
}
else {
$type = 'done';
$out .= "ui_return_to=\n";
}
}
if($type eq 'formlink') {
$page = $Global::Variable->{MV_PAGE} if ! $page;
$out .= qq{ui_return_to=$page\n};
for(@args) {
tr/\n/\r/;
$out .= qq{ui_return_to=$_\n}
Source: code/UI_Tag/return_to.coretag
Line 71 (context shows lines 61-75)
if($type eq 'formlink') {
$page = $Global::Variable->{MV_PAGE} if ! $page;
$out .= qq{ui_return_to=$page\n};
for(@args) {
tr/\n/\r/;
$out .= qq{ui_return_to=$_\n}
}
}
elsif($type eq 'url') {
$page = $Global::Variable->{MV_PAGE} if ! $page;
$out .= $Tag->area( {
href => $page,
form => join("\n", @args),
});
Source: code/UI_Tag/return_to.coretag
Line 78 (context shows lines 68-82)
}
}
elsif($type eq 'url') {
$page = $Global::Variable->{MV_PAGE} if ! $page;
$out .= $Tag->area( {
href => $page,
form => join("\n", @args),
});
}
elsif ($type eq 'form') {
$page = $Global::Variable->{MV_PAGE} if ! $page;
$out .= qq{<INPUT TYPE=hidden NAME=ui_return_to VALUE="$page">\n};
for(@args) {
s/"/"/g;
$out .= qq{<INPUT TYPE=hidden NAME=ui_return_to VALUE="$_">\n}
Source: code/UI_Tag/return_to.coretag
Line 86 (context shows lines 76-90)
}
elsif ($type eq 'form') {
$page = $Global::Variable->{MV_PAGE} if ! $page;
$out .= qq{<INPUT TYPE=hidden NAME=ui_return_to VALUE="$page">\n};
for(@args) {
s/"/"/g;
$out .= qq{<INPUT TYPE=hidden NAME=ui_return_to VALUE="$_">\n}
}
}
elsif ($type eq 'regen') {
$page = $Global::Variable->{MV_PAGE} if ! $page;
$out .= qq{<INPUT TYPE=hidden NAME=ui_return_to VALUE="ui_return_to=$page">\n};
for(@args) {
s/"/"/g;
$out .= qq{<INPUT TYPE=hidden NAME=ui_return_to VALUE="ui_return_to=$_">\n}
Source: code/UI_Tag/assume_identity.tag
Line 26 (context shows lines 16-30)
my ($file, $locale, $opt) = @_;
my $pn;
if($opt and $opt->{name}) {
$pn = $opt->{name};
}
else {
$pn = $file;
$pn =~ s/\.\w+$//;
$pn =~ s:^pages/::;
}
$Global::Variable->{MV_PAGE} = $pn;
$locale = 1 unless defined $locale;
return Vend::Interpolate::interpolate_html(
Vend::Util::readfile($file, undef, $locale)
);
Source: code/UI_Tag/flex_select.coretag
Line 727 (context shows lines 717-731 in flex_select_init():30)
$meta_anchor = 'M';
}
}
$opt->{form_name} ||= "fs_$table";
$output{TOP_OF_TABLE} = <<EOF;
<table width="$opt->{table_width}" border="$opt->{table_border}" cellpadding="$opt->{table_padding}" \
cellspacing="$opt->{table_spacing}" class="$opt->{table_class}">
EOF
my $cwp = $Global::Variable->{MV_PAGE};
$opt->{form_href} ||= $CGI->{ui_searchpage} || $cwp;
$opt->{form_extra} ||= '';
$opt->{form_extra} .= qq{ name="$opt->{form_name}"} if $opt->{form_name};
$opt->{form_extra} =~ s/^\s*/ /;
Source: code/UI_Tag/flex_select.coretag
Line 882 (context shows lines 872-886 in flex_select_init():30)
<td$td_extra>
<table align="left" class="$opt->{group_class}" cellspacing=$opt->{group_spacing} \
cellpadding=$opt->{group_padding} width="$opt->{group_width}">
<tr>
EOF
unless($opt->{no_group} || $m->{fs_no_group}) {
my $u = $Tag->area({
href => 'admin/flex_group',
form => qq(
mv_data_table=$table
ui_meta_view=$mview
from_page=$Global::Variable->{MV_PAGE}
mv_arg=$col
),
});
my $msg = errmsg('Select group by %s', $col);
Source: code/UI_Tag/file_navigator.coretag
Line 172 (context shows lines 162-176)
@files = grep $_ ne 'CVS', glob('*');
}
else {
@files = split /\s+/, $dir_mask;
}
}
else {
@files = grep $_ !~ m{/CVS$}, glob("$curdir/*");
}
my $this_page = $Global::Variable->{MV_PAGE};
my $this = Vend::Interpolate::tag_area($this_page);
$this =~ s/\?(.*)//;
my $up_img = qq{<img src="up.gif" align=center border=0 height=22 width=20 title="upload ~FN~">};
Source: code/UI_Tag/if_mm.coretag
Line 105 (context shows lines 95-109)
$opt->{table} = $field;
}
$table = $opt->{table} || $table;
my $acl;
my $check;
$status = 0, last CHECKIT if $func eq 'super';
if($check = $file_func{$func}) {
$status = 1, last CHECKIT unless $record->{$check};
my $file = $field || $Global::Variable->{MV_PAGE};
# strip trailing slashes for checks on directories
$file =~ s%/+$%%;
#::logDebug("check=$check file=$file record=$record->{$check} prefix=$opt->{prefix}");
my @files = UI::Primitive::list_glob($record->{$check}, $opt->{prefix});
Source: code/UI_Tag/auto_wizard.coretag
Line 925 (context shows lines 915-929 in compile_wizard():426)
</td>
<td class=cdata width=500>
$WIDGET$
</td>
</tr>
<tr class=rspacer>
<td colspan=2><img src="bg.gif" height=1 width=1></td>
EOF
$opts{ui_wizard_fields} = join " ", @$name;
$opts{mv_nextpage} = $Global::Variable->{MV_PAGE};
$opts{mv_prevpage} = $Global::Variable->{MV_PAGE} if $current_page != 1;
$opts{bottom_buttons} = 1;
#::logDebug("walking optref");
Source: lib/Vend/Interpolate.pm
Line 3257 (context shows lines 3247-3261 in tag_more_list():3223)
$session = $q->{mv_cache_key};
my $first = $q->{mv_first_match} || 0;
$chunk = $q->{mv_matchlimit};
$perm = $q->{mv_more_permanent} ? ':1' : '';
$total = $q->{matches};
my $next = defined $q->{mv_next_pointer}
? $q->{mv_next_pointer}
: $first + $chunk;
$page = $q->{mv_search_page} || $Global::Variable->{MV_PAGE};
$prefix = $q->{prefix} || '';
my $form_arg = "mv_more_ip=1\nmv_nextpage=$page";
$form_arg .= "\npf=$q->{prefix}" if $q->{prefix};
$form_arg .= "\n$opt->{form}" if $opt->{form};
Source: lib/Vend/Interpolate.pm
Line 4788 (context shows lines 4778-4792 in tag_loop_list():4781)
return $page;
}
sub tag_loop_list {
my ($list, $opt, $text) = @_;
my $fn;
my @rows;
$opt->{prefix} ||= 'loop';
$opt->{label} ||= "loop" . ++$::Instance->{List_it} . $Global::Variable->{MV_PAGE};
#::logDebug("list is: " . uneval($list) );
## Thanks to Kaare Rasmussen for this suggestion
Source: lib/Vend/Interpolate.pm
Line 5257 (context shows lines 5247-5261 in timed_build():5190)
my $secs;
CHECKDIR: {
last CHECKDIR if Vend::File::file_name_is_absolute($file);
last CHECKDIR if $file and $file !~ m:/:;
my $dir;
if ($file) {
$dir = '.';
}
else {
$dir = 'timed';
$file = $saved_file || $Vend::Flypart || $Global::Variable->{MV_PAGE};
#::logDebug("static=$file");
if($saved_file) {
$file = $saved_file;
$file =~ s:^scan/::;
Source: lib/Vend/Interpolate.pm
Line 5266 (context shows lines 5256-5270 in timed_build():5190)
$dir = 'timed';
$file = $saved_file || $Vend::Flypart || $Global::Variable->{MV_PAGE};
#::logDebug("static=$file");
if($saved_file) {
$file = $saved_file;
$file =~ s:^scan/::;
$file = generate_key($file);
$file = "scan/$file";
}
else {
$saved_file = $file = ($Vend::Flypart || $Global::Variable->{MV_PAGE});
}
$file .= $Vend::Cfg->{HTMLsuffix};
}
$dir .= "/$1"
Source: lib/Vend/Form.pm
Line 340 (context shows lines 330-344 in links():323)
$opt->{extra} = " $opt->{extra}" if $opt->{extra};
my $template = $opt->{template} || <<EOF;
<a href="{URL}"{EXTRA}>{SELECTED <b>}{LABEL}{SELECTED </b>}</a>
EOF
my $o_template = $opt->{o_template} || <<EOF;
<b>{TVALUE}</b>
EOF
my $href = $opt->{href} || $Global::Variable->{MV_PAGE};
$opt->{form} = "mv_action=return" unless $opt->{form};
my $no_encode = $opt->{pre_filter} eq 'decode_entities' ? 1 : 0;
Source: lib/Vend/Util.pm
Line 1094 (context shows lines 1084-1098 in readin():1078)
my($fn, $contents, $gate, $pathdir, $dir, $level);
local($/);
if($file =~ m{[\[<]}) {
::logGlobal("Possible code/SQL injection attempt with file name '%s'", $file);
$file = escape_chars($file);
::logGlobal("Suspect file changed to '%s'", $file);
}
$Global::Variable->{MV_PREV_PAGE} = $Global::Variable->{MV_PAGE}
if defined $Global::Variable->{MV_PAGE};
$Global::Variable->{MV_PAGE} = $file;
$file =~ s#^\s+##;
$file =~ s#\s+$##;
Source: lib/Vend/Util.pm
Line 1285 (context shows lines 1275-1289 in vendUrl():1229)
or ($Vend::Cookie and $::Scratch->{mv_no_session_id});
$ct = ++$Vend::Session->{pageCount}
unless $opt->{no_count};
if($opt->{no_session}) {
undef $id;
undef $ct;
}
if($opt->{link_relative}) {
my $cur = $Global::Variable->{MV_PAGE};
$cur =~ s{/[^/]+$}{}
and $path = "$cur/$path";
}
MV_PAYMENT_BILLING_INDICATOR
MV_PAYMENT_BILLING_INDICATOR is available in Interchange versions:
4.6.0-5.7.0 (git-head)
Interchange 5.7.0:
Source: lib/Vend/Payment.pm
Line 207 (context shows lines 197-211 in map_actual():104)
/;
my @billing_ind = qw/
b_address1
b_city
/;
if(my $str = $::Variable->{MV_PAYMENT_BILLING_SET}) {
@billing_set = grep $_ !~ /\W/, split /[\s,\0]+/, $str;
}
if(my $str = $::Variable->{MV_PAYMENT_BILLING_INDICATOR}) {
@billing_ind = grep $_ !~ /\W/, split /[\s,\0]+/, $str;
}
@billing_set{@billing_set} = @billing_set;
MV_PAYMENT_BILLING_SET
Interchange 5.7.0:
Source: lib/Vend/Payment.pm
Line 204 (context shows lines 194-208 in map_actual():104)
b_state
b_zip
b_country
/;
my @billing_ind = qw/
b_address1
b_city
/;
if(my $str = $::Variable->{MV_PAYMENT_BILLING_SET}) {
@billing_set = grep $_ !~ /\W/, split /[\s,\0]+/, $str;
}
if(my $str = $::Variable->{MV_PAYMENT_BILLING_INDICATOR}) {
@billing_ind = grep $_ !~ /\W/, split /[\s,\0]+/, $str;
MV_PAYMENT_CURRENCY — currency for payment gateway
Interchange 5.7.0:
Source: lib/Vend/Payment/Protx2.pm
Line 770 (context shows lines 760-774 in protx():525)
my $order_id = gen_order_id($opt);
if ($txtype =~ /RELEASE|VOID|ABORT/i) {
$vendorTxCode = $::Values->{OrigVendorTxCode};
}
else {
$vendorTxCode = $order_id;
}
# ISO currency code sent to Protx, from the page or fall back to config files.
my $currency = $::Values->{iso_currency_code} || $::Values->{currency_code} \
|| $Vend::Cfg->{Locale}{iso_currency_code}
|| charge_param('currency') || $::Variable->{MV_PAYMENT_CURRENCY} || 'GBP';
my $psp_host = $opt->{host};
# The string sent to Protx.
Source: lib/Vend/Payment/SagePay.pm
Line 785 (context shows lines 775-789 in sagepay():576)
$contactFax =~ s/[^0-9-+ ]//gi;
my $giftAidPayment = $::Values->{giftaidpayment} || charge_param('giftaidpayment') || '0';
my $authCode = $::Values->{authcode} || '';
my $clientIPAddress = $CGI::remote_addr if $CGI::remote_addr;
$::Values->{authcode} = '';
::logDebug("SP".__LINE__.": bCity=$billingCity; mvccType=$cardType; start=$mvccStartDate; \
\
issue=$issue;");
# ISO currency code sent to SagePay, from the page or fall back to config files.
my $currency = $::Values->{iso_currency_code} || $::Values->{currency_code} \
\
|| $Vend::Cfg->{Locale}{iso_currency_code} ||
charge_param('currency') || $::Variable->{MV_PAYMENT_CURRENCY} || 'GBP';
my $psp_host = $opt->{host};
my $convertoffline = charge_param('convertoffline');
Source: lib/Vend/Payment/PaypalExpress.pm
Line 284 (context shows lines 274-288 in paypalexpress():266)
my $pprequest = $in->{'pprequest'} || charge_param('pprequest') || 'setrequest'; \
# 'setrequest' must be the default for standard Paypal.
my $username = charge_param('id') or die "No username id\n";
my $password = charge_param('password') or die "No password\n";
my $signature = charge_param('signature') or die "No signature found\n"; \
# use this as certificate is broken
my $ppcheckreturn = $::Values->{ppcheckreturn} || 'ord/checkout';
my $checkouturl = $Tag->area({ href => "$ppcheckreturn" });
# ISO currency code, from the page for a multi-currency site or fall back to config files.
my $currency = $::Values->{currency_code} || $Vend::Cfg->{Locale}{iso_currency_code} ||
charge_param('currency') || $::Variable->{MV_PAYMENT_CURRENCY} || 'USD';
my $amount = charge_param('amount') || Vend::Interpolate::total_cost() \
|| $::Values->{amount}; # required
$amount =~ s/^\D*//g;
$amount =~ s/\s*//g;
MV_PAYMENT_HOST
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 401 (context shows lines 391-405 in googlecheckout():399)
::logGlobal("%s v0.7.3 payment module initialised, using %s", __PACKAGE__, \
$selected) unless $Vend::Quiet;
}
package Vend::Payment;
use strict;
my ($gcourl,$merchantid,$merchantkey,$gcoserver,$xmlOut, $taxrate, $state, \
$header, $gcorequest, $actual, $orderID);
sub googlecheckout {
my ($opt, $purchaseID, $mv_order_number, $msg, $cart, %result);
$gcoserver = charge_param('googlehost') || $::Variable->{MV_PAYMENT_HOST} \
|| 'https://checkout.google.com/api/checkout/v2'; # live
my $catroot = charge_param('cat_root') || $::Variable->{CAT_ROOT};
my $ordersdir = charge_param('ordersdir') || 'orders';
my $currency = $::Values->{currency} || charge_param('currency') || 'GBP';
my $editbasketurl = charge_param('edit_basket_url') || $::Variable->{EDIT_BASKET_URL};
Source: lib/Vend/Payment/Protx2.pm
Line 601 (context shows lines 591-605 in protx():525)
}
}
# wrap around everything to bottom
else {
my %actual = map_actual();
$actual = \%actual;
$opt = {};
#::logDebug("actual map result: " . ::uneval($actual));
$vendor = $opt->{id} || charge_param('id') || $::Variable->{MV_PAYMENT_ID};
$opt->{host} = charge_param('host') || $::Variable->{MV_PAYMENT_HOST} \
\
|| 'ukvpstest.protx.com';
$opt->{use_wget} = charge_param('use_wget') || '1';
$opt->{port} = '443';
if ($txtype =~ /DEFERRED|PAYMENT|AUTHENTICATE|PREAUTH/i) {
Source: lib/Vend/Payment/SagePay.pm
Line 631 (context shows lines 621-635 in sagepay():576)
my $deliveryState;
my %result;
my %query;
my (%actual) = map_actual();
$actual = \%actual;
$opt = {};
$vendor = $opt->{id} || charge_param('id') || $::Variable->{MV_PAYMENT_ID};
$opt->{host} = charge_param('host') || $::Variable->{MV_PAYMENT_HOST} || 'live.sagepay.com';
$sagepayrequest = $opt->{sagepayrequest} = charge_param('sagepayrequest') || 'post';
$opt->{use_wget} = charge_param('use_wget') || '1';
$opt->{port} = '443';
#::logDebug("SP".__LINE__.": host=$opt->{host}; spreq=$sagepayrequest");
MV_PAYMENT_ID — specifies merchant identifier
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 450 (context shows lines 440-454 in googlecheckout():399)
my $diagnose = $::Values->{gco_diagnose} || charge_param('gco_diagnose') \
\
\
|| ''; # set to '1' to have GCO return the XML it receives for diagnostics
my $analytics_data = $::Values->{analyticsdata} || '';
$analytics_data = encode('UTF-8', $analytics_data);
my $tracking = charge_param('tracking_script') || '';
my $without_address = charge_param('without_address') || '';
my $reporttitle = charge_param('reporttitle') || '';
my $dec_inventory = charge_param('decrement_inventory') || ''; # set \
to 1 to decrement inventory upon successful 'charge'
my $alwaystaxshipping = charge_param('alwaystaxshipping') || ''; # set \
to 1 to always tax shipping despite other config options
#----------------------------------------------------------------------------------------
$merchantid = charge_param('merchantid') || $::Variable->{MV_PAYMENT_ID};
$merchantkey = charge_param('merchantkey') || $::Variable->{MV_PAYMENT_SECRET};
$gcorequest = charge_param('gcorequest') || $::Values->{gcorequest} || 'post';
$::Values->{gcorequest} = '';
Source: lib/Vend/Payment/ECHO.pm
Line 300 (context shows lines 290-304 in echo():274)
#::logDebug("echo called, args=" . ::uneval(\@_));
my (%actual) = map_actual();
my @errMsgs = ();
# Required for validation
if (! $user) {
$user = $opt->{id} ||
charge_param('id') ||
$::Variable->{ECHO_PAYMENT_ID} ||
$::Variable->{MV_PAYMENT_ID} ||
$::Variable->{CYBER_ID}
or push @errMsgs, "No payment ID found.";
}
Source: lib/Vend/Payment/Protx2.pm
Line 600 (context shows lines 590-604 in protx():525)
return %result;
}
}
# wrap around everything to bottom
else {
my %actual = map_actual();
$actual = \%actual;
$opt = {};
#::logDebug("actual map result: " . ::uneval($actual));
$vendor = $opt->{id} || charge_param('id') || $::Variable->{MV_PAYMENT_ID};
$opt->{host} = charge_param('host') || $::Variable->{MV_PAYMENT_HOST} \
|| 'ukvpstest.protx.com';
$opt->{use_wget} = charge_param('use_wget') || '1';
$opt->{port} = '443';
Source: lib/Vend/Payment/SagePay.pm
Line 630 (context shows lines 620-634 in sagepay():576)
my $billingState;
my $deliveryState;
my %result;
my %query;
my (%actual) = map_actual();
$actual = \%actual;
$opt = {};
$vendor = $opt->{id} || charge_param('id') || $::Variable->{MV_PAYMENT_ID};
$opt->{host} = charge_param('host') || $::Variable->{MV_PAYMENT_HOST} || 'live.sagepay.com';
$sagepayrequest = $opt->{sagepayrequest} = charge_param('sagepayrequest') || 'post';
$opt->{use_wget} = charge_param('use_wget') || '1';
$opt->{port} = '443';
MV_PAYMENT_MODE — payment gateway mode name
Interchange 5.7.0:
Source: code/UI_Tag/update_order_status.tag
Line 110 (context shows lines 100-114)
elsif($oid =~ /\*$/) {
Vend::Tags->error( {
name => 'settle_transaction',
set => "Order ID $oid already settled!",
});
return undef;
}
else {
#::logDebug("auth-code: $trec->{auth_code} oid=$oid");
my $settled = Vend::Tags->charge( {
route => $::Variable->{MV_PAYMENT_MODE},
order_id => $oid,
amount => $amount,
auth_code => $trec->{auth_code},
transaction => 'settle_prior',
Source: code/UI_Tag/update_order_status.tag
Line 162 (context shows lines 152-166)
elsif($oid =~ /-$/) {
Vend::Tags->error( {
name => 'void_transaction',
set => "Order ID $oid already voided!",
});
return undef;
}
else {
#::logDebug("auth-code: $trec->{auth_code} oid=$oid");
my $voided = Vend::Tags->charge( {
route => $::Variable->{MV_PAYMENT_MODE},
order_id => $oid,
amount => $amount,
auth_code => $trec->{auth_code},
transaction => 'void',
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 252 (context shows lines 242-256)
In etc/log_transction, immediately after the
[elsif variable MV_PAYMENT_MODE]
[calc]
insert this line:
undef $Session->{payment_result}{MStatus};
and leave
[elsif variable MV_PAYMENT_MODE]
as set (contrary to earlier revisions of this document), but within the \
same section change the following
two instances of
[var MV_PAYMENT_MODE] to [value mv_payment_route]
Also add these five lines to the end of the section that starts "[import table=transactions ":
lead_source: [data session source]
referring_url: [data session referer]
Source: lib/Vend/Payment/SagePay.pm
Line 129 (context shows lines 119-133)
8. When running a card through 3DSecure, the route is run twice: firstly \ to Sagepay who check whether or not the card is part of 3DSecure - if it is they send the customer to the bank's authentication page and upon returning from that the route must be run a second time to send \ the authentication results to Sagepay. The second run is initiated from the 'ord/tdsreturn' page, not \ from etc/log_transaction as it normally would be. To handle this change to the normal system flow you need to alter \ log_transaction to make the call to the payment module conditional,ie, wrap the following code around \ the "[charge route...]" call found in ln 172 (or nearby): [if scratchd mstatus eq success] [tmp name="charge_succeed"][scratch order_id][/tmp] [else] [tmp name="charge_succeed"][charge route="[var MV_PAYMENT_MODE]" amount="[scratch \ tmp_remaining]" order_id="[value mv_transaction_id]"][/tmp] [/else] [/if] If the first call to Sagepay returns a request to send the customer to \ the 3DSecure server, then IC will write a payment route error to the error log prior to sending the customer \ there. This error stops the
Source: lib/Vend/Payment/Worldpay.pm
Line 143 (context shows lines 133-147)
[elsif variable MV_PAYMENT_MODE]
to
[elsif value mv_order_profile =~ /worldpay/] add an OR if required
eg [elsif value mv_order_profile =~ /googlecheckout|worldpay/]
Then in the [calc] block immediately below insert this line:
undef $Session->{payment_result}{MStatus};
Within the same section change the following two instances of
[var MV_PAYMENT_MODE] to [value mv_payment_route]
10. Creat a callback page in /pages called wpcallback.html or any name you prefer, set this page in
the Worldpay admin panel, the module also supports dynamic callback pages \
where different catalogs can
have different callback pages, if using this the callpage URL must be set \
in the route in catalog.cfg as
Source: lib/Vend/Payment/PRI.pm
Line 88 (context shows lines 78-92)
or Route PRI id YourPRIID or with only PRI as a payment provider Variable MV_PAYMENT_ID YourPRIID A fully valid catalog.cfg entry to work with the standard demo would be: Variable MV_PAYMENT_MODE "__MV_PAYMENT_MODE__" Route PRI id "__PRI_ID__" Route PRI regkey "__PRI_REGKEY__" Route PRI test_id "__PRI_TEST_ID__" Route PRI test_regkey "__PRI_TEST_REGKEY__"
Source: lib/Vend/Payment/PaypalExpress.pm
Line 115 (context shows lines 105-119)
In etc/log_transction, immediately after the
[elsif variable MV_PAYMENT_MODE]
[calc]
insert this line:
undef $Session->{payment_result}{MStatus};
and leave
[elsif variable MV_PAYMENT_MODE]
as set (contrary to previous revisions of this document) but within the \
same section change the following
two instances of [var MV_PAYMENT_MODE] to [value mv_payment_route]. In \
particular, the setting inside the
[charge route="..] line will specify which payment processor is used for \
each particular case, and you
need to further modify this line so that it ends up like this:
[tmp name="charge_succeed"][charge route="[value mv_payment_route]" pprequest="dorequest" \
amount="[scratch tmp_remaining]" order_id="[value mv_transaction_id]"][/tmp]
If the value of 'mv_payment_route' is set to 'paypalexpress', then this \
is the one that is run. It is only
MV_PAYMENT_OTHER_CARD
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 512 (context shows lines 502-516 in guess_cc_type():453)
or $ccnum =~ /^564182\d{10}(\d{2,3})?$/
or $ccnum =~ /^6(3(33[0-4][0-9])|759[0-9]{2})\d{10}(\d{2,3})?$/)
{ return 'switch' }
elsif ($ccnum =~ /^56\d{14}$/)
{ return 'bankcard' }
elsif ($ccnum =~ /^6(3(34[5-9][0-9])|767[0-9]{2})\d{10}(\d{2,3})?$/)
{ return 'solo' }
elsif ($ccnum =~ /^622\d{13}$/)
{ return 'chinaunionpay' }
else { return $::Variable->{MV_PAYMENT_OTHER_CARD} || 'other' }
}
# Takes a reference to a hash (usually %CGI::values) that contains
# the following:
MV_PAYMENT_PRECISION — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 333 (context shows lines 323-337 in echo():274)
my $server = $opt->{server} ||
charge_param('server') ||
$::Variable->{ECHO_PAYMENT_SERVER} ||
$::Variable->{MV_PAYMENT_SERVER} ||
$::Variable->{CYBER_SERVER} ||
'https://wwws.echo-inc.com/scripts/INR200.EXE';
my $precision = $opt->{precision} ||
charge_param('precision') ||
$::Variable->{ECHO_PAYMENT_PRECISION} ||
$::Variable->{MV_PAYMENT_PRECISION} ||
$::Variable->{CYBER_PRECISION} ||
2;
##### ECHO SPECIFIC VARIABLES #####
MV_PAYMENT_PSP
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 201 (context shows lines 191-205)
you not taking your customer's details, so you have the option of complying with Google or complying with your own policy. You must have MV_PAYMENT_MODE set in products/variable.txt to either your standard payment processor or to 'googlecheckout'; though you may instead set this in catalog.cfg rather than variable txt as: Variable MV_PAYMENT_MODE googlecheckout Within the 'credit_card' section of etc/profiles.order leave "MV_PAYMENT_MODE" as set and add &set=psp __MV_PAYMENT_PSP__ &set=mv_payment_route authorizenet (or your preferred gateway) as the last entries in the section. and then add
Source: lib/Vend/Payment/PaypalExpress.pm
Line 97 (context shows lines 87-101)
&set=psp Paypal &set=mv_payment_route paypalexpress &final = yes &setcheck = payment_method paypalexpress __END__ or, if you want to use Paypal as a 'Buy now' button without taking any \ customer details, then omit the __COMMON_ORDER_PROFILE__ and the two 'email=...' lines above. Within the 'credit_card' section of etc/profiles.order leave "MV_PAYMENT_MODE" as set, and add &set=psp __MV_PAYMENT_PSP__ &set=mv_payment_route authorizenet (or your preferred gateway instead of authorizenet) as the last entries in the section. and then add
MV_PAYMENT_SECRET — password for the payment gateway
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 451 (context shows lines 441-455 in googlecheckout():399)
my $analytics_data = $::Values->{analyticsdata} || '';
$analytics_data = encode('UTF-8', $analytics_data);
my $tracking = charge_param('tracking_script') || '';
my $without_address = charge_param('without_address') || '';
my $reporttitle = charge_param('reporttitle') || '';
my $dec_inventory = charge_param('decrement_inventory') || ''; # set \ \
to 1 to decrement inventory upon successful 'charge'
my $alwaystaxshipping = charge_param('alwaystaxshipping') || ''; # set \
\
to 1 to always tax shipping despite other config options
#----------------------------------------------------------------------------------------
$merchantid = charge_param('merchantid') || $::Variable->{MV_PAYMENT_ID};
$merchantkey = charge_param('merchantkey') || $::Variable->{MV_PAYMENT_SECRET};
$gcorequest = charge_param('gcorequest') || $::Values->{gcorequest} || 'post';
$::Values->{gcorequest} = '';
if ($gcorequest eq 'post') {
Source: lib/Vend/Payment/ECHO.pm
Line 310 (context shows lines 300-314 in echo():274)
$::Variable->{MV_PAYMENT_ID} ||
$::Variable->{CYBER_ID}
or push @errMsgs, "No payment ID found.";
}
# Required for validation
if (! $secret) {
$secret = $opt->{secret} ||
charge_param('secret') ||
$::Variable->{ECHO_PAYMENT_SECRET} ||
$::Variable->{MV_PAYMENT_SECRET} ||
$::Variable->{CYBER_SECRET}
or push @errMsgs, "No payment secret found.";
}
MV_PAYMENT_SERVER — hostname or IP of the payment gateway
Interchange 5.7.0:
Source: lib/Vend/Payment/ECHO.pm
Line 326 (context shows lines 316-330 in echo():274)
for (@errMsgs) {
::logError($_);
}
return 0;
}
@errMsgs = ();
my $server = $opt->{server} ||
charge_param('server') ||
$::Variable->{ECHO_PAYMENT_SERVER} ||
$::Variable->{MV_PAYMENT_SERVER} ||
$::Variable->{CYBER_SERVER} ||
'https://wwws.echo-inc.com/scripts/INR200.EXE';
my $precision = $opt->{precision} ||
MV_PAYMENT_TRANSACTION
Interchange 5.7.0:
Source: lib/Vend/Payment/Protx2.pm
Line 537 (context shows lines 527-541 in protx():525)
my ($vendor, $amount, $actual, $opt);
# Amount sent to Protx, in 2 decimal places with any cruft removed.
# Defaults to 'amount' from the Accounts IPM or an invoicing system, falling back to IC input
$amount = $::Values->{amount} || Vend::Interpolate::total_cost();
$amount =~ s/^\D+//g;
$amount =~ s/,//g;
$amount = sprintf '%.2f', $amount;
# Transaction type sent to Protx.
my $txtype = $::Values->{transtype} || charge_param('txtype') || $::Variable->{MV_PAYMENT_TRANSACTION} \
|| 'PAYMENT';
my $accountType = $::Values->{account_type} || charge_param('account_type') || 'E';
my $payID = $::Values->{inv_no} || $::Session->{mv_transaction_id} || $::Session->{id}.$amount;
my $logdir;
Source: lib/Vend/Payment/SagePay.pm
Line 592 (context shows lines 582-596 in sagepay():576)
my ($vendor, $amount, $actual, $opt, $sagepayrequest, $page, $vendorTxCode, $pan, $cardType);
# Amount sent to SagePay, in 2 decimal places with cruft removed.
# Defaults to 'amount' from log_transaction or an invoicing system, falling back to IC input
$amount = $::Values->{amount} || charge_param('amount') || Vend::Interpolate::total_cost();
$amount =~ s/^\D*//g;
$amount =~ s/\,//g;
$amount = sprintf '%.2f', $amount;
# Transaction type sent to SagePay.
my $txtype = $::Values->{transtype} || charge_param('txtype') | \
| $::Variable->{MV_PAYMENT_TRANSACTION} ||'PAYMENT';
my $vpsprotocol = '2.23';
my $accountType = $::Values->{account_type} || charge_param('account_type') || 'E';
my $payID = $::Values->{inv_no} || $::Session->{mv_transaction_id} \
|| $::Session->{id}.$amount;
my $logorder = charge_param('logorder') || 'no'; # Set to 'yes' or \
'1' to log basket plus data useful when arguing with SagePay over empty responses
MV_PREV_PAGE — contains the relative pathname of the last page read
This variable contains relative, system-wide path of the previous page served, without the suffix. The variable is not set in the configuration files, but is manipulated by the Interchange daemon while it is runnning.
Example: Reading the value of MV_PREV_PAGE
Add the following to a test Interchange page:
Previous filename: @@MV_PREV_PAGE@@
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 1093 (context shows lines 1083-1097 in readin():1078)
my($fn, $contents, $gate, $pathdir, $dir, $level);
local($/);
if($file =~ m{[\[<]}) {
::logGlobal("Possible code/SQL injection attempt with file name '%s'", $file);
$file = escape_chars($file);
::logGlobal("Suspect file changed to '%s'", $file);
}
$Global::Variable->{MV_PREV_PAGE} = $Global::Variable->{MV_PAGE}
if defined $Global::Variable->{MV_PAGE};
$Global::Variable->{MV_PAGE} = $file;
$file =~ s#^\s+##;
MV_SEARCH_FILE
Interchange 5.7.0:
Source: lib/Vend/Scan.pm
Line 886 (context shows lines 876-890 in _file_security():879)
defined $_[1] ? $_[1] : '';
}
sub _file_security {
my ($junk, $param, $passed) = @_;
$passed = [] unless $passed;
my(@files) = grep /\S/, split /\s*[,\0]\s*/, $param, -1;
for(@files) {
my $ok = allowed_file($_);
if(!$ok) {
$ok = 1 if $_ eq $::Variable->{MV_SEARCH_FILE};
$ok = 1 if $::Scratch->{$_};
}
if(/^\w+$/ and ! $::Variable->{MV_DEFAULT_SEARCH_DB}) {
$_ = $Vend::Cfg->{Database}{$_}{file}
MV_SESSION_ID
Interchange 5.7.0:
Source: lib/Vend/Dispatch.pm
Line 1308 (context shows lines 1298-1312 in dispatch():1240)
$Vend::CookieID = $Vend::Cookie = 1;
}
Vend::Server::set_process_name("$Vend::Cat $CGI::host $sessionid");
$::Instance->{CookieName} = 'MV_SESSION_ID' if ! $::Instance->{CookieName};
$CGI::host = 'nobody' if $Vend::Cfg->{WideOpen};
if(! $sessionid) {
if(my $id = $::Variable->{MV_SESSION_ID}) {
$sessionid = $CGI::values{$id} if $CGI::values{$id};
}
if(! $sessionid and $CGI::redirect_status and $Vend::Cfg->{RedirectCache}) {
MV_SESSION_READ_RETRY — specifies the number of times to retry reading the session file
This variable specifies the number of times Interchange will attempt to read the user's session file before failing.
Example: Adjusting the MV_SESSION_READ_RETRY value
Add the following to interchange.cfg:
Variable MV_SESSION_READ_RETRY 3
Interchange 5.7.0:
Source: lib/Vend/Session.pm
Line 450 (context shows lines 440-454 in read_session():444)
# Should never get here
return undef;
}
sub read_session {
my $seed = shift;
my($s);
#::logDebug ("read session id=$Vend::SessionID name=$Vend::SessionName\n");
$s = $Vend::SessionDBM{$Vend::SessionName}
or $Global::Variable->{MV_SESSION_READ_RETRY}
and do {
my $i = 0;
my $tries = $Global::Variable->{MV_SESSION_READ_RETRY} + 0 || 5;
while($i++ < $tries) {
MV_SHIP_ADDRESS_TEMPLATE — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 3833 (context shows lines 3823-3837 in tag_address():3749)
type => $opt->{widget},
passed => $opt->{address_book},
form => $opt->{form},
},
$item
);
}
if($opt->{set} || ! $item->{$attr}) {
my $template = '';
if($::Variable->{MV_SHIP_ADDRESS_TEMPLATE}) {
$template .= $::Variable->{MV_SHIP_ADDRESS_TEMPLATE};
}
else {
$template .= "{company}\n" if $addr->{"${pre}company"};
MV_SHIP_MODIFIERS
Interchange 5.7.0:
Source: lib/Vend/Ship.pm
Line 694 (context shows lines 684-698 in shipping():525)
foreach $i (0 .. $#$Vend::Items) {
my $item = $Vend::Items->[$i];
$total += (database_field($base, $item->{code}, $field) || 0) *
$item->{quantity};
}
}
else {
#::logDebug("standard field selection");
my $use_modifier;
if ($::Variable->{MV_SHIP_MODIFIERS}){
my @pieces = grep {$_ = quotemeta $_} split(/[\s,|]+/,$::Variable->{MV_SHIP_MODIFIERS});
my $regex = join('|',@pieces);
$use_modifier = 1 if ($regex && $field =~ /^($regex)$/);
}
MV_SMTPHOST — specifies the default sender hostname when SMTP is used to send mail
If SMTP is used to send mail from Interchange, this variable specifies the hostname to use.
Example: Setting the MV_SMTPHOST variable
Add the following to interchange.cfg:
Variable MV_SMTPHOST myhost.mydomain.local
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 2104 (context shows lines 2094-2108 in send_mail():1998)
print MVMAIL $body
or last SEND;
print MVMAIL Vend::Interpolate::do_tag('mime boundary') . '--'
if $use_mime;
print MVMAIL "\r\n\cZ" if $Global::Windows;
close MVMAIL or last SEND;
$ok = ($? == 0);
}
SMTP: {
my $mhost = $::Variable->{MV_SMTPHOST} || $Global::Variable->{MV_SMTPHOST};
my $helo = $Global::Variable->{MV_HELO} || $::Variable->{SERVER_NAME};
last SMTP unless $none and $mhost;
eval {
require Net::SMTP;
Source: lib/Vend/Email.pm
Line 441 (context shows lines 431-445 in tag_mime_lite_email():91)
#
# Prepare for sending the message
#
# Configure Net::SMTP sending if that is requested..
if ( $using =~ /^Net::SMTP$/i ) {
# Unlike in previous implementations in IC, MV_SMTPHOST is not required.
# (Net::SMTP gets to figure out the host).
my $smtphost = $::Variable->{MV_SMTPHOST} ||
$Global::Variable->{MV_SMTPHOST};
my $timeout = $::Variable->{MV_SMTP_TIMEOUT} ||
$Global::Variable->{MV_SMTP_TIMEOUT} || 60;
Source: lib/Vend/Email.pm
Line 667 (context shows lines 657-671 in send_mail_legacy():561)
print MVMAIL $body
or last SEND;
print MVMAIL Vend::Interpolate::do_tag('mime boundary') . '--'
if $use_mime;
print MVMAIL "\r\n\cZ" if $Global::Windows;
close MVMAIL or last SEND;
$ok = ($? == 0);
}
SMTP: {
my $mhost = $::Variable->{MV_SMTPHOST} || $Global::Variable->{MV_SMTPHOST};
my $helo = $Global::Variable->{MV_HELO} || $::Variable->{SERVER_NAME};
last SMTP unless $none and $mhost;
eval {
require Net::SMTP;
MV_SMTP_TIMEOUT
Interchange 5.7.0:
Source: lib/Vend/Email.pm
Line 444 (context shows lines 434-448 in tag_mime_lite_email():91)
#
# Configure Net::SMTP sending if that is requested..
if ( $using =~ /^Net::SMTP$/i ) {
# Unlike in previous implementations in IC, MV_SMTPHOST is not required.
# (Net::SMTP gets to figure out the host).
my $smtphost = $::Variable->{MV_SMTPHOST} ||
$Global::Variable->{MV_SMTPHOST};
my $timeout = $::Variable->{MV_SMTP_TIMEOUT} ||
$Global::Variable->{MV_SMTP_TIMEOUT} || 60;
MIME::Lite->send('smtp', $smtphost ?
($smtphost, $timeout) :
($timeout) );
MV_STATE_REQUIRED
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 1228 (context shows lines 1218-1232 in _multistate():1219)
sub _multistate {
my($ref,$var,$val) = @_;
my $error;
my $cval = _get_cval($ref, $var);
if(my $sval = $state_template{$cval}) {
$error = 1 unless $sval =~ /\s$val\s/;
}
elsif($::Variable->{MV_STATE_REQUIRED}) {
" $::Variable->{MV_STATE_REQUIRED} " =~ /\s$cval\s/
and
length($val) < 2 and $error = 1;
}
MV_STATE_TABLE — name of database containing state, country and province information
Table to search for state-related information, such as state names, postcodes, tax rates and shipping methods available.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5491 (context shows lines 5481-5495 in tax_vat():5464)
$type =~ s/^\s+//;
$type =~ s/\s+$//;
my @taxes;
if($type =~ /^(\w+)$/) {
my $sfield = $1;
my $state = $opt->{state} || $::Values->{$sfield};
return 0 if ! $state;
my $stable = $opt->{state_table}
|| $::Variable->{MV_STATE_TABLE}
|| 'state';
my $s_taxfield = $opt->{state_tax_field}
|| $::Variable->{MV_STATE_TAX_FIELD}
|| 'tax';
MV_STATE_TAX_FIELD — name of column containing state-wide tax information
Column name in the MV_STATE_TABLE database that will be looked up
to retrieve state-wide tax information.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5494 (context shows lines 5484-5498 in tax_vat():5464)
my @taxes;
if($type =~ /^(\w+)$/) {
my $sfield = $1;
my $state = $opt->{state} || $::Values->{$sfield};
return 0 if ! $state;
my $stable = $opt->{state_table}
|| $::Variable->{MV_STATE_TABLE}
|| 'state';
my $s_taxfield = $opt->{state_tax_field}
|| $::Variable->{MV_STATE_TAX_FIELD}
|| 'tax';
my $s_taxtype = $opt->{tax_type_field}
|| $::Variable->{MV_TAX_TYPE_FIELD}
|| 'tax_name';
MV_SUBJECT — (partly documented)
The global variable MV_SUBJECT, set before interpolating
any special page, is a more secure alternative to the
subject pseudo-tag.
Example: Reading the value of MV_SUBJECT
Add the following to a test Interchange page:
Subject/title: @@MV_SUBJECT@@
Interchange 5.7.0:
Source: lib/Vend/Page.pm
Line 79 (context shows lines 69-83 in display_special_page():53)
$subject ||= 'unspecified error';
my $noname = $name;
$noname =~ s:^\.\./::;
$page = readfile($noname, $Global::NoAbsolute, 1) || readin($name);
die ::get_locale_message(412, qq{Missing special page "%s" for subject "%s"\n}, $name, $subject)
unless defined $page;
$page =~ s#\[subject\]#$subject#ig;
$Global::Variable->{MV_SUBJECT} = $subject;
$Vend::PageInit = 0;
interpolate_html($page, 1);
::response();
}
MV_TAX_CATEGORY_FIELD — name of column containing enumerated tax types, based on product category
Name of the column whose value will be retrieved in search of tax type applied to the specific product group.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5561 (context shows lines 5551-5565 in tax_vat():5464)
$rate /= 100 if $2;
$rate = $rate / (1 + $rate) if $Vend::Cfg->{TaxInclusive};
my $amount = Vend::Interpolate::taxable_amount();
$total += ($rate * $amount);
}
else {
$tax = Vend::Util::get_option_hash($t);
}
#::logDebug("tax hash=" . uneval($tax));
my $pfield = $opt->{tax_category_field}
|| $::Variable->{MV_TAX_CATEGORY_FIELD}
|| 'tax_category';
my @pfield = split /:+/, $pfield;
for my $item (@$Vend::Items) {
MV_TAX_TYPE_FIELD — name of column containing enumerated tax names
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5497 (context shows lines 5487-5501 in tax_vat():5464)
my $sfield = $1;
my $state = $opt->{state} || $::Values->{$sfield};
return 0 if ! $state;
my $stable = $opt->{state_table}
|| $::Variable->{MV_STATE_TABLE}
|| 'state';
my $s_taxfield = $opt->{state_tax_field}
|| $::Variable->{MV_STATE_TAX_FIELD}
|| 'tax';
my $s_taxtype = $opt->{tax_type_field}
|| $::Variable->{MV_TAX_TYPE_FIELD}
|| 'tax_name';
my $db = database_exists_ref($stable)
or return 0;
my $addl = '';
MV_TRACK_ADMIN
Interchange 5.7.0:
Source: lib/Vend/Dispatch.pm
Line 1628 (context shows lines 1618-1632 in dispatch():1240)
if delete $Vend::Session->{one_time_path_alias}{$Vend::FinalPath};
}
url_history($Vend::FinalPath) if $Vend::Cfg->{History};
Vend::Server::set_process_name("$Vend::Cat $CGI::host $sessionid " . \
($Vend::Session->{username} || '-') . " $Vend::FinalPath");
# TRACK
$Vend::Track = Vend::Track->new
if ($Vend::Cfg->{UserTrack} or $Vend::Cfg->{TrackFile})
and not ($Vend::admin and ! $::Variable->{MV_TRACK_ADMIN});
# END TRACK
if($Vend::Cfg->{DisplayErrors} and $Global::DisplayErrors) {
$SIG{"__DIE__"} = sub {
MV_TREE_TABLE — database name for tree menus
The term database in Interchange lingo has a different meaning as in common language, please check database for more information.
Interchange 5.7.0:
Source: lib/Vend/Menu.pm
Line 420 (context shows lines 410-424 in old_tree():383)
my $header;
$header = ::interpolate_html($opt->{header_template})
if $opt->{header_template};
if($header =~ /\S/) {
$header = Vend::Tags->uc_attr_list($opt, $header);
push @out, $header;
}
my %defaults = (
start => $opt->{tree_selector} || 'Products',
table => $::Variable->{MV_TREE_TABLE} || 'tree',
master => 'parent_fld',
subordinate => 'code',
autodetect => '1',
sort => 'code',
Source: lib/Vend/Menu.pm
Line 553 (context shows lines 543-557 in dhtml_flyout():517)
push @out, <<EOF;
<script language="JavaScript1.3">
var ${vpf}timeoutCode = -1;
var ${vpf}mydiv = '$fdiv';
var ${vpf}lines = new Array;
EOF
my %o = (
start => $opt->{tree_selector} || $opt->{name},
file => $opt->{file},
table => $opt->{table} || $::Variable->{MV_TREE_TABLE} || 'tree',
master => 'parent_fld',
subordinate => 'code',
autodetect => '1',
no_open => 1,
Source: lib/Vend/Menu.pm
Line 948 (context shows lines 938-952 in file_tree():910)
<div id="${vpf}treebox" style="visibility: Visible">
</div>
<script language="JavaScript1.3">
var ${vpf}lines = new Array;
var ${vpf}sary = new Array;
EOF
my %o = (
start => $opt->{tree_selector} || 'Products',
table => $opt->{table} || $::Variable->{MV_TREE_TABLE} || 'tree',
master => 'parent_fld',
file => $opt->{file},
subordinate => 'code',
autodetect => '1',
Source: lib/Vend/Menu.pm
Line 1468 (context shows lines 1458-1472 in dhtml_tree():1431)
push @out, <<EOF;
<div id="${vpf}treebox" style="visibility: Visible">
</div>
<script language="JavaScript1.3">
var ${vpf}lines = new Array;
EOF
my %o = (
start => $opt->{tree_selector} || 'Products',
table => $opt->{table} || $::Variable->{MV_TREE_TABLE} || 'tree',
master => 'parent_fld',
file => $opt->{file},
subordinate => 'code',
autodetect => '1',
MV_USERDB_ACL_COLUMN
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 1474 (context shows lines 1464-1478 in check_security():1457)
#return 1 if $CGI::user and ! $Global::Variable->{MV_USERDB};
if($gate) {
$gate =~ s/\s+//g;
return 1 if is_yes($gate);
}
elsif($Vend::Session->{logged_in}) {
return 1 if $::Variable->{MV_USERDB_REMOTE_USER};
my $db;
my $field;
if ($db = $::Variable->{MV_USERDB_ACL_TABLE}) {
$field = $::Variable->{MV_USERDB_ACL_COLUMN};
my $access = Vend::Data::database_field(
$db,
$Vend::Session->{username},
$field,
MV_USERDB_ACL_TABLE
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 1473 (context shows lines 1463-1477 in check_security():1457)
# for anyone with an HTTP basic auth will have access to everything
#return 1 if $CGI::user and ! $Global::Variable->{MV_USERDB};
if($gate) {
$gate =~ s/\s+//g;
return 1 if is_yes($gate);
}
elsif($Vend::Session->{logged_in}) {
return 1 if $::Variable->{MV_USERDB_REMOTE_USER};
my $db;
my $field;
if ($db = $::Variable->{MV_USERDB_ACL_TABLE}) {
$field = $::Variable->{MV_USERDB_ACL_COLUMN};
my $access = Vend::Data::database_field(
$db,
$Vend::Session->{username},
MV_USERDB_REMOTE_USER — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 1470 (context shows lines 1460-1474 in check_security():1457)
my $msg;
if(! $reconfig) {
# If using the new USERDB access control you may want to remove this next line
# for anyone with an HTTP basic auth will have access to everything
#return 1 if $CGI::user and ! $Global::Variable->{MV_USERDB};
if($gate) {
$gate =~ s/\s+//g;
return 1 if is_yes($gate);
}
elsif($Vend::Session->{logged_in}) {
return 1 if $::Variable->{MV_USERDB_REMOTE_USER};
my $db;
my $field;
if ($db = $::Variable->{MV_USERDB_ACL_TABLE}) {
$field = $::Variable->{MV_USERDB_ACL_COLUMN};
MV_UTF8
Interchange 5.7.0:
Source: lib/Vend/Server.pm
Line 485 (context shows lines 475-489 in parse_multipart():437)
::logGlobal({ level => 'debug' }, "unsupported multipart header: \n%s\n", $header);
next;
}
my ($content_type) = $header{'Content-Type'} =~ /^([^\s;]+)/;
my ($charset) = $header{'Content-Type'} =~ / charset="?([-a-zA-Z0-9]+)"?/;
$content_type ||= 'text/plain';
$charset ||= default_charset();
if ($content_type =~ m{^text/}i && $::Variable->{MV_UTF8}) {
Vend::CharSet::to_internal($charset, \$data);
# use our character set instead of the client's one
# to store the file
$charset = default_charset();
Source: lib/Vend/Util.pm
Line 1181 (context shows lines 1171-1185 in readin():1078)
$file = find_special_page('violation');
$fn = $try . "/" . escape_chars($file) . $suffix;
}
}
else {
$fn = $try . "/" . escape_chars($file) . $suffix;
}
if (open(MVIN, "< $fn")) {
binmode(MVIN) if $Global::Windows;
binmode(MVIN, ":utf8") if $::Variable->{MV_UTF8};
undef $/;
$contents = <MVIN>;
close(MVIN);
last;
Source: lib/Vend/File.pm
Line 68 (context shows lines 58-72 in writefile():64)
use File::Path;
use File::Copy;
use subs qw(logError logGlobal);
use vars qw($VERSION @EXPORT @EXPORT_OK $errstr);
$VERSION = '2.33';
sub writefile {
my($file, $data, $opt) = @_;
my($encoding, $fallback);
if ($::Variable->{MV_UTF8}) {
$encoding = $opt->{encoding} ||= 'utf-8';
undef $encoding if $encoding eq 'raw';
$fallback = $opt->{fallback};
$fallback = Encode::PERLQQ() unless defined $fallback;
Source: lib/Vend/File.pm
Line 200 (context shows lines 190-204 in readfile():193)
# If catalog FileDatabase is enabled and there are no contents, we can retrieve
# the file from the database.
sub readfile {
my($ifile, $no, $loc, $opt) = @_;
my($contents,$encoding,$fallback);
local($/);
$opt ||= {};
if ($::Variable->{MV_UTF8}) {
$encoding = $opt->{encoding} ||= 'utf-8';
$fallback = $opt->{fallback};
$fallback = Encode::PERLQQ() unless defined $fallback;
undef $encoding if $encoding eq 'raw';
Source: lib/Vend/Table/Common.pm
Line 1639 (context shows lines 1629-1643 in new_filehandle():1637)
if($Vend::admin or ! defined($cfg->{LOG_ERROR_SESSION}) or $cfg->{LOG_ERROR_SESSION}) {
$Vend::Session->{errors} = {} unless CORE::ref($Vend::Session->{errors}) eq 'HASH';
$Vend::Session->{errors}{$ekey} = $msg;
}
die $msg if $cfg->{DIE_ERROR};
return $cfg->{last_error} = $msg;
}
sub new_filehandle {
my $fh = shift;
binmode($fh, ":utf8") if $::Variable->{MV_UTF8};
return $fh;
}
1;
MV_VALID_PROVINCE — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 1136 (context shows lines 1126-1140 in _state_province():1129)
$val =~ /^[ABCEGHJKLMNPRSTVXYabceghjklmnprstvxy]\d[A-Za-z]\d[A-Za-z]\d$/;
};
sub _state_province {
my($ref,$var,$val) = @_;
my $error;
if(length($val) != 2) {
$error = 1;
}
else {
my $pval = $::Variable->{MV_VALID_PROVINCE}
? " $::Variable->{MV_VALID_PROVINCE} "
: $state_template{CA};
my $sval = $::Variable->{MV_VALID_STATE}
? " $::Variable->{MV_VALID_STATE} "
Source: lib/Vend/Order.pm
Line 1171 (context shows lines 1161-1175 in _province():1169)
}
else {
return (undef, $var,
errmsg( $state_error{US}, $val )
);
}
}
sub _province {
my($ref,$var,$val) = @_;
my $pval = $::Variable->{MV_VALID_PROVINCE}
? " $::Variable->{MV_VALID_PROVINCE} "
: $state_template{CA};
if( $val =~ /\S/ and $pval =~ /\s$val\s/i) {
return (1, $var, '');
MV_VALID_STATE — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 1139 (context shows lines 1129-1143 in _state_province():1129)
sub _state_province {
my($ref,$var,$val) = @_;
my $error;
if(length($val) != 2) {
$error = 1;
}
else {
my $pval = $::Variable->{MV_VALID_PROVINCE}
? " $::Variable->{MV_VALID_PROVINCE} "
: $state_template{CA};
my $sval = $::Variable->{MV_VALID_STATE}
? " $::Variable->{MV_VALID_STATE} "
: $state_template{US};
$error = 1
unless $sval =~ /\s$val\s/i or $pval =~ /\s$val\s/i ;
Source: lib/Vend/Order.pm
Line 1155 (context shows lines 1145-1159 in _state():1153)
if($error) {
return (undef, $var,
errmsg( "'%s' not a two-letter state or province code", $val )
);
}
return (1, $var, '');
}
sub _state {
my($ref,$var,$val) = @_;
my $sval = $::Variable->{MV_VALID_STATE}
? " $::Variable->{MV_VALID_STATE} "
: $state_template{US};
if( $val =~ /\S/ and $sval =~ /\s$val\s/i ) {
MV_VARIANT_JOINER
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 2162 (context shows lines 2152-2166 in update_quantity():2036)
}
$::Values->{"quantity$i"} = delete $CGI::values{"quantity$i"};
SKUSET: {
my $sku;
my $found_option;
last SKUSET unless $sku = delete $CGI::values{"mv_sku$i"};
my @sku = split /\0/, $sku, -1;
for(@sku[1..$#sku]) {
if (not length $_) {
$_ = $::Variable->{MV_VARIANT_JOINER} || '0';
next;
}
$found_option++;
}
Source: lib/Vend/Order.pm
Line 2324 (context shows lines 2314-2328 in add_items():2262)
$Vend::Cfg->{UseModifier} = [] if ! $Vend::Cfg->{UseModifier};
my %seen;
my @mods = (grep $_ !~ /^mv_/, split /\0/, $CGI::values{mv_item_option});
@mods = grep ! $seen{$_}++, @mods;
push @{$Vend::Cfg->{UseModifier}}, @mods;
}
if($CGI::values{mv_sku}) {
my @sku = split /\0/, $CGI::values{mv_sku};
for (@sku) {
$_ = $::Variable->{MV_VARIANT_JOINER} || '0' if ! length($_);
}
$items[0] = join '-', @sku;
my $sku_field = $Vend::Cfg->{Options_repository}{Matrix}->{sku} || 'sku';
$skus[0] = Vend::Data::product_field($sku_field, $items[0]);
MV_ZIP_REQUIRED
Interchange 5.7.0:
Source: lib/Vend/Order.pm
Line 1205 (context shows lines 1195-1209 in _multizip():1195)
sub _multizip {
my($ref,$var,$val) = @_;
$val =~ s/^\s+//;
my $error;
my $cval = _get_cval($ref, $var);
if (my $sub = $zip_routine{$cval}) {
$sub->($val) or $error = 1;
}
elsif($::Variable->{MV_ZIP_REQUIRED}) {
" $::Variable->{MV_ZIP_REQUIRED} " =~ /\s$cval\s/
and
length($val) < 4 and $error = 1;
}
ORDERS_TO
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 150 (context shows lines 140-154)
report etc/log_transaction track logs/tracking.asc counter_tid logs/tid.counter EOF Route gco_final master 1 Route gco_final cascade "copy_user main_entry" Route gco_final empty 1 Route gco_final supplant 1 Route gco_final no_receipt 1 Route gco_final email __ORDERS_TO__ The 'edit basket' URL is available to customers when they are at Google, and lets them change either the basket contents or the delivery address.
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 428 (context shows lines 418-432 in googlecheckout():399)
my $exempt_taxfield = charge_param('exempt_tax_field') || 'exempt';
my $tax_included = $::Values->{tax_included} || charge_param('tax_included') || '';
my $calculate_included_tax = $::Values->{calculate_included_tax} || charge_param \
('calculate_included_tax') || '';
my $ordernumber = charge_param('ordernumber') || 'etc/order.number';
my $gcocounter = charge_param('gcocounter') || 'etc/username.counter';
my $defaultshipmode = charge_param('default_shipmode') || 'upsg';
my $defaultcountry = $::Values->{default_country} || charge_param('default_country') || '';
my $defaultstate = $::Values->{default_state} || charge_param('default_state') || '';
my $bypass_auth = charge_param('bypass_authorization') || '1';
my $senderemail = charge_param('sender_email') ;
my $merchantemail = charge_param('merchant_email') || $::Variable->{ORDERS_TO};
my $doreceipt = charge_param('receipt_from_merchant') || '1';
my $sendemail = charge_param('email_auth_charge') || 'charge';
my $htmlmail = charge_param('html_mail') || '';
my $mailriskfail = $::Values->{mailriskfail} || charge_param('mail_on_risk_failure') \
|| "Authentication checks failed";
PACAKGE
Interchange 5.7.0:
Source: lib/Vend/Payment/PaypalExpress.pm
Line 248 (context shows lines 238-252)
Lyn St George <info@zolotek.net>
Based on original code by Mike Heins <mheins@perusion.com>
=cut
BEGIN {
eval {
package Vend::Payment;
require SOAP::Lite or die __PACKAGE__ . " requires SOAP::Lite";
# without this next it defaults to Net::SSL which may crash
require IO::Socket::SSL or die __PACAKGE__ . " requires IO::Socket::SSL";
require Net::SSLeay;
};
if ($@) {
PAGE
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 3383 (context shows lines 3373-3387 in tag_more_list():3223)
}
else {
$r =~ s:\[(last|next)[-_]anchor\]$All\[/\1[-_]anchor\]::gi;
}
unless ($page_anchor) {
if($r =~ s:\[page[-_]anchor\]($All)\[/page[-_]anchor\]::i) {
$page_anchor = $1;
}
else {
$page_anchor = '__PAGE__';
}
}
elsif ($page_anchor ne 'none') {
$page_anchor = qq%<img src="$page_anchor?__PAGE__"__BORDER__>%;
Source: lib/Vend/Interpolate.pm
Line 3387 (context shows lines 3377-3391 in tag_more_list():3223)
unless ($page_anchor) {
if($r =~ s:\[page[-_]anchor\]($All)\[/page[-_]anchor\]::i) {
$page_anchor = $1;
}
else {
$page_anchor = '__PAGE__';
}
}
elsif ($page_anchor ne 'none') {
$page_anchor = qq%<img src="$page_anchor?__PAGE__"__BORDER__>%;
}
$page_anchor =~ s/\$(MIN|MAX)?PAGE\$/__${1}PAGE__/g;
PAGE_TITLE_NAME — (partly documented)
Interchange 5.7.0:
Source: dist/lib/UI/ContentEditor.pm
Line 2409 (context shows lines 2399-2413 in preview_page():2398)
my ($ref, $opt) = @_;
my $dest = preview_dir();
$dest .= "/$ref->{ui_name}";
$::Scratch->{tmp_tmpfile} = $dest;
my $tmp = { %$ref };
my $record = ref_content($tmp)
or return death("preview_template", "bad news");
my $text = format_page(
$tmp,
{
preview => $::Variable->{PAGE_TITLE_NAME} || 'page_title',
preview_tag => errmsg('****PREVIEW****'),
},
);
$record->{page_text} = $text;
PRI_ID
Interchange 5.7.0:
Source: lib/Vend/Payment/PRI.pm
Line 89 (context shows lines 79-93)
Route PRI id YourPRIID or with only PRI as a payment provider Variable MV_PAYMENT_ID YourPRIID A fully valid catalog.cfg entry to work with the standard demo would be: Variable MV_PAYMENT_MODE "__MV_PAYMENT_MODE__" Route PRI id "__PRI_ID__" Route PRI regkey "__PRI_REGKEY__" Route PRI test_id "__PRI_TEST_ID__" Route PRI test_regkey "__PRI_TEST_REGKEY__" Route PRI test_mode "__PRI_TEST_MODE__"
PRI_REFID_MODE
Interchange 5.7.0:
Source: lib/Vend/Payment/PRI.pm
Line 94 (context shows lines 84-98)
Variable MV_PAYMENT_ID YourPRIID A fully valid catalog.cfg entry to work with the standard demo would be: Variable MV_PAYMENT_MODE "__MV_PAYMENT_MODE__" Route PRI id "__PRI_ID__" Route PRI regkey "__PRI_REGKEY__" Route PRI test_id "__PRI_TEST_ID__" Route PRI test_regkey "__PRI_TEST_REGKEY__" Route PRI test_mode "__PRI_TEST_MODE__" Route PRI refid_mode "__PRI_REFID_MODE__" A fully valid variable.txt entry to work with the PRI module would be: MV_PAYMENT_MODE PRI Payment
PRI_REGKEY
Interchange 5.7.0:
Source: lib/Vend/Payment/PRI.pm
Line 90 (context shows lines 80-94)
Route PRI id YourPRIID or with only PRI as a payment provider Variable MV_PAYMENT_ID YourPRIID A fully valid catalog.cfg entry to work with the standard demo would be: Variable MV_PAYMENT_MODE "__MV_PAYMENT_MODE__" Route PRI id "__PRI_ID__" Route PRI regkey "__PRI_REGKEY__" Route PRI test_id "__PRI_TEST_ID__" Route PRI test_regkey "__PRI_TEST_REGKEY__" Route PRI test_mode "__PRI_TEST_MODE__" Route PRI refid_mode "__PRI_REFID_MODE__"
PRI_TEST_ID
Interchange 5.7.0:
Source: lib/Vend/Payment/PRI.pm
Line 91 (context shows lines 81-95)
or with only PRI as a payment provider
Variable MV_PAYMENT_ID YourPRIID
A fully valid catalog.cfg entry to work with the standard demo would be:
Variable MV_PAYMENT_MODE "__MV_PAYMENT_MODE__"
Route PRI id "__PRI_ID__"
Route PRI regkey "__PRI_REGKEY__"
Route PRI test_id "__PRI_TEST_ID__"
Route PRI test_regkey "__PRI_TEST_REGKEY__"
Route PRI test_mode "__PRI_TEST_MODE__"
Route PRI refid_mode "__PRI_REFID_MODE__"
PRI_TEST_MODE
Interchange 5.7.0:
Source: lib/Vend/Payment/PRI.pm
Line 93 (context shows lines 83-97)
Variable MV_PAYMENT_ID YourPRIID
A fully valid catalog.cfg entry to work with the standard demo would be:
Variable MV_PAYMENT_MODE "__MV_PAYMENT_MODE__"
Route PRI id "__PRI_ID__"
Route PRI regkey "__PRI_REGKEY__"
Route PRI test_id "__PRI_TEST_ID__"
Route PRI test_regkey "__PRI_TEST_REGKEY__"
Route PRI test_mode "__PRI_TEST_MODE__"
Route PRI refid_mode "__PRI_REFID_MODE__"
A fully valid variable.txt entry to work with the PRI module would be:
PRI_TEST_REGKEY
Interchange 5.7.0:
Source: lib/Vend/Payment/PRI.pm
Line 92 (context shows lines 82-96)
or with only PRI as a payment provider
Variable MV_PAYMENT_ID YourPRIID
A fully valid catalog.cfg entry to work with the standard demo would be:
Variable MV_PAYMENT_MODE "__MV_PAYMENT_MODE__"
Route PRI id "__PRI_ID__"
Route PRI regkey "__PRI_REGKEY__"
Route PRI test_id "__PRI_TEST_ID__"
Route PRI test_regkey "__PRI_TEST_REGKEY__"
Route PRI test_mode "__PRI_TEST_MODE__"
Route PRI refid_mode "__PRI_REFID_MODE__"
A fully valid variable.txt entry to work with the PRI module would be:
RECEIPT_URL
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 409 (context shows lines 399-413 in googlecheckout():399)
sub googlecheckout {
my ($opt, $purchaseID, $mv_order_number, $msg, $cart, %result);
$gcoserver = charge_param('googlehost') || $::Variable->{MV_PAYMENT_HOST} \
\
\
\
\
|| 'https://checkout.google.com/api/checkout/v2'; # live
my $catroot = charge_param('cat_root') || $::Variable->{CAT_ROOT};
my $ordersdir = charge_param('ordersdir') || 'orders';
my $currency = $::Values->{currency} || charge_param('currency') || 'GBP';
my $editbasketurl = charge_param('edit_basket_url') || $::Variable->{EDIT_BASKET_URL};
$editbasketurl =~ s/\.html$//i;
$editbasketurl .= ".html?id=$::Session->{id}";
my $continueshoppingurl = charge_param('continue_shopping_url') || $::Variable->{CONTINUE_SHOPPING_URL};
my $receipturl = charge_param('receipt_url') || $::Variable->{RECEIPT_URL};
my $gcoipn_url = charge_param('gcoipn_url') || $::Variable->{GCOIPN_URL};
my $gcocmd_url = charge_param('gcocmd_url') || $::Variable->{GCOCMD_URL}; \
\
# from IC admin panel, not from GCO
my $chargecard = $::Values->{charge_card} || charge_param('charge_card') || '1';
my $basket_expiry = charge_param('basket_expiry') || $::Variable->{BASKET_EXPIRY} || '1 month';
SECURE_SERVER
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 436 (context shows lines 426-440 in googlecheckout():399)
my $bypass_auth = charge_param('bypass_authorization') || '1';
my $senderemail = charge_param('sender_email') ;
my $merchantemail = charge_param('merchant_email') || $::Variable->{ORDERS_TO};
my $doreceipt = charge_param('receipt_from_merchant') || '1';
my $sendemail = charge_param('email_auth_charge') || 'charge';
my $htmlmail = charge_param('html_mail') || '';
my $mailriskfail = $::Values->{mailriskfail} || charge_param('mail_on_risk_failure') \
\
|| "Authentication checks failed";
my $gcocmd = $::Values->{gcocmd} || '';
my $avsmatch = charge_param('avs_match_accepted') || 'partial';
my $cv2match = charge_param('cv2_match_accepted') || 'yes';
my $checkouturl = charge_param('checkouturl') || "$::Variable->{SECURE_SERVER}$::Variable->{CGI_URL}/ord/checkout";
my $returnurl = charge_param('returnurl') || "$::Variable->{SECURE_SERVER}$::Variable->{CGI_URL}/ord/gcoreceipt";
$returnurl =~ s/\.html$//i;
$returnurl .= ".html?id=$::Session->{id}";
my $diagnose = $::Values->{gco_diagnose} || charge_param('gco_diagnose') \
|| ''; # set to '1' to have GCO return the XML it receives for diagnostics
Source: lib/Vend/Payment/SagePay.pm
Line 604 (context shows lines 594-608 in sagepay():576)
my $accountType = $::Values->{account_type} || charge_param('account_type') || 'E';
my $payID = $::Values->{inv_no} || $::Session->{mv_transaction_id} \
\
|| $::Session->{id}.$amount;
my $logorder = charge_param('logorder') || 'no'; # Set to 'yes' or \ \
'1' to log basket plus data useful when arguing with SagePay over empty responses
my $logsagepay = charge_param('logsagepay') || 'no'; # Set to yes or \
1 to log sagepay activity for debugging
my $logzero = charge_param('logzero') || 'no';
my $available = $::Values->{available} || charge_param('available') || 'no';
my $description = "$::Values->{company} $::Values->{fname} $::Values->{lname}";
$description = substr($description,0,99);
my $apply3ds = $::Values->{apply3ds} || charge_param('apply3ds') \
|| '0'; # '2' will turn 3ds off, '0' is default live variant
my $applyAVSCV2 = $::Values->{applyavscv2} || charge_param('applyavscv2') || '0';
my $termurl = charge_param('returnurl') || "$::Variable->{SECURE_SERVER}$::Variable->{CGI_URL}/ord/tdsreturn";
my $tdscallback = charge_param('tdscallback') || '/gateway/service/direct3dcallback.vsp';
my $checkouturl = charge_param('checkouturl') || "$::Variable->{SECURE_SERVER}$::Variable->{CGI_URL}/ord/checkout";
my $checkstatus = charge_param('check_status') || '1';
my $checkstatusurl = charge_param('check_status_url') || '/TxStatus/TxStatus.asp';
SERVER_NAME — (partly documented)
Interchange 5.7.0:
Source: lib/Vend/Util.pm
Line 2105 (context shows lines 2095-2109 in send_mail():1998)
or last SEND;
print MVMAIL Vend::Interpolate::do_tag('mime boundary') . '--'
if $use_mime;
print MVMAIL "\r\n\cZ" if $Global::Windows;
close MVMAIL or last SEND;
$ok = ($? == 0);
}
SMTP: {
my $mhost = $::Variable->{MV_SMTPHOST} || $Global::Variable->{MV_SMTPHOST};
my $helo = $Global::Variable->{MV_HELO} || $::Variable->{SERVER_NAME};
last SMTP unless $none and $mhost;
eval {
require Net::SMTP;
};
Source: lib/Vend/Email.pm
Line 668 (context shows lines 658-672 in send_mail_legacy():561)
or last SEND;
print MVMAIL Vend::Interpolate::do_tag('mime boundary') . '--'
if $use_mime;
print MVMAIL "\r\n\cZ" if $Global::Windows;
close MVMAIL or last SEND;
$ok = ($? == 0);
}
SMTP: {
my $mhost = $::Variable->{MV_SMTPHOST} || $Global::Variable->{MV_SMTPHOST};
my $helo = $Global::Variable->{MV_HELO} || $::Variable->{SERVER_NAME};
last SMTP unless $none and $mhost;
eval {
require Net::SMTP;
};
Source: lib/Vend/Payment/iTransact.pm
Line 296 (context shows lines 286-300 in itransact():217)
phone => $actual{phone_day},
email => $actual{email},
ccnum => $actual{mv_credit_card_number},
ccmo => $exp_month,
ccyr => $exp_year,
ret_mode => "redirect",
);
my $hp = $opt->{home_page}
|| charge_param('home_page')
|| $::Variable->{SERVER_NAME};
$hp = "http://$hp" unless $hp =~ /^\w+:/;
$values{home_page} = $hp;
$opt->{submit_url} ||= 'https://secure.itransact.com/cgi-bin/rc/ord.cgi';
SHIP_DEFAULT_ZIP
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 53 (context shows lines 43-57)
);
my %mailtypes = (
'package' => 1,
'postcards or aerogrammes' => 1,
'matter for the blind' => 1,
'envelope' => 1,
);
my $error_msg = 'USPS: ';
my $origin = $opt->{origin} || $::Variable->{USPS_ORIGIN} || $::Variable->{UPS_ORIGIN};
my $destination = $opt->{destination} || $::Values->{zip} || $::Variable->{SHIP_DEFAULT_ZIP};
my $userid = $opt->{userid} || $::Variable->{USPS_ID};
my $passwd = $opt->{passwd} || $::Variable->{USPS_PASSWORD};
my $url = $opt->{url} || $::Variable->{USPS_URL} || 'http://Production.ShippingAPIs.com/ShippingAPI.dll';
my $container = $opt->{container} || $::Variable->{USPS_CONTAINER} || 'None';
SQLDSN — default DSN string used for SQL database connections
No magic is happening here, mind you. Your "template", the demo catalog,
or some piece of code must — at some point — refer to the
SQLDSN variable explicitly. Interchange does not somehow do this by itself.
See the DSN glossary entry for complete discussion.
Interchange 5.7.0:
Source: lib/Vend/Ship/QueryUPS.pm
Line 303 (context shows lines 293-307 in calculate():40)
To aggregate by 1, use .999999. =item cache_table Set to the name of a table (default ups_cache) which can cache the calls so repeated calls for the same values will not require repeated calls to UPS. Table needs to be set up with: Database ups_cache ship/ups_cache.txt __SQLDSN__ Database ups_cache AUTO_SEQUENCE ups_cache_seq Database ups_cache DEFAULT_TYPE varchar(12) Database ups_cache INDEX weight origin zip shipmode country
SURVEY_LOG_DIR — directory to store survey results
Interchange 5.7.0:
Source: code/UI_Tag/auto_wizard.coretag
Line 254 (context shows lines 244-258 in survey_log_to_file():242)
if(! $opt->{output_repeated} and already($wizname)) {
return template_attr($wizname, $ref, $opt, $fnames);
}
my $fn = $ref->{survey_file};
my $cfn = $ref->{survey_counter};
my $sqlc = $ref->{survey_counter_sql};
if(! $fn) {
$fn = $::Variable->{SURVEY_LOG_DIR} || 'logs/survey';
$fn .= "/$wizname.txt";
}
if(! $cfn and ! $sqlc) {
TAXCOUNTRY — (partly documented)
Allows you to supply an alternate string of valid countries to override the standard Country validation.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5403 (context shows lines 5393-5407 in fly_tax():5400)
switch_discount_space($oldspace) if defined $oldspace;
return $taxable;
}
sub fly_tax {
my ($area, $opt) = @_;
if(my $country_check = $::Variable->{TAXCOUNTRY}) {
$country_check =~ /\b$::Values->{country}\b/
or return 0;
}
TAXHANDLING
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5418 (context shows lines 5408-5422 in fly_tax():5400)
if(! $area) {
my $zone = $Vend::Cfg->{SalesTax};
while($zone =~ m/(\w+)/g) {
last if $area = $::Values->{$1};
}
}
#::logDebug("flytax area=$area");
return 0 unless $area;
my $rates = $::Variable->{TAXRATE};
my $taxable_shipping = $::Variable->{TAXSHIPPING} || '';
my $taxable_handling = $::Variable->{TAXHANDLING} || '';
$rates =~ s/^\s+//;
$rates =~ s/\s+$//;
$area =~ s/^\s+//;
$area =~ s/\s+$//;
TAXRATE — key=value pairs used for taxing calculation
An accessory-list style of values (key/value pairs) defining areas and corresponding tax values.
This is used in conjunction with the FlyTax taxing method.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5416 (context shows lines 5406-5420 in fly_tax():5400)
}
if(! $area) {
my $zone = $Vend::Cfg->{SalesTax};
while($zone =~ m/(\w+)/g) {
last if $area = $::Values->{$1};
}
}
#::logDebug("flytax area=$area");
return 0 unless $area;
my $rates = $::Variable->{TAXRATE};
my $taxable_shipping = $::Variable->{TAXSHIPPING} || '';
my $taxable_handling = $::Variable->{TAXHANDLING} || '';
$rates =~ s/^\s+//;
$rates =~ s/\s+$//;
TAXSHIPPING — list of geographical identifiers for which taxing is applied
A space- or comma-separated list of codes for which shipping is taxed and needs to be applied. This is used in conjunction with the FlyTax taxing method.
Interchange 5.7.0:
Source: lib/Vend/Interpolate.pm
Line 5417 (context shows lines 5407-5421 in fly_tax():5400)
if(! $area) {
my $zone = $Vend::Cfg->{SalesTax};
while($zone =~ m/(\w+)/g) {
last if $area = $::Values->{$1};
}
}
#::logDebug("flytax area=$area");
return 0 unless $area;
my $rates = $::Variable->{TAXRATE};
my $taxable_shipping = $::Variable->{TAXSHIPPING} || '';
my $taxable_handling = $::Variable->{TAXHANDLING} || '';
$rates =~ s/^\s+//;
$rates =~ s/\s+$//;
$area =~ s/^\s+//;
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 501 (context shows lines 491-505 in googlecheckout():399)
my $defaultcountry = charge_param('defaultcountry');
my $defaultstate = charge_param('defaultstate');
my $country = uc($actual->{country});
$country = $defaultcountry unless $country;
my $state = uc($actual->{state});
$state = $defaultstate unless $state;
my $zip_pattern = $actual->{zip} || $::Values->{zip};
$zip_pattern =~ /(\S\S\S).*/;
$zip_pattern = "$1"."*";
my $taxshipping = 'false';
$taxshipping = 'true' if (($country =~ /$::Variable->{TAXSHIPPING}/) \
or ($state =~ /$::Variable->{TAXSHIPPING}/) or ($alwaystaxshipping == '1'));
::logDebug(":GCO:".__LINE__.": shipping=$::Session->{final_shipping}, $shipping; \
handling=$handling; taxshipping=$::Variable->{TAXSHIPPING}; \
country=$country; tx=$taxshipping");
my $stax = Vend::Interpolate::salestax();
print "GCO:".__LINE__.": stax=$stax; mvst=$::Values->{mv_salestax}, $::Values->{salestax}\n";
if ($salestax == '0') {
TRUSTCOMMERCE_ACTION
Interchange 5.7.0:
Source: lib/Vend/Payment/TCLink.pm
Line 280 (context shows lines 270-284 in trustcommerce():233)
$actual->{mv_credit_card_exp_month} =~ s/\D//g;
$actual->{mv_credit_card_exp_year} =~ s/\D//g;
$actual->{mv_credit_card_exp_year} =~ s/\d\d(\d\d)/$1/;
$actual->{mv_credit_card_number} =~ s/\D//g;
$actual->{b_zip} =~ s/\D//g;
my $exp = sprintf '%02d%02d', $actual->{mv_credit_card_exp_month},
$actual->{mv_credit_card_exp_year};
my $transtype = $opt->{transaction} || $::Variable->{TRUSTCOMMERCE_ACTION};
$transtype ||= 'sale';
my %type_map = (
auth => 'preauth',
TRUSTCOMMERCE_AVS
Interchange 5.7.0:
Source: lib/Vend/Payment/TCLink.pm
Line 310 (context shows lines 300-314 in trustcommerce():233)
if(! $amount) {
$amount = Vend::Interpolate::total_cost();
$amount = Vend::Util::round_to_frac_digits($amount,$precision);
}
$amount =~ s/\D//g;
$order_id = gen_order_id($opt);
$name = $actual->{b_fname} . ' ' . $actual->{b_lname};
$avs = $opt->{avs} || $::Variable->{TRUSTCOMMERCE_AVS} || 'n';
my %query = (
amount => $amount,
cc => $actual->{mv_credit_card_number},
TRUSTCOMMERCE_ID
Interchange 5.7.0:
Source: lib/Vend/Payment/TCLink.pm
Line 239 (context shows lines 229-243 in trustcommerce():233)
}
package Vend::Payment;
sub trustcommerce {
my ($user, $amount) = @_;
my $opt;
if(ref $user) {
$opt = $user;
$user = $opt->{id} || $::Variable->{TRUSTCOMMERCE_ID} || undef;
$secret = $opt->{secret} || $::Variable->{TRUSTCOMMERCE_SECRET} || undef;
}
else {
$opt = {};
TRUSTCOMMERCE_SECRET
Interchange 5.7.0:
Source: lib/Vend/Payment/TCLink.pm
Line 240 (context shows lines 230-244 in trustcommerce():233)
package Vend::Payment;
sub trustcommerce {
my ($user, $amount) = @_;
my $opt;
if(ref $user) {
$opt = $user;
$user = $opt->{id} || $::Variable->{TRUSTCOMMERCE_ID} || undef;
$secret = $opt->{secret} || $::Variable->{TRUSTCOMMERCE_SECRET} || undef;
}
else {
$opt = {};
}
TRUSTCOMMERCE_TEST
Interchange 5.7.0:
Source: lib/Vend/Payment/TCLink.pm
Line 316 (context shows lines 306-320 in trustcommerce():233)
$order_id = gen_order_id($opt);
$name = $actual->{b_fname} . ' ' . $actual->{b_lname};
$avs = $opt->{avs} || $::Variable->{TRUSTCOMMERCE_AVS} || 'n';
my %query = (
amount => $amount,
cc => $actual->{mv_credit_card_number},
exp => $exp,
demo => $opt->{test} || charge_param('test') || $::Variable->{TRUSTCOMMERCE_TEST},
name => $name,
address1 => $actual->{b_address},
city => $actual->{b_city},
state => $actual->{b_state},
UI_ACCESS_KEY_LIMIT — (partly documented)
Interchange 5.7.0:
Source: code/UI_Tag/list_keys.coretag
Line 50 (context shows lines 40-54)
$db = $db->ref() unless $Vend::Interpolate::Db{$table};
my $keyname = $db->config('KEY');
if($db->config('LARGE')) {
return ::errmsg('--not listed, too large--');
}
my $query = "select $keyname from $table order by $keyname";
#::logDebug("list_keys: query=$query");
$keys = $db->query(
{
query => $query,
ml => $::Variable->{UI_ACCESS_KEY_LIMIT} || 500,
st => 'db',
}
);
if(defined $keys) {
Source: dist/lib/UI/Primitive.pm
Line 342 (context shows lines 332-346 in list_keys():311)
return '' unless $db;
$db = $db->ref() unless $Vend::Interpolate::Db{$table};
my $keyname = $db->config('KEY');
if($db->config('LARGE')) {
return ::errmsg('--not listed, too large--');
}
my $query = "select $keyname from $table order by $keyname";
$keys = $db->query(
{
query => $query,
ml => $::Variable->{UI_ACCESS_KEY_LIMIT} || 500,
st => 'db',
}
);
if(defined $keys) {
UI_ACCESS_TABLE — (partly documented)
Interchange 5.7.0:
Source: dist/lib/UI/Primitive.pm
Line 108 (context shows lines 98-112 in ui_acl_enabled():98)
sub ui_acl_enabled {
my $try = shift;
my $table;
$Global::SuperUserFunction = \&is_super;
my $default = defined $Global::Variable->{UI_SECURITY_OVERRIDE}
? $Global::Variable->{UI_SECURITY_OVERRIDE}
: 0;
if ($Vend::superuser) {
return $Vend::UI_entry = { super => 1 };
}
$table = $::Variable->{UI_ACCESS_TABLE} || 'access';
$Vend::WriteDatabase{$table} = 1;
my $db = Vend::Data::database_exists_ref($table);
return $default unless $db;
$db = $db->ref() unless $Vend::Interpolate::Db{$table};
Source: dist/lib/UI/Primitive.pm
Line 136 (context shows lines 126-140 in get_ui_table_acl():127)
sub get_ui_table_acl {
my ($table, $user, $keys) = @_;
$table = $::Values->{mv_data_table} unless $table;
my $acl_top;
if($user and $user ne $Vend::username) {
if ($Vend::UI_acl{$user}) {
$acl_top = $Vend::UI_acl{$user};
}
else {
my $ui_table = $::Variable->{UI_ACCESS_TABLE} || 'access';
my $acl_txt = Vend::Interpolate::tag_data($ui_table, 'table_control', $user);
return undef unless $acl_txt;
$acl_top = $ui_safe->reval($acl_txt);
return undef unless ref($acl_top);
UI_BASE — specify relative system path to the admin interface files
This variable specifies the relative path to the admin interface. It is used system-wide.
Interchange 5.7.0:
Source: lib/Vend/Table/Editor.pm
Line 3887 (context shows lines 3877-3891 in editor():2205)
$template->{$c} =~ s/\$LABEL\$/{LABEL}/g;
}
}
my $meta_string = '';
my $meta_url;
my $meta_url_specific;
if($show_meta) {
# Get global variables
my $base = $::Variable->{UI_BASE}
|| $Global::Variable->{UI_BASE} || 'admin';
my $page = $Global::Variable->{MV_PAGE};
my $id = $t . "::$c";
$id = $opt->{ui_meta_view} . "::$id"
if $opt->{ui_meta_view} and $opt->{ui_meta_view} ne 'metaconfig';
Source: code/Widget/uploadhelper.widget
Line 28 (context shows lines 18-32)
my $val = $opt->{value};
my $path = $opt->{path} || $opt->{outboard};
my $size = $opt->{cols} || $opt->{width};
$path =~ s:^/+::;
my $view_url;
$size = qq{ SIZE="$size"} if $size > 0;
my $out = '';
if ($val) {
if($path) {
my $base = $::Variable->{UI_BASE} || 'admin';
my $view_url = Vend::Interpolate::tag_area("$base/do_view", "$path/$val");
$out .= qq{<A HREF="$view_url">};
}
$out .= $val;
Source: code/UI_Tag/version.coretag
Line 33 (context shows lines 23-37)
if($opt->{global_error}) {
push @out, $Global::ErrorFile;
$done_something = 1;
}
if($opt->{local_error}) {
my $dfn = my $fn = $Vend::Cfg->{ErrorFile};
my $pre = $Global::Catalog{$Vend::Cat}->{dir} . '/';
$fn =~ s:^\Q$pre\E::;
my $href = $Tag->area("$::Variable->{UI_BASE}/do_view", $fn);
push(@out, qq{<a href="$href">$dfn</a>});
$done_something = 1;
}
Source: code/UI_Tag/file_navigator.coretag
Line 32 (context shows lines 22-36)
*S_ISGID = sub {return 1024};
*S_ISVTX = sub {return 512};
}
sub {
my ($dir_mask, $opt) = @_;
#::logDebug("file-nav dir_mask: $dir_mask opt: " . ::uneval($opt));
$dir_mask = '*';
my $base_admin = ( $::Variable->{UI_BASE} || 'admin');
my $base_url = $Vend::Cfg->{VendURL}
. '/'
. ($opt->{base_url} || $base_admin);
my $view_href = $opt->{view_href} || "$base_admin/do_view";
UI_COMPONENT_DIR
Interchange 5.7.0:
Source: dist/lib/UI/ContentEditor.pm
Line 1007 (context shows lines 997-1011 in get_content_dirs():991)
# look no farther
}
elsif($opt->{type} eq 'page') {
$dir = $Vend::Cfg->{PageDir};
}
else {
my $tdir = $opt->{template_dir}
|| $::Variable->{UI_TEMPLATE_DIR} || 'templates';
if($opt->{type} eq 'component') {
$dir = $opt->{component_dir}
|| $::Variable->{UI_COMPONENT_DIR} || "$tdir/components";
}
else {
$dir = $tdir;
}
Source: dist/lib/UI/ContentEditor.pm
Line 2333 (context shows lines 2323-2337 in write_component():2331)
sub write_template {
my ($record, $dest) = @_;
my $dir = $::Variable->{UI_TEMPLATE_DIR} || 'templates';
$dest ||= "$dir/$record->{code}";
Vend::Tags->write_relative_file($dest, $record->{temp_text});
}
sub write_component {
my ($record, $dest) = @_;
my $dir = $::Variable->{UI_COMPONENT_DIR} || 'templates/components';
$dest ||= "$dir/$record->{code}";
Vend::Tags->write_relative_file($dest, $record->{comp_text});
}
UI_COMPONENT_TABLE
Interchange 5.7.0:
Source: dist/lib/UI/ContentEditor.pm
Line 179 (context shows lines 169-183 in get_cdb():175)
return $store unless $type;
$store->{$type} ||= {};
return $store->{$type} unless $name;
return $store->{$type}{$name};
}
sub get_cdb {
my $opt = shift;
return $opt->{component_db} if defined $opt->{component_db};
my $tab = $opt->{component_table};
$tab ||= $::Variable->{UI_COMPONENT_TABLE};
$tab ||= 'component';
$opt->{component_db} = ::database_exists_ref($tab) || '';
}
UI_DATE_BEGIN — default first year for date widget
Interchange 5.7.0:
Source: lib/Vend/Form.pm
Line 528 (context shows lines 518-532 in date_widget():444)
my $cy = $t[5] + 1900;
# If year_begin or year_end are /00+/, make current year
for(qw/ year_begin year_end /) {
if( length($opt->{$_}) > 1 and $opt->{$_} == 0) {
$opt->{$_} = $cy;
}
}
if(my $by = $opt->{year_begin} || $::Variable->{UI_DATE_BEGIN}) {
my $ey = $opt->{year_end} || $::Variable->{UI_DATE_END} || ($cy + 10);
if($by < 100) {
$by = $cy - abs($by);
}
UI_DATE_END — default last year for date widget
Interchange 5.7.0:
Source: lib/Vend/Form.pm
Line 529 (context shows lines 519-533 in date_widget():444)
my $cy = $t[5] + 1900;
# If year_begin or year_end are /00+/, make current year
for(qw/ year_begin year_end /) {
if( length($opt->{$_}) > 1 and $opt->{$_} == 0) {
$opt->{$_} = $cy;
}
}
if(my $by = $opt->{year_begin} || $::Variable->{UI_DATE_BEGIN}) {
my $ey = $opt->{year_end} || $::Variable->{UI_DATE_END} || ($cy + 10);
if($by < 100) {
$by = $cy - abs($by);
}
if($ey < 100) {
UI_ERROR_PAGE — (partly documented)
Interchange 5.7.0:
Source: code/UI_Tag/flex_select.coretag
Line 86 (context shows lines 76-90 in flex_select_init():30)
$Tmp->{flex_select} ||= {};
my $ts = $Tmp->{flex_select}{$table} = {};
if(! $db) {
$Tag->error({
name => 'flex_select',
set => errmsg('no %s database', $table),
});
my $url = $Tag->area( {
href => $::Variable->{UI_ERROR_PAGE} || 'admin/error',
secure => $::Variable->{UI_SECURE},
});
#::logDebug("delivering error url=$url");
$Tag->deliver( { location => $url });
UI_IMAGE_DIR — specify web server path to the admin interface images and CSS
This variable specifies the web server path to the admin interface images and CSS definitions.
Interchange 5.7.0:
Source: code/SystemTag/image.tag
Line 37 (context shows lines 27-41)
@imagefields = qw( image ) if ! @imagefields;
my @imagesuffixes = qw( jpg gif png jpeg );
my $filere = qr/\.\w{2,4}$/;
my $absurlre = qr!^(?i:https?)://!;
if ($opt->{ui}) {
# unless no image dir specified, add locale string
my $locale = $Scratch->{mv_locale} ? $Scratch->{mv_locale} : 'en_US';
$imagedir = $::Variable->{UI_IMAGE_DIR}
|| $Global::Variable->{UI_IMAGE_DIR};
$imagedirsecure = $::Variable->{UI_IMAGE_DIR}
|| $Global::Variable->{UI_IMAGE_DIR};
for ($imagedir, $imagedirsecure) {
if ($_) {
UI_ITEM_TABLES
Interchange 5.7.0:
Source: lib/Vend/Options/Simple.pm
Line 279 (context shows lines 269-283 in admin_page():255)
or return;
my ($k,$v);
$db->clone_row($CGI->{ui_clone_id}, $CGI->{sku});
$db->clone_set('sku', $CGI->{ui_clone_id}, $CGI->{sku});
return;
[/perl]
[/if]
[if cgi sku]
[tag flag write]options[/tag]
[perl tables="options __UI_ITEM_TABLES__"]
my $otab = 'options';
my $odb = $Db{$otab};
foreach(sort keys %{$CGI}) {
UI_LARGE_TABLE — (partly documented)
Interchange 5.7.0:
Source: code/UI_Tag/flex_select.coretag
Line 94 (context shows lines 84-98 in flex_select_init():30)
});
my $url = $Tag->area( {
href => $::Variable->{UI_ERROR_PAGE} || 'admin/error',
secure => $::Variable->{UI_SECURE},
});
#::logDebug("delivering error url=$url");
$Tag->deliver( { location => $url });
return;
}
if( $::Variable->{UI_LARGE_TABLE} =~ /\b$table\b/ or $db->config('LARGE') ) {
$ts->{large} = 1;
}
if( $db->config('COMPOSITE_KEY') ) {
UI_META_LINK — toggle UI meta link display
Interchange 5.7.0:
Source: lib/Vend/Table/Editor.pm
Line 3313 (context shows lines 3303-3317 in editor():2205)
my @ext_enable;
if($opt->{left_width} and ! $opt->{label_cell_width}) {
$opt->{label_cell_extra} .= qq{ width="$opt->{left_width}"};
}
my $show_meta;
if($super and ! $opt->{no_meta}) {
$show_meta = defined $def->{ui_meta_force}
? $def->{ui_meta_force}
: $::Variable->{UI_META_LINK};
}
if($show_meta) {
if(! $opt->{row_template} and ! $opt->{simple_row}) {
UI_META_SELECT
Interchange 5.7.0:
Source: code/UI_Tag/flex_select.coretag
Line 712 (context shows lines 702-716 in flex_select_init():30)
}
$opt->{ui_style} = 1 unless defined $opt->{ui_style};
$opt->{no_checkbox} = 1 if $ts->{multikey};
my $show_meta;
my $meta_anchor;
if($Tag->if_mm('super') and ! $opt->{no_meta}) {
$show_meta = defined $::Values->{ui_meta_force}
? $::Values->{ui_meta_force}
: $::Variable->{UI_META_SELECT};
if($opt->{meta_image}) {
$meta_anchor = qq{<img src="$opt->{meta_image}" border=0>};
}
else {
UI_META_TABLE — name of the metadata table
Interchange 5.7.0:
Source: code/UI_Tag/row_edit.coretag
Line 22 (context shows lines 12-26)
UserTag row-edit addAttr
UserTag row-edit Interpolate 1
UserTag row-edit Version $Revision: 1.12 $
UserTag row-edit Routine <<EOR
sub {
my ($key,$table,$size,$columns,$opt) = @_;
use vars qw/$CGI $Values $Variable/;
#::logDebug("row_edit options=" . ::uneval($opt));
$table = $table || $CGI::values{mv_data_table} || return "BLANK DB";
my $db = ::database_exists_ref($table);
my $mtab = $::Variable->{UI_META_TABLE} || 'mv_metadata';
my $mdb = ::database_exists_ref($mtab);
$opt->{view} ||= $CGI->{ui_meta_view};
my $view = Vend::Table::Editor::meta_record($table, $opt->{view}) || {};
Source: lib/Vend/Table/Editor.pm
Line 665 (context shows lines 655-669 in meta_record():657)
}
sub meta_record {
my ($item, $view, $mdb, $extended_only, $overlay) = @_;
#::logDebug("meta_record: item=$item view=$view mdb=$mdb");
return undef unless $item;
my $mtable;
if(! ref ($mdb)) {
$mtable = $mdb || $::Variable->{UI_META_TABLE} || 'mv_metadata';
#::logDebug("meta_record mtable=$mtable");
$mdb = database_exists_ref($mtable)
or return undef;
}
Source: lib/Vend/Table/Editor.pm
Line 763 (context shows lines 753-767 in display():726)
$table and $column or $opt->{meta}
or last METALOOK;
## We get a metarecord directly, though why it would be here
## and not in options I don't know
if($opt->{meta} and ref($opt->{meta}) eq 'HASH') {
$record = $opt->{meta};
last METALOOK;
}
$mtab = $opt->{meta_table} || $::Variable->{UI_META_TABLE} || 'mv_metadata'
or last METALOOK;
my $meta = Vend::Data::database_exists_ref($mtab)
or do {
::logError("non-existent meta table: %s", $mtab);
Source: dist/lib/UI/ContentEditor.pm
Line 1732 (context shows lines 1722-1736 in make_control_editor():1696)
action => 'return',
defaults => 1,
force_defaults => 1,
form_extra => $extra,
href => $href,
js_changed => 'changed',
nocancel => 1,
noexport => 1,
no_meta => 1,
show_reset => 1,
table => $::Variable->{UI_META_TABLE} || 'mv_metadata',
view => 'ui_component',
widget => $widopt,
hidden => $hidden,
);
UI_PAGE_DIR
Interchange 5.7.0:
Source: dist/lib/UI/ContentEditor.pm
Line 2319 (context shows lines 2309-2323 in write_page():2317)
my $out = "[comment]\n";
$out .= join "\n", @header;
$out .= "\n\n";
$out .= join "\n", @controls;
$out .= "\n[/comment]\n";
$out .= $body;
}
sub write_page {
my ($record, $dest) = @_;
my $dir = $::Variable->{UI_PAGE_DIR} || 'pages';
$dest ||= "$dir/$record->{code}";
Vend::Tags->write_relative_file($dest, $record->{page_text});
}
UI_PAGE_TABLE
Interchange 5.7.0:
Source: dist/lib/UI/ContentEditor.pm
Line 197 (context shows lines 187-201 in get_pdb():193)
my $tab = $opt->{template_table};
$tab ||= $::Variable->{UI_TEMPLATE_TABLE};
$tab ||= 'template';
$opt->{template_db} = ::database_exists_ref($tab) || '';
}
sub get_pdb {
my $opt = shift;
return $opt->{page_db} if defined $opt->{page_db};
my $tab = $opt->{page_table};
$tab ||= $::Variable->{UI_PAGE_TABLE};
$tab ||= 'page';
$opt->{page_db} = ::database_exists_ref($tab) || '';
}
UI_REGION_DIR
Interchange 5.7.0:
Source: dist/lib/UI/ContentEditor.pm
Line 2193 (context shows lines 2183-2197 in format_template():2148)
push @header, "ui_version: " . Vend::Tags->version();
delete $ref->{ui_name};
delete $ref->{ui_type};
delete $ref->{"ui_$type"};
delete $ref->{ui_slots};
delete $ref->{ui_version};
my $body = delete $ref->{ui_body};
$body =~ s/\r\n/\n/g;
$body =~ s/\r/\n/g;
my $dir = $::Variable->{UI_REGION_DIR} || 'templates/regions';
my $layout = delete $ref->{ui_template_layout} || [];
my $regdir;
for my $var (@$layout) {
UI_SECURE — force UI into secure mode
Interchange 5.7.0:
Source: code/UI_Tag/flex_select.coretag
Line 87 (context shows lines 77-91 in flex_select_init():30)
$Tmp->{flex_select} ||= {};
my $ts = $Tmp->{flex_select}{$table} = {};
if(! $db) {
$Tag->error({
name => 'flex_select',
set => errmsg('no %s database', $table),
});
my $url = $Tag->area( {
href => $::Variable->{UI_ERROR_PAGE} || 'admin/error',
secure => $::Variable->{UI_SECURE},
});
#::logDebug("delivering error url=$url");
$Tag->deliver( { location => $url });
return;
Source: lib/Vend/Table/Editor.pm
Line 1310 (context shows lines 1300-1314 in tabbed_display():1078)
$opt->{panel_style}
}
-->
</style>
EOF
my $s1 = '';
my $s2 = '';
my $ibase = $Tag->image({
ui => $Vend::admin,
dir_only => 1,
secure => $Vend::admin && $::Variable->{UI_SECURE},
});
$opt->{clear_image} ||= 'bg.gif';
my $clear = "$ibase/$opt->{clear_image}";
my @dntabs;
UI_SECURITY_OVERRIDE — (partly documented)
If configured and no UI_ACCESS_TABLE found,
then it will return that there is an ACL set. This would allow you to test ACLs
See sub ui_acl_enabled() for more details.
StandardCatalog (catalog.cfg)VariableValues Standard catalog (catalog.cfg) Variable values
Interchange 5.7.0:
Source: dist/lib/UI/Primitive.pm
Line 102 (context shows lines 92-106 in ui_acl_enabled():98)
return 1;
}
my %wrap_dest;
my $compdb;
sub ui_acl_enabled {
my $try = shift;
my $table;
$Global::SuperUserFunction = \&is_super;
my $default = defined $Global::Variable->{UI_SECURITY_OVERRIDE}
? $Global::Variable->{UI_SECURITY_OVERRIDE}
: 0;
if ($Vend::superuser) {
return $Vend::UI_entry = { super => 1 };
UI_TEMPLATE_DIR — location of the admin templates
Interchange 5.7.0:
Source: dist/lib/UI/ContentEditor.pm
Line 1004 (context shows lines 994-1008 in get_content_dirs():991)
my $dir;
if($dir = $opt->{dir}) {
# look no farther
}
elsif($opt->{type} eq 'page') {
$dir = $Vend::Cfg->{PageDir};
}
else {
my $tdir = $opt->{template_dir}
|| $::Variable->{UI_TEMPLATE_DIR} || 'templates';
if($opt->{type} eq 'component') {
$dir = $opt->{component_dir}
|| $::Variable->{UI_COMPONENT_DIR} || "$tdir/components";
}
Source: dist/lib/UI/ContentEditor.pm
Line 2326 (context shows lines 2316-2330 in write_template():2324)
sub write_page {
my ($record, $dest) = @_;
my $dir = $::Variable->{UI_PAGE_DIR} || 'pages';
$dest ||= "$dir/$record->{code}";
Vend::Tags->write_relative_file($dest, $record->{page_text});
}
sub write_template {
my ($record, $dest) = @_;
my $dir = $::Variable->{UI_TEMPLATE_DIR} || 'templates';
$dest ||= "$dir/$record->{code}";
Vend::Tags->write_relative_file($dest, $record->{temp_text});
}
UI_TEMPLATE_TABLE
Interchange 5.7.0:
Source: dist/lib/UI/ContentEditor.pm
Line 188 (context shows lines 178-192 in get_tdb():184)
my $tab = $opt->{component_table};
$tab ||= $::Variable->{UI_COMPONENT_TABLE};
$tab ||= 'component';
$opt->{component_db} = ::database_exists_ref($tab) || '';
}
sub get_tdb {
my $opt = shift;
return $opt->{template_db} if defined $opt->{template_db};
my $tab = $opt->{template_table};
$tab ||= $::Variable->{UI_TEMPLATE_TABLE};
$tab ||= 'template';
$opt->{template_db} = ::database_exists_ref($tab) || '';
}
UI_T_ROW_EVEN
Interchange 5.7.0:
Source: lib/Vend/Options/Simple.pm
Line 366 (context shows lines 356-370 in admin_page():255)
<input type="hidden" name="ui_page_title" value="[cgi ui_page_banner]">
<input type="hidden" name="ui_return_to" value="@@MV_PAGE@@">
<input type="hidden" name="mv_action" value="back">
<table border="0"><tr><td valign="top">
[query list=1 sql="select * from options where sku='[filter op=sql interpolate=1][cgi \
item_id][/filter]' and o_group is not null"]
[list]
[if-sql-data options o_group]
[calc] $Scratch->{mod_code} = q{[sql-code]}; $Scratch->{mod_code} =~ s/-/_/g; return;[/calc]
<table border="0" cellspacing="0" cellpadding="3" bgcolor="[sql-alternate \
2]__UI_T_ROW_EVEN__[else]__UI_T_ROW_ODD__[/else][/sql-alternate]">
<tr><td valign="center">Name: <input type="text" size="20" name="opt_group_[scratch \
mod_code]" value="[filter entities][sql-param o_group][/filter]">
<a href="[area href='@@MV_PAGE@@'
form='deleterecords=1
UI_USER_MERGE_TABLES
Interchange 5.7.0:
Source: code/UI_Tag/user_merge.tag
Line 58 (context shows lines 48-62)
$opt->{from_order} = 1;
}
else {
return $err->("Unable to determine what to do, no table or from_user...");
}
my $ufield = $opt->{user_field} || 'username';
my $ofield = $opt->{order_field} || 'order_number';
my $utab = $opt->{user_table} || $::Variable->{UI_USER_MERGE_USER_TABLE} || 'userdb';
my $ttabs = $opt->{merge_tables} || $::Variable->{UI_USER_MERGE_TABLES} \
\
|| 'transactions orderline';
my @ttab = grep /\w/, split /[\s,\0]+/, $ttabs;
my %kfield;
UI_USER_MERGE_USER_TABLE
Interchange 5.7.0:
Source: code/UI_Tag/user_merge.tag
Line 57 (context shows lines 47-61)
elsif ($table eq 'transactions') {
$opt->{from_order} = 1;
}
else {
return $err->("Unable to determine what to do, no table or from_user...");
}
my $ufield = $opt->{user_field} || 'username';
my $ofield = $opt->{order_field} || 'order_number';
my $utab = $opt->{user_table} || $::Variable->{UI_USER_MERGE_USER_TABLE} || 'userdb';
my $ttabs = $opt->{merge_tables} || $::Variable->{UI_USER_MERGE_TABLES} \
|| 'transactions orderline';
my @ttab = grep /\w/, split /[\s,\0]+/, $ttabs;
UPS_COUNTRY_FIELD
Interchange 5.7.0:
Source: code/UserTag/ups_query.tag
Line 26 (context shows lines 16-30)
$opt ||= {};
BEGIN {
eval {
require Business::UPS;
import Business::UPS;
};
};
$origin = $::Variable->{UPS_ORIGIN}
if ! $origin;
$country = $::Values->{$::Variable->{UPS_COUNTRY_FIELD}}
if ! $country;
$zip = $::Values->{$::Variable->{UPS_POSTCODE_FIELD}}
if ! $zip;
Source: lib/Vend/Ship/QueryUPS.pm
Line 54 (context shows lines 44-58 in calculate():40)
do_error("Ship mode %s: Requires installation of Business::UPS", $mode);
}
$opt->{service} ||= $opt->{table};
if(! $opt->{service} and $extra =~ /^\w+$/) {
$opt->{service} = $extra;
}
$opt->{service} ||= $opt->{table} || $mode;
$opt->{origin} ||= $::Variable->{UPS_ORIGIN};
$opt->{country_field} ||= $::Variable->{UPS_COUNTRY_FIELD} || 'country';
$opt->{geo} ||= $::Variable->{UPS_POSTCODE_FIELD} || 'zip';
my $origin = $opt->{origin};
my $country = $opt->{country} || $::Values->{$opt->{country_field}};
UPS_COUNTRY_REMAP — (partly documented)
Interchange 5.7.0:
Source: code/UserTag/ups_query.tag
Line 46 (context shows lines 36-50)
elsif(! $modulo) {
$modulo = 9999999;
}
$country = uc $country;
my %exception;
$exception{UK} = 'GB';
if(! $::Variable->{UPS_COUNTRY_REMAP} ) {
# do nothing
}
elsif ($::Variable->{UPS_COUNTRY_REMAP} =~ /=/) {
my $new = Vend::Util::get_option_hash($::Variable->{UPS_COUNTRY_REMAP});
Source: code/UserTag/ups_query.tag
Line 50 (context shows lines 40-54)
$country = uc $country;
my %exception;
$exception{UK} = 'GB';
if(! $::Variable->{UPS_COUNTRY_REMAP} ) {
# do nothing
}
elsif ($::Variable->{UPS_COUNTRY_REMAP} =~ /=/) {
my $new = Vend::Util::get_option_hash($::Variable->{UPS_COUNTRY_REMAP});
Vend::Util::get_option_hash(\%exception, $new);
}
else {
Vend::Util::hash_string($::Variable->{UPS_COUNTRY_REMAP}, \%exception);
Source: code/UserTag/ups_query.tag
Line 54 (context shows lines 44-58)
$exception{UK} = 'GB';
if(! $::Variable->{UPS_COUNTRY_REMAP} ) {
# do nothing
}
elsif ($::Variable->{UPS_COUNTRY_REMAP} =~ /=/) {
my $new = Vend::Util::get_option_hash($::Variable->{UPS_COUNTRY_REMAP});
Vend::Util::get_option_hash(\%exception, $new);
}
else {
Vend::Util::hash_string($::Variable->{UPS_COUNTRY_REMAP}, \%exception);
}
$country = $exception{$country} if $exception{$country};
Source: lib/Vend/Ship/QueryUPS.pm
Line 78 (context shows lines 68-82 in calculate():40)
$modulo = $::Variable->{UPS_QUERY_MODULO} || 150;
}
elsif(! $modulo) {
$modulo = 9999999;
}
$country = uc $country;
my %exception = ( UK => 'GB');
if(! $::Variable->{UPS_COUNTRY_REMAP} ) {
# do nothing
}
elsif ($::Variable->{UPS_COUNTRY_REMAP} =~ /=/) {
my $new = Vend::Util::get_option_hash($::Variable->{UPS_COUNTRY_REMAP});
Source: lib/Vend/Ship/QueryUPS.pm
Line 82 (context shows lines 72-86 in calculate():40)
}
$country = uc $country;
my %exception = ( UK => 'GB');
if(! $::Variable->{UPS_COUNTRY_REMAP} ) {
# do nothing
}
elsif ($::Variable->{UPS_COUNTRY_REMAP} =~ /=/) {
my $new = Vend::Util::get_option_hash($::Variable->{UPS_COUNTRY_REMAP});
Vend::Util::get_option_hash(\%exception, $new);
}
else {
Vend::Util::hash_string($::Variable->{UPS_COUNTRY_REMAP}, \%exception);
Source: lib/Vend/Ship/QueryUPS.pm
Line 86 (context shows lines 76-90 in calculate():40)
my %exception = ( UK => 'GB');
if(! $::Variable->{UPS_COUNTRY_REMAP} ) {
# do nothing
}
elsif ($::Variable->{UPS_COUNTRY_REMAP} =~ /=/) {
my $new = Vend::Util::get_option_hash($::Variable->{UPS_COUNTRY_REMAP});
Vend::Util::get_option_hash(\%exception, $new);
}
else {
Vend::Util::hash_string($::Variable->{UPS_COUNTRY_REMAP}, \%exception);
}
$country = $exception{$country} if $exception{$country};
UPS_ORIGIN — (partly documented)
Interchange 5.7.0:
Source: code/UserTag/ups_query.tag
Line 24 (context shows lines 14-28)
sub {
my( $mode, $origin, $zip, $weight, $country, $opt) = @_;
$opt ||= {};
BEGIN {
eval {
require Business::UPS;
import Business::UPS;
};
};
$origin = $::Variable->{UPS_ORIGIN}
if ! $origin;
$country = $::Values->{$::Variable->{UPS_COUNTRY_FIELD}}
if ! $country;
$zip = $::Values->{$::Variable->{UPS_POSTCODE_FIELD}}
Source: lib/Vend/Ship/QueryUPS.pm
Line 53 (context shows lines 43-57 in calculate():40)
unless($Have_Business_UPS) {
do_error("Ship mode %s: Requires installation of Business::UPS", $mode);
}
$opt->{service} ||= $opt->{table};
if(! $opt->{service} and $extra =~ /^\w+$/) {
$opt->{service} = $extra;
}
$opt->{service} ||= $opt->{table} || $mode;
$opt->{origin} ||= $::Variable->{UPS_ORIGIN};
$opt->{country_field} ||= $::Variable->{UPS_COUNTRY_FIELD} || 'country';
$opt->{geo} ||= $::Variable->{UPS_POSTCODE_FIELD} || 'zip';
my $origin = $opt->{origin};
UPS_POSTCODE_FIELD
Interchange 5.7.0:
Source: code/UserTag/ups_query.tag
Line 28 (context shows lines 18-32)
eval {
require Business::UPS;
import Business::UPS;
};
};
$origin = $::Variable->{UPS_ORIGIN}
if ! $origin;
$country = $::Values->{$::Variable->{UPS_COUNTRY_FIELD}}
if ! $country;
$zip = $::Values->{$::Variable->{UPS_POSTCODE_FIELD}}
if ! $zip;
my $modulo = $opt->{aggregate};
Source: lib/Vend/Ship/QueryUPS.pm
Line 55 (context shows lines 45-59 in calculate():40)
}
$opt->{service} ||= $opt->{table};
if(! $opt->{service} and $extra =~ /^\w+$/) {
$opt->{service} = $extra;
}
$opt->{service} ||= $opt->{table} || $mode;
$opt->{origin} ||= $::Variable->{UPS_ORIGIN};
$opt->{country_field} ||= $::Variable->{UPS_COUNTRY_FIELD} || 'country';
$opt->{geo} ||= $::Variable->{UPS_POSTCODE_FIELD} || 'zip';
my $origin = $opt->{origin};
my $country = $opt->{country} || $::Values->{$opt->{country_field}};
UPS_QUERY_MODULO — (partly documented)
If shipping aggregation is used, it allows you to override the weight in which aggregation occurs. If not set, aggregation occurs at 150.
Interchange 5.7.0:
Source: code/UserTag/ups_query.tag
Line 34 (context shows lines 24-38)
$origin = $::Variable->{UPS_ORIGIN}
if ! $origin;
$country = $::Values->{$::Variable->{UPS_COUNTRY_FIELD}}
if ! $country;
$zip = $::Values->{$::Variable->{UPS_POSTCODE_FIELD}}
if ! $zip;
my $modulo = $opt->{aggregate};
if($modulo and $modulo < 10) {
$modulo = $::Variable->{UPS_QUERY_MODULO} || 150;
}
elsif(! $modulo) {
$modulo = 9999999;
}
Source: lib/Vend/Ship/QueryUPS.pm
Line 68 (context shows lines 58-72 in calculate():40)
my $country = $opt->{country} || $::Values->{$opt->{country_field}};
$country ||= $opt->{default_country} || 'US';
my $zip = $opt->{zip} || $::Values->{$opt->{geo}};
$zip ||= $opt->{default_geo};
my $modulo = $opt->{aggregate};
if($modulo and $modulo <= 1) {
$modulo = $::Variable->{UPS_QUERY_MODULO} || 150;
}
elsif(! $modulo) {
$modulo = 9999999;
}
Source: lib/Vend/Ship/QueryUPS.pm
Line 266 (context shows lines 256-270 in calculate():40)
value in absence of ZIP. No default -- will return 0 and error if
no zip.
=item default_country
The country code to use if none supplied -- for defaulting shipping to some
value in absence of country. Default US.
=item aggregate
If 1, aggregates by a call to weight=150 (or $Variable->{UPS_QUERY_MODULO}).
Multiplies that times number necessary, then runs a call for the
remainder. In other words:
[ups-query weight=400 mode=GNDCOM aggregate=1]
USPS_CONTAINER
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 57 (context shows lines 47-61)
'matter for the blind' => 1,
'envelope' => 1,
);
my $error_msg = 'USPS: ';
my $origin = $opt->{origin} || $::Variable->{USPS_ORIGIN} || $::Variable->{UPS_ORIGIN};
my $destination = $opt->{destination} || $::Values->{zip} || $::Variable->{SHIP_DEFAULT_ZIP};
my $userid = $opt->{userid} || $::Variable->{USPS_ID};
my $passwd = $opt->{passwd} || $::Variable->{USPS_PASSWORD};
my $url = $opt->{url} || $::Variable->{USPS_URL} || 'http://Production.ShippingAPIs.com/ShippingAPI.dll';
my $container = $opt->{container} || $::Variable->{USPS_CONTAINER} || 'None';
my $machinable = $opt->{machinable} || $::Variable->{USPS_MACHINABLE} || 'False';
$service = uc $service;
if (! $supported_services{$service}) {
USPS_ID
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 54 (context shows lines 44-58)
my %mailtypes = (
'package' => 1,
'postcards or aerogrammes' => 1,
'matter for the blind' => 1,
'envelope' => 1,
);
my $error_msg = 'USPS: ';
my $origin = $opt->{origin} || $::Variable->{USPS_ORIGIN} || $::Variable->{UPS_ORIGIN};
my $destination = $opt->{destination} || $::Values->{zip} || $::Variable->{SHIP_DEFAULT_ZIP};
my $userid = $opt->{userid} || $::Variable->{USPS_ID};
my $passwd = $opt->{passwd} || $::Variable->{USPS_PASSWORD};
my $url = $opt->{url} || $::Variable->{USPS_URL} || 'http://Production.ShippingAPIs.com/ShippingAPI.dll';
my $container = $opt->{container} || $::Variable->{USPS_CONTAINER} || 'None';
my $machinable = $opt->{machinable} || $::Variable->{USPS_MACHINABLE} || 'False';
USPS_MACHINABLE
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 58 (context shows lines 48-62)
'envelope' => 1,
);
my $error_msg = 'USPS: ';
my $origin = $opt->{origin} || $::Variable->{USPS_ORIGIN} || $::Variable->{UPS_ORIGIN};
my $destination = $opt->{destination} || $::Values->{zip} || $::Variable->{SHIP_DEFAULT_ZIP};
my $userid = $opt->{userid} || $::Variable->{USPS_ID};
my $passwd = $opt->{passwd} || $::Variable->{USPS_PASSWORD};
my $url = $opt->{url} || $::Variable->{USPS_URL} || 'http://Production.ShippingAPIs.com/ShippingAPI.dll';
my $container = $opt->{container} || $::Variable->{USPS_CONTAINER} || 'None';
my $machinable = $opt->{machinable} || $::Variable->{USPS_MACHINABLE} || 'False';
$service = uc $service;
if (! $supported_services{$service}) {
$error_msg .= "unknown service type $service.";
USPS_MAILTYPE
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 79 (context shows lines 69-83)
return;
}
if ($service eq 'PARCEL') {
if ($weight < .375 or $weight > 35) {
$machinable = 'False';
}
}
if ($opt->{country}) {
$mailtype = lc ($opt->{mailtype} || $::Variable->{USPS_MAILTYPE} || 'package');
unless ($mailtypes{$mailtype}) {
$error_msg = "unknown mail type '$mailtype'.";
return;
}
USPS_MODULO
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 86 (context shows lines 76-90)
}
if ($opt->{country}) {
$mailtype = lc ($opt->{mailtype} || $::Variable->{USPS_MAILTYPE} || 'package');
unless ($mailtypes{$mailtype}) {
$error_msg = "unknown mail type '$mailtype'.";
return;
}
}
my $modulo = $opt->{modulo} || $::Variable->{USPS_MODULO};
if ($modulo and ($modulo < $weight)) {
$m_rep = int $weight / $modulo;
$m_mod = $weight % $modulo;
$weight = $modulo;
USPS_ORIGIN
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 52 (context shows lines 42-56)
'OVERSIZE' => 1,
);
my %mailtypes = (
'package' => 1,
'postcards or aerogrammes' => 1,
'matter for the blind' => 1,
'envelope' => 1,
);
my $error_msg = 'USPS: ';
my $origin = $opt->{origin} || $::Variable->{USPS_ORIGIN} || $::Variable->{UPS_ORIGIN};
my $destination = $opt->{destination} || $::Values->{zip} || $::Variable->{SHIP_DEFAULT_ZIP};
my $userid = $opt->{userid} || $::Variable->{USPS_ID};
my $passwd = $opt->{passwd} || $::Variable->{USPS_PASSWORD};
my $url = $opt->{url} || $::Variable->{USPS_URL} || 'http://Production.ShippingAPIs.com/ShippingAPI.dll';
USPS_PASSWORD
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 55 (context shows lines 45-59)
'package' => 1,
'postcards or aerogrammes' => 1,
'matter for the blind' => 1,
'envelope' => 1,
);
my $error_msg = 'USPS: ';
my $origin = $opt->{origin} || $::Variable->{USPS_ORIGIN} || $::Variable->{UPS_ORIGIN};
my $destination = $opt->{destination} || $::Values->{zip} || $::Variable->{SHIP_DEFAULT_ZIP};
my $userid = $opt->{userid} || $::Variable->{USPS_ID};
my $passwd = $opt->{passwd} || $::Variable->{USPS_PASSWORD};
my $url = $opt->{url} || $::Variable->{USPS_URL} || 'http://Production.ShippingAPIs.com/ShippingAPI.dll';
my $container = $opt->{container} || $::Variable->{USPS_CONTAINER} || 'None';
my $machinable = $opt->{machinable} || $::Variable->{USPS_MACHINABLE} || 'False';
USPS_SIZE
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 66 (context shows lines 56-70)
my $url = $opt->{url} || $::Variable->{USPS_URL} || 'http://Production.ShippingAPIs.com/ShippingAPI.dll';
my $container = $opt->{container} || $::Variable->{USPS_CONTAINER} || 'None';
my $machinable = $opt->{machinable} || $::Variable->{USPS_MACHINABLE} || 'False';
$service = uc $service;
if (! $supported_services{$service}) {
$error_msg .= "unknown service type $service.";
return;
}
my $size = uc ($opt->{size} || $::Variable->{USPS_SIZE} || 'REGULAR');
if (! $package_sizes{$size}) {
$error_msg .= "unknown package size $size.";
return;
}
USPS_URL
Interchange 5.7.0:
Source: code/UserTag/usps_query.tag
Line 56 (context shows lines 46-60)
'postcards or aerogrammes' => 1,
'matter for the blind' => 1,
'envelope' => 1,
);
my $error_msg = 'USPS: ';
my $origin = $opt->{origin} || $::Variable->{USPS_ORIGIN} || $::Variable->{UPS_ORIGIN};
my $destination = $opt->{destination} || $::Values->{zip} || $::Variable->{SHIP_DEFAULT_ZIP};
my $userid = $opt->{userid} || $::Variable->{USPS_ID};
my $passwd = $opt->{passwd} || $::Variable->{USPS_PASSWORD};
my $url = $opt->{url} || $::Variable->{USPS_URL} || 'http://Production.ShippingAPIs.com/ShippingAPI.dll';
my $container = $opt->{container} || $::Variable->{USPS_CONTAINER} || 'None';
my $machinable = $opt->{machinable} || $::Variable->{USPS_MACHINABLE} || 'False';
$service = uc $service;
VISIT_TIMEOUT — time after which user request is treated as new visit
This variable specifies the minimal time required between two user requests, for the next request to be treated as the beginning of a new user visit (and not as part of the current series of requests).
Interchange 5.7.0:
Source: code/UI_Tag/traffic_report.coretag
Line 101 (context shows lines 91-105)
05 May
06 June
07 July
08 August
09 September
10 October
11 November
12 December
/;
my $timeout = $::Variable->{VISIT_TIMEOUT} || (30 * 10);
my $by_day = $opt->{by_day} || $CGI::values{ui_by_day};
my $len;
$len = $by_day ? 8 : 6;