Adding information to section of script output?

This is an archive of old posting to the User Forum

Adding information to section of script output?

Postby Webmaster - Dave's Discou » Fri Sep 05, 2003 7:13 pm

Hi all,

To track the effectiveness of our online advertising with Overture, I need
to be able to place some information in the <head> section of the page
generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of the
generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com
Webmaster - Dave's Discou
 

Re: Adding information to section of script output?

Postby Rob » Fri Sep 05, 2003 9:34 pm

Ryan,

The only way to do this would be to create an order API script that could
output code to the <HEAD> section of the page before the receipt is shown.
This can be done with a perl script.

Rob

"Webmaster - Dave's Discount Motors" <webmaster@davesmotors.com> wrote in
message news:bjbfq6$it4$1@support.shopsite.com...
Hi all,

To track the effectiveness of our online advertising with Overture, I need
to be able to place some information in the <head> section of the page
generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of the
generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com
Rob
 

Re: Adding information to section of script output?

Postby Tricia in NJ » Mon Sep 29, 2003 8:53 am

Where would you add the API?
Tricia
tricia@ahoycaptain.com

"Rob" <rob@mangiafico.net> wrote in message
news:bjbo5j$kgt$1@support.shopsite.com...
Ryan,

The only way to do this would be to create an order API script that could
output code to the <HEAD> section of the page before the receipt is shown.
This can be done with a perl script.

Rob

"Webmaster - Dave's Discount Motors" <webmaster@davesmotors.com> wrote in
message news:bjbfq6$it4$1@support.shopsite.com...
Hi all,

To track the effectiveness of our online advertising with Overture, I
need
to be able to place some information in the <head> section of the page
generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of the
generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com

Tricia in NJ
 

Re: Adding information to section of script output?

Postby Rob » Mon Sep 29, 2003 9:09 am

The API would be a perl script or CGI script that you place in the shopping
cart directory. You then enable it under Merchandising -> Order API.
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

Rob

"Tricia in NJ" <tricia@ahoycaptain.com> wrote in message
news:bl9kjq$o8s$1@support.shopsite.com...
Where would you add the API?
Tricia
tricia@ahoycaptain.com

"Rob" <rob@mangiafico.net> wrote in message
news:bjbo5j$kgt$1@support.shopsite.com...
Ryan,

The only way to do this would be to create an order API script that
could
output code to the <HEAD> section of the page before the receipt is
shown.
This can be done with a perl script.

Rob

"Webmaster - Dave's Discount Motors" <webmaster@davesmotors.com> wrote
in
message news:bjbfq6$it4$1@support.shopsite.com...
Hi all,

To track the effectiveness of our online advertising with Overture, I
need
to be able to place some information in the <head> section of the page
generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of
the
generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com



Rob
 

Re: Adding information to section of script output?

Postby Webmaster - Dave's Discou » Mon Sep 29, 2003 12:48 pm

Major Problem !!!

I just discovered today that any API that uses stdout ie any API that writes
information to the HTML page, interferes with the PayPal payment method. I
have lost a lot of orders over the past 2 weeks after implementing a custom
order API.

Anyone know if it is possible to include a test in the API to only exectute
if the "Payment Method" field is something OTHER than PayPal?

Thanks in advance :)



"Rob" <rob@mangiafico.net> wrote in message
news:bl9lgj$ofp$1@support.shopsite.com...
The API would be a perl script or CGI script that you place in the
shopping
cart directory. You then enable it under Merchandising -> Order API.
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

Rob

"Tricia in NJ" <tricia@ahoycaptain.com> wrote in message
news:bl9kjq$o8s$1@support.shopsite.com...
Where would you add the API?
Tricia
tricia@ahoycaptain.com

"Rob" <rob@mangiafico.net> wrote in message
news:bjbo5j$kgt$1@support.shopsite.com...
Ryan,

The only way to do this would be to create an order API script that
could
output code to the <HEAD> section of the page before the receipt is
shown.
This can be done with a perl script.

