Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

make the long comment message fit the page while viewing and printing


iecwillow

Recommended Posts

I installed orderlist contribution, everything works fine before I tried to add the comment text in the orderlist. I got the comment text shows, however, it won't fit the page. Please help...

 

Here is the code I added to make the comment text shows:

 

After

 

<?php

$query1 = "SELECT * FROM `orders` WHERE orders_status = $order_status ORDER BY orders_id DESC";
$result = tep_db_query($query1);

while ($row = tep_db_fetch_array($result))	{
	$ordernummer = $row['orders_id'];

 

I added:

 

// Comments query
$statuses_query = mysql_query("select comments from orders_status_history WHERE orders_id = $ordernummer and orders_status_id = '2'");
while ($statuses = mysql_fetch_array($statuses_query)) {

 

and then I created a new row for the comment text,

 

after

 

<?php
  for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
?>
		   <?php echo '<br>' . $order->totals[$i]['title'] . ' ' . $order->totals[$i]['text']; ?>
<?php
}
?>
 </TD>
</TR>

 

I added:

 

<tr><td colspan="4">
<?php echo '<b>Comments:</b> ' . $statuses{'comments'} . "\n"; ?>
<?php
}
?>

 

Is there any way I can force the comment area fit the normal margin of the page?

 

Thank you in advance.

Link to comment
Share on other sites

Thank you. Now the page can be view at:

 

http://b2cshops.com/sample/admin/orderlist.php

 

I guess it might be some setting with the css file, however, I tried many ways without success. Here is the css file:

 

/* stylesheet for orderlist */
body, html {
margin: 0;
padding: 1em 0;
text-align: center;
font-family: arial, sans-serif;
font-size: 88%;
}
table {
margin: 1em auto;
border: 1px solid #e00;
width: 95%;
font-size: 1em;
}
td {
padding: 0.2em 0.3em;
font-size: 1em;
}
td {
border: 1px solid #aaa;
white-space: nowrap;
color: black;
background: #f6f6f6;
}
tr.headers td {
color: black;
background: #fe6;
white-space: nowrap;
border: 1px #aaa solid;
font-weight: bold;
text-align: center;
}
tr.headers td.orderStatus{
background: #eee;
text-align: right;
}
h1 {
color: #09c;
font-size: 1.5em;
background: #eee;
border: solid #e00 1px;
border-width: 2px  0;
width: 24em;
margin: 0 auto;
}
td.orderNr, td.price, td.qty {
text-align: center;
}
span.orderStat {
color: #d00;
}
span.date {
float: left;
}
/* column width's (should add up to 100%) */
td.orderNr {
width: 5%;
}
td.price {
width: 8%;
}
td.model {
width: 15%;
}
td.name {
width: 30%;
}
td.qty {
width: 8%;
}
td.chk {
width: 5%
}
td.notes {
width: 20%
}
@media print {
 body, html, table {
 font-size: 7pt;
 }
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...