URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: ustore_gen
Thread Number: 68
[ Go back to previous page ]

Original Message
"Headers & Footers problems"

Posted by Patrick [kriptap@candw.ky] on at 09:11 PM
I'm still having trouble getting the header and footer for the order and credit card pages. I read page with the store that was customized and followed what he said and added the following to the ustorekeeper-lib.pl file:

# 21. HTML Header File?
$htmlheader = "$data_directory/header.html";

# 22. Font Display Color for Notes?
$htmlfooter = "$data_directory/footer.html";

and then in the data directory I placed header and footer.html but it does not show up?

In the ustorekeeper-lib.pl file there are two lines that reads:

$layout_start_html = "";
$layout_end_html = "";

I changed them to:

$layout_start_html = "$data_directory/header.html";
$layout_end_html = "$data_directory/footer.html";

But still no header or footer, can you help?

Ps I just purchased the full version.

Thanks


Table of contents

Messages in this discussion
"Custom uStorekeeper Header and Footer not displaying"
Posted by Microburst Support Team [support@uburst.com] on at 01:21 PM
Have you tried to access the header or footer over the web just by typing the full URL of the path to these pages? I would check that first to make sure this works at a minimum.

Could you provide the full path to either of these pages, and we can look too.


"Headers & Footers problems"
Posted by Patrick [kriptap@candw.ky] on at 04:39 PM
I tried to access the header and footer over the web and I get an internal server error, so I chaged the path to read:

# 24. HTML Header File?
$htmlheader = "http//www.redbarondivers.com/_borders/header.htm";

This does not work on the script but can be accessed over the web. I also used:

# 24. HTML Header File?
$htmlheader = "/www/redbarondivers/_borders/header.htm";

So once more I am at a loss. The link to the site is:

http://www.redbarondivers.com/cgi-bin/store/ustorekeeper.pl

Thanks



"Problems"
Posted by Patrick [kriptap@candw.ky] on at 05:33 PM
How do I get this to work for the header and footer?

$layout_start_html = "";
$layout_end_html = "";

What goes between the "" What ever I put there show up on the page as text not html header or footer?


"uStorekeeper custom header and footer"
Posted by Microburst Support Team [support@uburst.com] on at 10:34 AM
Visiting your store link above, it looks like you have already figured it out. Your custom header and footer seems to display correctly now.

Let us know if this is not the case.


"Not that part"
Posted by Patrick [kriptap@candw.ky] on at 12:06 PM
Not that part the header and footer for the order page and the credit card page. I have the header and footer for the rest of the store but I also want headers and footers on these pages too. Please read above.

"Customizing the uStorekeeper Order Page"
Posted by Microburst Support Team [support@uburst.com] on at 03:08 PM
Ok, gotcha now. Lets start with the Order Page, and if this works out for you, we can address the credit card page.

First of all, you don't want to mess with $layout_start_html = "";
$layout_end_html = "";

as they are used internally to the uStorekeeper script in a way that you shouldn't be changing.

However, in the ustorekeeper-lib.pl script you can search on the variable $ord_html to see that it is used to build the HTML for the order form. You could actually add your own HTML header at the beginning of this code and your footer HTML at the end. Not super easy to do, but if you understand HTML you should be able to follow through the script and understand how the $ord_html is built.

We would highly recommend that you make a backup of your script before you start changing it though

And we would also recommend that you start out with a small change and be careful - at the beginning of the $ord_html you will notice the equal sign (=) and all the subsequent lines that concatenate more HTML onto this variable will use the .= sign

For example, when you find the first occurrence of $ord_html it will look something like this:

$ord_html = "";

which adds the string after the .= to the string named before the .=

So be careful if you are cut-n-pasting changes into this script. If you accidently add a line that starts with $ord_html = "your html" instead of $ord_html .= "your html" it will re-initialize the $ord_html variable and you will lose everything that had previously been put into that variable.

Let us know how this works out.


"To Advanced"
Posted by Patrick [kriptap@candw.ky] on at 03:56 PM
Sorry that's a bit to advanced for me, how do the other people do it? there must be an easyier way. This is the last part of the script that I need to get right them I'm all done. Do you have any other ways?

Thanks


"Headers & Footers"
Posted by Bradley Edwards [bedwards@virtual-direct.com] on at 08:34 AM
Patrick,

I see that you are trying to implement some of my customizations.;

# 21. HTML Header File?
$htmlheader = "$data_directory/header.html";

# 22. Font Display Color for Notes?
$htmlfooter = "$data_directory/footer.html";

These variables were added here to be able to change the headers and footers easily after the modifications that I did, but in order to use these files you will need to make modifications to your scripts similar to the previous post from support.


This is how I did it...

First, at the begining of the ustorekeeper.pl script add the following lines so that your first few lines look like this:

#!/usr/bin/perl
require "ustorekeeper-lib.pl";

# Load the header and footer display pages
open (HDISPLAY, "$htmlheader");
@headsup=;

open (FDISPLAY, "$htmlfooter");
@theend=;

Next, you will need to make changes to the ustorekeeper.pl & ustorekeeper-lib.pl files.

There are 8 places that I modifed in the ustorekeeper.pl file, and they look like this:

print @headsup; # HTML Header
#print "Placing Your Order";
#print "";
#print "

";
#print "";
#print "
";

print @theend; # HTML Footer
#print "";


print @headsup; # HTML Header
#print "Reviewing Your Order";
#print "";
#print "

";
#print "";
#print "

";

print @theend; # HTML Footer
#print "";


print @headsup; # HTML Header
#print "Credit Card Order";
#print "";
#print "

";
#print "";
#print "



";

print @theend; # HTML Footer
#print "";


First occurance of this...

print @headsup; # HTML Header
#print "Thank You";
#print "";
#print "

";
#print "

";

print @theend; # HTML Footer
#print "";


print @headsup; # HTML Header
#print "Electronic Check Order";
#print "";
#print "

";
#print "";
#print "



";

print @theend; # HTML Footer
#print "";


print @headsup; # HTML Header
#print "Print Order";
#print "";
#print "

";

print @theend; # HTML Footer
#print "";


Third occurance of this...

print @headsup; # HTML Header
#print "Thank You";
#print "";
#print "

";
#print "

";

print @theend; # HTML Footer
#print "";


And Fifth occurance of this...

print @headsup; # HTML Header
#print "Thank You";
#print "";
#print "

";
#print "

";

print @theend; # HTML Footer
#print "";


Then there are three places in the ustorekeeper-lib.pl file that need to be changed.
Search for each one of these:

- sub return_error
- sub missing_input
- sub display_message

In each one of these sub processes, change the following:

print @headsup; # HTML Header
#print "...<BR>#print "<BODY><CENTER>";<P>print @theend; # HTML Footer<BR>#print "</BODY></HTML>"; <P><BR>And that should do it.<P>If something like this was used in the scrit originally, it would make things a bit easier to modify and probable save a few lines of code. (just a thought)<P> -Brad Edwards </blockquote> <hr> <b><font size=3>"Headers & Footers"</font></b><br> Posted by Bradley Edwards [bedwards@virtual-direct.com] on at 08:40 AM<br> <blockquote> Well, that last message didn't post so well, it looked fine in the preview, but anyway, if you're interested in this info I will post it on my site so you can read it from there.<P><a href="http://virtual-direct.com/HeaderFooter_Mod.txt">http://virtual-direct.com/HeaderFooter_Mod.txt</a><P> Good Luck,<P> -Brad </blockquote> <hr> </font></body></html>