<TABLE> or Not?

Problems installing or using the NOP Design Free Shopping Cart. **ARCHIVE** Please post new topics to one of the groups below.

Moderator: scott

<TABLE> or Not?

Postby bobsitko » Mon Aug 26, 2002 8:35 am

Hello,

Here's another basic question showing how little I know about scripts, but how come the standard checkout.pl module that I downloaded writes messages without HTML <table> commands, yet they show up on the browser as tables? Other versions, including one that Scott posted, change all the write statements by adding <table><tr> and <td> items. Are these required? If not, how do they display as tables?

Bob
bobsitko
 
Posts: 22
Joined: Wed Aug 14, 2002 2:44 pm
Location: South Carolina

Postby Cynthia » Mon Aug 26, 2002 7:06 pm

If you're referring to the layout of the items in your shopping cart, this is controlled by the following and nopcart.js, which should appear on every page in which you use the cart.

<STYLE>

.nopcart
.nopheader
.nopentry
.noptotal

</STYLE>

If you open nopcart.js in a text editor, you will see the HTML tags to which you refer.
Cynthia
 
Posts: 44
Joined: Wed Aug 21, 2002 3:03 am
Location: Atlanta

WriteToForm

Postby bobsitko » Tue Aug 27, 2002 1:59 am

No, what I'm referring to is the extremely different formats of the "WriteToForm" subroutines; the standard nopcart.js module that I downloaded uses a format similar to this:

if (bDisplay)
strOutput = "" + " " + strIlabel+" " + " " + strDlabel+" " + " " + strQlabel+" " + " " + strPlabel + " " + (DisplayShippingColumn?" "+strSlabel+" ":"") + " " +strRlabel+" ";

whereas, other versions of nopcart, including one that Scott posted to this forum, use embedded HTML controls, similar to this:

if (bDisplay)
strOutput = "<table class=\"nopcart\"><TR> + "<TD class=\"nopheader\"><B>+strIlabel+"</B></TD>"+"<TD class= ...

The fieldnames are the same, but one format uses NO embedded HTML statements, while the other uses embedded HTML statements such as <table>,<tr>,<td>,<b> etc. My basic question is, which format is correct, or does it not matter which one to use?

Regards,
Bob
bobsitko
 
Posts: 22
Joined: Wed Aug 14, 2002 2:44 pm
Location: South Carolina

Either..

Postby scott » Tue Aug 27, 2002 9:36 pm

You could use either -- but the official versions are the ones with tables embedded in them. Really old versions (5 years ago) didn't have tables, but all sinve like version 3 have. Some people have modified the script, for email writes to remove tables -- perhaps that is one that you have. Just use one posted here, or D/L from http://www.nopdesign.com/freecart

-Scott
scott
Site Admin
 
Posts: 558
Joined: Sun Jul 14, 2002 7:00 pm
Location: Phoenix, AZ


Return to Installation and Setup Problems

Who is online

Users browsing this forum: No registered users and 0 guests

cron