Can I possibly write the same values that are being displayed in the browser to a text file? The values end up different when I write to the file because the actual page has to be parsed for a data tag to be interpreted.
For example, if I call a simple test script:
here's the pl code:
#!/usr/bin/perl5
use strict;
use CGI qw
standard);
my $upname10="selector10.txt";
print "Content-type: text/html\n\n";
print"<header>";
print<<DDPENWE1;
<title> crates test</title>
<SCRIPT LANGUAGE="JavaScript">
SCPath = "/cgi-bin/SoftCart.exe";
config = "scstore";
if (location.pathname.substring(0,SCPath.length)!= SCPath) {
window.location.replace(SCPath + location.pathname + "?E+" + config);
}
</Script>
</head>
<body>
DDPENWE1
my $description = "%%product(99901BB).micro_description%%";
open (File10, ">$upname10" || die "Error opening file $upname10");
print File10 "Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:";
print "Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:<br><br>";
print File10 "<b>%%product(99901BB).micro_description%%</b>";
print File10 $description;
print $description;
print "<b>%%product(99901BB).micro_description%%</b>";
close (File10);
print"</body>";
print"</html>";
If you click on the link, you'll see that the page gets reparsed so softcart can interpret the tag - the page displays the following:
Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:
The smallest of the lifestyle series, this 2 liter twin turbo really packs a wallop. Able to leap tall buildings with a single bound. Use this crate for small dogs, such as pekinese, Yorkies, and fendermen benz.The smallest of the lifestyle series, this 2 liter twin turbo really packs a wallop. Able to leap tall buildings with a single bound. Use this crate for small dogs, such as pekinese, Yorkies, and fendermen benz.
The text file that I write to however, selector2.txt, displays the following:
Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:<b>%%product(99901BB).micro_description%%</b>%%product(99901BB).micro_description%%
How can I write the "interpreted" version to the selector2.txt file.
your help would be greatly appreciated.
thanks,
rich
For example, if I call a simple test script:
here's the pl code:
#!/usr/bin/perl5
use strict;
use CGI qw
my $upname10="selector10.txt";
print "Content-type: text/html\n\n";
print"<header>";
print<<DDPENWE1;
<title> crates test</title>
<SCRIPT LANGUAGE="JavaScript">
SCPath = "/cgi-bin/SoftCart.exe";
config = "scstore";
if (location.pathname.substring(0,SCPath.length)!= SCPath) {
window.location.replace(SCPath + location.pathname + "?E+" + config);
}
</Script>
</head>
<body>
DDPENWE1
my $description = "%%product(99901BB).micro_description%%";
open (File10, ">$upname10" || die "Error opening file $upname10");
print File10 "Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:";
print "Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:<br><br>";
print File10 "<b>%%product(99901BB).micro_description%%</b>";
print File10 $description;
print $description;
print "<b>%%product(99901BB).micro_description%%</b>";
close (File10);
print"</body>";
print"</html>";
If you click on the link, you'll see that the page gets reparsed so softcart can interpret the tag - the page displays the following:
Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:
The smallest of the lifestyle series, this 2 liter twin turbo really packs a wallop. Able to leap tall buildings with a single bound. Use this crate for small dogs, such as pekinese, Yorkies, and fendermen benz.The smallest of the lifestyle series, this 2 liter twin turbo really packs a wallop. Able to leap tall buildings with a single bound. Use this crate for small dogs, such as pekinese, Yorkies, and fendermen benz.
The text file that I write to however, selector2.txt, displays the following:
Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:<b>%%product(99901BB).micro_description%%</b>%%product(99901BB).micro_description%%
How can I write the "interpreted" version to the selector2.txt file.
your help would be greatly appreciated.
thanks,
rich