Rob

"Webmaster - Dave's Discount Motors" <webmaster@davesmotors.com> wrote
in
message news:bjbfq6$it4$1@support.shopsite.com...
Hi all,

To track the effectiveness of our online advertising with Overture,
I
need
to be able to place some information in the <head> section of the
page
generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of
the
generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com





Webmaster - Dave's Discou
 

Re: Adding information to section of script output?

Postby loren_d_c » Mon Sep 29, 2003 12:56 pm

Yes it is possible. PayPal is paytype 7, and the paytype selected is one
of the variables available through the Order API, so your program can
have an if test to see if this variable equals 7.

Here is the warning regarding this in the help documentation:
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

The reason this is the case is that in order to send the shopper to
PayPal to complete the order, ShopSite outputs redirect headers to the
browser telling it to go there. However if your Order API program is
also outputting HTML content type headers (so that it can write to the
browser/stdout), the browser will choke, it only wants to see one
set/type of headers per document.

-Loren



Webmaster - Dave's Discount Motors wrote:
Major Problem !!!

I just discovered today that any API that uses stdout ie any API that writes
information to the HTML page, interferes with the PayPal payment method. I
have lost a lot of orders over the past 2 weeks after implementing a custom
order API.

Anyone know if it is possible to include a test in the API to only exectute
if the "Payment Method" field is something OTHER than PayPal?

Thanks in advance :)



"Rob" <rob@mangiafico.net> wrote in message
news:bl9lgj$ofp$1@support.shopsite.com...

The API would be a perl script or CGI script that you place in the

shopping

cart directory. You then enable it under Merchandising -> Order API.
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

Rob

"Tricia in NJ" <tricia@ahoycaptain.com> wrote in message
news:bl9kjq$o8s$1@support.shopsite.com...

Where would you add the API?
Tricia
tricia@ahoycaptain.com

"Rob" <rob@mangiafico.net> wrote in message
news:bjbo5j$kgt$1@support.shopsite.com...

Ryan,

The only way to do this would be to create an order API script that

could

output code to the <HEAD> section of the page before the receipt is

shown.

This can be done with a perl script.

Rob

"Webmaster - Dave's Discount Motors" <webmaster@davesmotors.com> wrote

in

message news:bjbfq6$it4$1@support.shopsite.com...

Hi all,

To track the effectiveness of our online advertising with Overture,

I

need

to be able to place some information in the <head> section of the

page

generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of

the

generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com





loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Adding information to section of script output?

Postby Webmaster - Dave's Discou » Mon Sep 29, 2003 1:43 pm

Yeah, I found the warning a little too late :)

As someone who is not a proficient cgi scripter, could you give an example
of how such a test would be implemented?


"Loren" <loren_d_c@yahoo.com> wrote in message
news:bla2pu$r82$1@support.shopsite.com...
Yes it is possible. PayPal is paytype 7, and the paytype selected is one
of the variables available through the Order API, so your program can
have an if test to see if this variable equals 7.

Here is the warning regarding this in the help documentation:
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

The reason this is the case is that in order to send the shopper to
PayPal to complete the order, ShopSite outputs redirect headers to the
browser telling it to go there. However if your Order API program is
also outputting HTML content type headers (so that it can write to the
browser/stdout), the browser will choke, it only wants to see one
set/type of headers per document.

-Loren



Webmaster - Dave's Discount Motors wrote:
Major Problem !!!

I just discovered today that any API that uses stdout ie any API that
writes
information to the HTML page, interferes with the PayPal payment method.
I
have lost a lot of orders over the past 2 weeks after implementing a
custom
order API.

Anyone know if it is possible to include a test in the API to only
exectute
if the "Payment Method" field is something OTHER than PayPal?

Thanks in advance :)



"Rob" <rob@mangiafico.net> wrote in message
news:bl9lgj$ofp$1@support.shopsite.com...

The API would be a perl script or CGI script that you place in the

shopping

cart directory. You then enable it under Merchandising -> Order API.
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

