Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Loads of white space in vendors email?


UncleSteve

Recommended Posts

Posted

I've been revamping the email that gets sent out to the vendors (used with the MVS contrib) I've mangaged to move all the fields in to a table (design and colours of which I'm still working on), but I've now encountered a problem where I have about 50 blank lines above my table.

 

Can someone have a look at my code and tell me what I can do to remove the white space please?

 

Thanks in advance for any help :)

 

 

catalog/checkout_process.php (code starts at about line 335)

 

	// let's build the email
  // Get the delivery address
 $delivery_address_query = tep_db_query("select distinct delivery_company, delivery_name, 
delivery_street_address, delivery_suburb, delivery_city, delivery_state, delivery_postcode, customers_telephone, customers_email_address from " . TABLE_ORDERS . " where orders_id='" . $oID ."'");

 $vendor_delivery_address_list = tep_db_fetch_array($delivery_address_query);

if ($debug == 'yes') {
echo 'The number of vendors: ' . sizeof($vendor_products) . '<br>';
 }
$email='';
for ($l=0, $m=sizeof($vendor_products); $l<$m; $l++) {
'' .
$vendor_country = tep_get_country_name($vendor_products[$l]['Vcountry']);
$order_number= $oID;
$vendors_id=$vendor_products[$l]['Vid'];
$the_email=$vendor_products[$l]['Vemail'];
$the_name=$vendor_products[$l]['Vname'];
$the_contact=$vendor_products[$l]['Vcontact'];
$email=  
  '' . ' <table width="85%" border=1 cellspacing="0" cellpadding="3">

<tr>
<td width="100%" bgcolor="#CCFFFF" colspan="6" height="10">
<B>To:</B></td>
 </tr>

</tr>
<td width="16%" bgcolor="#C0C0C0"> </td>
<td width="84%" colspan="5">'.$the_contact . '  <br>' . $the_name . '<br>' .
$vendor_products[$l]['Vstreet'] .'<br>' .
$vendor_products[$l]['Vcity'] .'<br>' .
$vendor_products[$l]['Vstate'] .'<br>' .
$vendor_products[$l]['Vzipcode'] . '</td>
 </tr>

<tr>
<td width="100%" bgcolor="#CCFFFF" colspan="6" height="10">
<B>Purchase Order From:</B></td>
 </tr>

</tr>
<td width="16%" bgcolor="#C0C0C0"> </td>
<td width="84%" colspan="5">'.STORE_OWNER . '<br>' .
 STORE_NAME_ADDRESS . '</td>
 </tr>

<tr>
<td width="100%" bgcolor="#CCFFFF" colspan="6" height="10">
<B>Please Deliver To Our Customer:</B></td>

 <tr>
<td width="16%" bgcolor="#C0C0C0">Delivery Address:</td>
<td width="84%" colspan="5">'.$vendor_delivery_address_list['delivery_company'] . 
 $vendor_delivery_address_list['delivery_name'] .'<br>' .
 $vendor_delivery_address_list['delivery_street_address'] .'<br>' .
 $vendor_delivery_address_list['delivery_suburb'] .'<br>' .
 $vendor_delivery_address_list['delivery_city'] .'<br>' .
 $vendor_delivery_address_list['delivery_state'] .'<br>' .
 $vendor_delivery_address_list['delivery_postcode'] . '</td>
 </tr>

 <tr>
<td width="16%" bgcolor="#C0C0C0"><B>Customer Phone No.:</B></td>
<td width="84%" colspan="5">' . $vendor_delivery_address_list['customers_telephone'] . '</td>
 </tr>

<tr>
<td width="16%" bgcolor="#C0C0C0"><B>Customer Email:</B></td>
<td width="84%" colspan="5">' . $vendor_delivery_address_list['customers_email_address'] . '</td>
</tr>

 <tr>
<td width="16%" bgcolor="#C0C0C0"><B>Customer Comments:</B></td>
<td width="84%" colspan="5">' . $order->info['comments'] . '</td>
</tr>

 <tr>
<td width="100%" bgcolor="#CCFFFF" colspan="6">
<p align="center"><b>Please supply the products listed below</b></td>
</tr>

 <tr>
<td bgcolor="#C0C0C0"><b>Qty:</b></td>
<td bgcolor="#C0C0C0"><b>Product Name:</b></td>
<td bgcolor="#C0C0C0"><b>Product Options:</b></td>
<td bgcolor="#C0C0C0"><b>Suppliers Product Code:</b></td>
<td bgcolor="#C0C0C0"><b>Marcle Leisure Product Ref.:</b></td>
<td bgcolor="#C0C0C0"><b>Per Unit Price:</b></td>
</tr>

</tr>';
	   for ($i=0, $n=sizeof($vendor_products[$l]['vendor_orders_products']); $i<$n; $i++) {
  $product_attribs ='';
  if (isset($vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes']) && (sizeof($vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes']) > 0)) {

	for ($j = 0, $k = sizeof($vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes']); $j < $k; $j++) {
	 $product_attribs .= '  ' . $vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes'][$j]['option'] . ': ' .  $vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes'][$j]['value'] . '<br>';
	}
	}
	$email = $email . '

<tr>

 <td>' . $vendor_products[$l]['vendor_orders_products'][$i]['Pqty'] .

 '</td>

 <td>' . $vendor_products[$l]['vendor_orders_products'][$i]['Pname'] . 
 '</td>

 <td>' . $product_attribs . 
 '</td>

 <td>' . $vendor_products[$l]['vendor_orders_products'][$i]['PVprod_id'] .
 '</td>

 <td>' . $vendor_products[$l]['vendor_orders_products'][$i]['Pmodel'] .
 '</td>

 <td>' . $vendor_products[$l]['vendor_orders_products'][$i]['PVprod_price'] . '
 </td> 
</tr>';

  }
}
$email = $email . '</table><br><HR><br>';

