Order API customdump.pl?

This is an archive of old posting to the User Forum

Order API customdump.pl?

Postby Allen Murdock » Thu Mar 06, 2003 1:34 am

All -

I'm sure this is a dumb question, but ...

I'm looking at the Order API documentation, and it refers to a file called
customdump.pl which I'd like to use as a starting point for building a
custom script to format orders for Mail Order Manager. The file is supposed
to be in the shopping cart directory, but I find only the compiled version,
customdump.cgi there.

Does anyone know where I can get the uncompiled script?

- Allen
Allen Murdock
 

Re: Order API customdump.pl?

Postby Guest » Thu Mar 06, 2003 9:52 am

Allen Murdock wrote:
All -

I'm sure this is a dumb question, but ...

I'm looking at the Order API documentation, and it refers to a file called
customdump.pl which I'd like to use as a starting point for building a
custom script to format orders for Mail Order Manager. The file is supposed
to be in the shopping cart directory, but I find only the compiled version,
customdump.cgi there.

Does anyone know where I can get the uncompiled script?

- Allen


Allen

See the Code below.

Jim

--------------------

#!/usr/bin/perl

print "Content-type: text/html\n\n";

if ($ENV{'REQUEST_METHOD'} =~ /get/i) {
$buffer = $ENV{'QUERY_STRING'};
$method = "Get";
}
else {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
$method = "Post";
}

print "<HTML><HEAD>\n";
print "<TITLE>Query Results</TITLE>\n";
print "</HEAD><BODY>\n";
print "<h1>Query Results</h1>\n";
print "<h2>(Spill my Guts)</h2>\n";
print "<h3>Method: $method</h3>\n";
print "<PRE>\n";

@nvpairs = split(/&/, $buffer);
foreach $pair (@nvpairs)
{
($name, $value) = split(/=/, $pair);

$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

print "$name = $value\n";
}
print "</PRE>\n";
print "</BODY></HTML>\n";
Guest
 

Re: Order API customdump.pl?

Postby Allen Murdock » Thu Mar 06, 2003 7:04 pm

That's excellent. Thanks.

<jstavast@xmission.com> wrote in message
news:b47qn2$kqv$1@support.shopsite.com...
Allen Murdock wrote:
All -

I'm sure this is a dumb question, but ...

I'm looking at the Order API documentation, and it refers to a file
called
customdump.pl which I'd like to use as a starting point for building a
custom script to format orders for Mail Order Manager. The file is
supposed
to be in the shopping cart directory, but I find only the compiled
version,
customdump.cgi there.

Does anyone know where I can get the uncompiled script?

- Allen


Allen
See the Code below.

Jim

--------------------

#!/usr/bin/perl

print "Content-type: text/html\n\n";

if ($ENV{'REQUEST_METHOD'} =~ /get/i) {
$buffer = $ENV{'QUERY_STRING'};
$method = "Get";
}
else {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
$method = "Post";
}

print "<HTML><HEAD>\n";
print "<TITLE>Query Results</TITLE>\n";
print "</HEAD><BODY>\n";
print "<h1>Query Results</h1>\n";
print "<h2>(Spill my Guts)</h2>\n";
print "<h3>Method: $method</h3>\n";
print "<PRE>\n";

@nvpairs = split(/&/, $buffer);
foreach $pair (@nvpairs)
{
($name, $value) = split(/=/, $pair);

$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

print "$name = $value\n";
}
print "</PRE>\n";
print "</BODY></HTML>\n";
Allen Murdock
 


Return to User Forum Archive

Who is online

Users browsing this forum: Majestic-12 [Bot] and 67 guests

cron