Rob

"Tricia in NJ" <tricia@ahoycaptain.com> wrote in message
news:bl9kjq$o8s$1@support.shopsite.com...

Where would you add the API?
Tricia
tricia@ahoycaptain.com

"Rob" <rob@mangiafico.net> wrote in message
news:bjbo5j$kgt$1@support.shopsite.com...

Ryan,

The only way to do this would be to create an order API script that

could

output code to the <HEAD> section of the page before the receipt is

shown.

This can be done with a perl script.

Rob

"Webmaster - Dave's Discount Motors" <webmaster@davesmotors.com> wrote

in

message news:bjbfq6$it4$1@support.shopsite.com...

Hi all,

To track the effectiveness of our online advertising with Overture,

I

need

to be able to place some information in the <head> section of the

page

generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of

the

generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com






Webmaster - Dave's Discou
 

Re: Adding information to section of script output?

Postby loren_d_c » Mon Sep 29, 2003 2:05 pm

That depends on what language you are using, and what method you are
using to get the variables from the CGI interface. But assuming you have
already gotten the paytype value passed from ShopSite into a variable
called $paytype and you are using perl, then before your script prints
anything do something like this:

unless ($paytype eq '7') {

And then don't forget to put the closing } after your last print statement.

-Loren



Webmaster - Dave's Discount Motors wrote:
Yeah, I found the warning a little too late :)

As someone who is not a proficient cgi scripter, could you give an example
of how such a test would be implemented?


"Loren" <loren_d_c@yahoo.com> wrote in message
news:bla2pu$r82$1@support.shopsite.com...

Yes it is possible. PayPal is paytype 7, and the paytype selected is one
of the variables available through the Order API, so your program can
have an if test to see if this variable equals 7.

Here is the warning regarding this in the help documentation:
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

The reason this is the case is that in order to send the shopper to
PayPal to complete the order, ShopSite outputs redirect headers to the
browser telling it to go there. However if your Order API program is
also outputting HTML content type headers (so that it can write to the
browser/stdout), the browser will choke, it only wants to see one
set/type of headers per document.

-Loren



Webmaster - Dave's Discount Motors wrote:

Major Problem !!!

I just discovered today that any API that uses stdout ie any API that

writes

information to the HTML page, interferes with the PayPal payment method.

I

have lost a lot of orders over the past 2 weeks after implementing a

custom

order API.

Anyone know if it is possible to include a test in the API to only

exectute

if the "Payment Method" field is something OTHER than PayPal?

Thanks in advance :)



"Rob" <rob@mangiafico.net> wrote in message
news:bl9lgj$ofp$1@support.shopsite.com...


The API would be a perl script or CGI script that you place in the

shopping


cart directory. You then enable it under Merchandising -> Order API.
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

Rob

"Tricia in NJ" <tricia@ahoycaptain.com> wrote in message
news:bl9kjq$o8s$1@support.shopsite.com...


Where would you add the API?
Tricia
tricia@ahoycaptain.com

"Rob" <rob@mangiafico.net> wrote in message
news:bjbo5j$kgt$1@support.shopsite.com...


Ryan,

The only way to do this would be to create an order API script that

could


output code to the <HEAD> section of the page before the receipt is

shown.


This can be done with a perl script.

Rob

"Webmaster - Dave's Discount Motors" <webmaster@davesmotors.com> wrote

in


message news:bjbfq6$it4$1@support.shopsite.com...


Hi all,

To track the effectiveness of our online advertising with Overture,

I


need


to be able to place some information in the <head> section of the

page


generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of

the


generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com




loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Adding information to section of script output?

Postby Webmaster - Dave's Discou » Mon Sep 29, 2003 3:17 pm

Thanks,

perhaps I wasn't clear enough on what "not proficient" meant :)

More like never uses.

I have a script in Perl, shown below. What modifications would I need to
make?

#!/usr/bin/perl

use CGI;

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

print <<EOM;

<html>

<head>

<title>Thank you!</title>