tep_mail($the_name, $the_email, EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID ,  $email .  '<br>', STORE_NAME, STORE_OWNER_EMAIL_ADDRESS) ;
 $vendor_order_sent = 'yes';

 tep_db_query("update " . TABLE_ORDERS_SHIPPING . " set vendor_order_sent = '" . tep_db_input($vendor_order_sent) . "' where orders_id = '" . (int)$oID . "'  and vendors_id = '" . (int)$vendors_id . "'");

 if ($debug == 'yes') {
	   echo 'The $email(including headers:<br>Vendor Email Addy' . $the_email . '<br>Vendor Name' . $the_name . '<br>Vendor Contact' . $the_contact . '<br>Body--<br>' . $email . '<br>';
	   }
 }

 return true;
} //MVS end

// lets start with the email confirmation

Slightly off topic. I have this line for one table row

<td width="100%" bgcolor="#CCFFFF" colspan="6" height="10">

I'd like to change the row height, but this height="10" has no effect. Any ideas on what I could use?

 

Thanks

 

Steve

____________________________________________________________________

____________________________________________________________________

Posted

do you have all the sections of the email there? is the email printing out empty table rows where their are no relevant entries? you could try and locate it by looking at it like that.... if you are unsure of which bit is where i find that inserting some useful text and making a test order helps locate the areas which need removed....

 

 

re. the height thing, you could look at the row which the td is contained in (previous <tr>) which you might find has a height attrribute or a css class that is effecting the row...

 

 

hope this helps

with ten thousand dollars we'll all be millionaires

Posted
do you have all the sections of the email there? is the email printing out empty table rows where their are no relevant entries? you could try and locate it by looking at it like that.... if you are unsure of which bit is where i find that inserting some useful text and making a test order helps locate the areas which need removed....

re. the height thing, you could look at the row which the td is contained in (previous <tr>) which you might find has a height attrribute or a css class that is effecting the row...

hope this helps

Hi Andrew,

 

I've been trying all sorts with my table. I did find two </tr> which wern't required. At one point I stripped out all the surplus code so that I was left with the basic html (working in Frontpage), and still found there was white space above the table when viewed in Firefox and IE! Its now probably a case of trees and wood as I've been working on it so long.

 

All the code is there, as all the data from the 'sale' is entered along with the vendors and store owners details. Its just the blank area over the top of the table I'm trying to get rid of - so no blank table cells/rows.

 

At this rate of progress, I feel like abandoning my layout. :(

____________________________________________________________________

____________________________________________________________________

Posted

I'm now really stumped!

 

To try and find out where all the 'white space' is coming from, I've put my original table inside another to create a boarder, so my initial bit of table code now looks like..

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%"><tr><td width="100%"><font face="Arial Narrow" size="1"><table style="BORDER-COLLAPSE: collapse" borderColor="#FFFFFF" cellSpacing="3" cellPadding="0" width="100%" border="1"><tr><td width="50%" colspan="3"><valign="top"><B>To:</B></td>  
<td width="50%" colspan="3"><B>Purchase Order From:</B></td>

hopefully you can see that I've removed all the spaces between each instruction ( >no spaces here< )... well for the table starts and the first row of the inner/original table. Having done this, I thought the top of the outer table (boarder) would have been close to the top of the inner table, but as can be seen on the pickie below

Image6.jpg

For a larger view, click here

The bottom of the page is okay, but I want to get rid of the area marked 'A'. I've sorted the gap on the right of the inner table.

 

Any clues please?

 

PS. I've changed the table layout code since posting it earlier, basically putting some of the information cells, side by side, instead of on seperate rows as per the original code.

____________________________________________________________________

____________________________________________________________________

Archived

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

×
×
  • Create New...