Table formating

Get help with nopcart formatting or style related issues.

Moderators: Koibito, Stefko, Randy

Table formating

Postby purebalance » Thu Nov 25, 2004 9:58 pm

Hi,

Have the nopcart up and running. Only problem is the formatting of the cart table on my checkout page. Nice colours, all boxed but I want the columns bigger... Is there any way of increasing them? Or creating some spacing? Help much appreciated.

Cheers!
purebalance
 
Posts: 3
Joined: Thu Nov 25, 2004 9:52 pm

Postby Randy » Thu Nov 25, 2004 10:30 pm

You may want to search the forum for more formatting of the table.

The table is built in 3 stages: the header; middle; and footer.

Look about line 562 in managecart function and line 740 in the checkout function for the table definition and headers.

The middle of the table is built line by line in a read cookie loop, then finally the footer is built starting with the subtotal and ending with the Tax by Region radio buttons in the case of managecart, and Total in checkoutCart function.

I added the width command to my table...about 55 px to start with everything except descreption, which I left about 350 px wide.

Have fun with it.
Randy
Randy
Guru
 
Posts: 1511
Joined: Tue Apr 22, 2003 12:21 pm
Location: Thunder Bay, Ontario

Thanks but...

Postby purebalance » Fri Nov 26, 2004 2:42 pm

Thanks for that, can find the code but to be honest, pretty new to js. If you can give me a start on what I need to be add, it would be fantastic.

Cheers anyway!

Andy
purebalance
 
Posts: 3
Joined: Thu Nov 25, 2004 9:52 pm

Postby Randy » Fri Nov 26, 2004 4:08 pm

Look at the cart header in managecart function about line 561, and play with the formatt.
Here is what I am using:
Code: Select all
// ------------------- Manage Cart Table Header ------------------------------||
   if ( bDisplay )
                   strOutput =    "<TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=100% BORDER=0 CLASS=\"nopcart\"><TR>" +         
"<TD WIDTH=55 CLASS=\"nopheader\"><strong>"+strILabel+"</strong></TD>" +         
"<TD ALIGN=\"CENTER\" CLASS=\"nopheader\"><strong>"+strDLabel+"</strong></TD>" +         
"<TD WIDTH=30 ALIGN=\"center\" CLASS=\"nopheader\"><strong>"+strQLabel+"</strong></TD>" +         
"<TD WIDTH=55 ALIGN=\"center\" CLASS=\"nopheader\"><strong>"+strPLabel+"</strong></TD>";
if ( DisplayShippingColumn ) { strOutput +=
"<TD WIDTH=60 ALIGN=\"center\" CLASS=\"nopheader\"><strong>"+strSLabel+"</strong></TD>";
}
strOutput += "<TD  WIDTH=80 ALIGN=\"center\" CLASS=\"nopheader\"><strong>"+strRLabel+"</strong></TD></TR>";


You can play with the widths etc.

Have Fun! :)
Randy
Randy
Guru
 
Posts: 1511
Joined: Tue Apr 22, 2003 12:21 pm
Location: Thunder Bay, Ontario

Thanks

Postby purebalance » Fri Nov 26, 2004 4:14 pm

Now that makes some sense!

Many thanks! Cheers! :)
purebalance
 
Posts: 3
Joined: Thu Nov 25, 2004 9:52 pm


Return to Help: Formatting and Style

Who is online

Users browsing this forum: No registered users and 0 guests

cron