<SCRIPT LANGUAGE="JavaScript">

<!-- Overture Services Inc. 07/15/2003

var cc_tagVersion = "1.0";

var cc_accountID = "-";

var cc_marketID = "0";

var cc_protocol="http";

var cc_subdomain = "convctr";

if(location.protocol == "https:")

{

cc_protocol="https";

cc_subdomain="convctrs";

}

var cc_queryStr = "?" + "ver=" + cc_tagVersion + "&aID=" + cc_accountID +

"&mkt=" + cc_marketID +"&ref=" + escape(document.referrer);

var cc_imageUrl = cc_protocol + "://" + cc_subdomain +

".overture.com/images/cc/cc.gif" + cc_queryStr;

var cc_imageObject = new Image();

cc_imageObject.src = cc_imageUrl;

// -->

</SCRIPT>

</head>

<body bgcolor="#FFFFFF">

EOM

print "<!-- \n";

1;



"Loren" <loren_d_c@yahoo.com> wrote in message
news:bla6qj$s5s$1@support.shopsite.com...
That depends on what language you are using, and what method you are
using to get the variables from the CGI interface. But assuming you have
already gotten the paytype value passed from ShopSite into a variable
called $paytype and you are using perl, then before your script prints
anything do something like this:

unless ($paytype eq '7') {

And then don't forget to put the closing } after your last print
statement.

-Loren



Webmaster - Dave's Discount Motors wrote:
Yeah, I found the warning a little too late :)

As someone who is not a proficient cgi scripter, could you give an
example
of how such a test would be implemented?


"Loren" <loren_d_c@yahoo.com> wrote in message
news:bla2pu$r82$1@support.shopsite.com...

Yes it is possible. PayPal is paytype 7, and the paytype selected is one
of the variables available through the Order API, so your program can
have an if test to see if this variable equals 7.

Here is the warning regarding this in the help documentation:
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

The reason this is the case is that in order to send the shopper to
PayPal to complete the order, ShopSite outputs redirect headers to the
browser telling it to go there. However if your Order API program is
also outputting HTML content type headers (so that it can write to the
browser/stdout), the browser will choke, it only wants to see one
set/type of headers per document.

-Loren



Webmaster - Dave's Discount Motors wrote:

Major Problem !!!

I just discovered today that any API that uses stdout ie any API that

writes

information to the HTML page, interferes with the PayPal payment
method.

I

have lost a lot of orders over the past 2 weeks after implementing a

custom

order API.

Anyone know if it is possible to include a test in the API to only

exectute

if the "Payment Method" field is something OTHER than PayPal?

Thanks in advance :)



"Rob" <rob@mangiafico.net> wrote in message
news:bl9lgj$ofp$1@support.shopsite.com...


The API would be a perl script or CGI script that you place in the

shopping


cart directory. You then enable it under Merchandising -> Order API.
http://www.shopsite.com/help/6.3/en-US/ ... r.api.html

Rob

"Tricia in NJ" <tricia@ahoycaptain.com> wrote in message
news:bl9kjq$o8s$1@support.shopsite.com...


Where would you add the API?
Tricia
tricia@ahoycaptain.com

"Rob" <rob@mangiafico.net> wrote in message
news:bjbo5j$kgt$1@support.shopsite.com...


Ryan,

The only way to do this would be to create an order API script that

could


output code to the <HEAD> section of the page before the receipt is

shown.


This can be done with a perl script.

Rob

"Webmaster - Dave's Discount Motors" <webmaster@davesmotors.com
wrote

in


message news:bjbfq6$it4$1@support.shopsite.com...


Hi all,

To track the effectiveness of our online advertising with Overture,

I


need


to be able to place some information in the <head> section of the

page


generated by thankyou.cgi (I am using SS 6.3 on Solaris).

Is this possible? I can't seem to be able to access this section of

the


generated page anywhere.

Thanks in advance!

Ryan Ricks
webmaster@davesmotors.com





Webmaster - Dave's Discou
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 48 guests