Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Getting Customers Order Details


mme

Recommended Posts

Hi

 

I am trying to display the product name with the quantity on an email that is sent to the shop packing person. However it doesn't display the product name or quantity at all , this is my code so far below:

 

$tmp_or_q = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$oID . "'");

$tmp_or= tep_db_fetch_array($tmp_or_q);


for ($i=0, $n=sizeof($tmp_or); $i<$n; $i++) {

		$email_ship .='<tr bgcolor="#CCCCCC">

	<td><div align="center" class="style1">' . $tmp_or[$i]['products_name'] . '</div></td>

	<td><div align="center" class="style1">' . $tmp_or[$i]['products_quantity'].'</div></td>

	</tr>';

	}

 

Thanks

Link to comment
Share on other sites

you are wrong at this ------>>>>>> $tmp_or[$i]['products_name'].

use this $tmp_or['products_name'].

this will solve your problem.

 

 

 

Hi

 

I am trying to display the product name with the quantity on an email that is sent to the shop packing person. However it doesn't display the product name or quantity at all , this is my code so far below:

 

$tmp_or_q = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$oID . "'");

$tmp_or= tep_db_fetch_array($tmp_or_q);


for ($i=0, $n=sizeof($tmp_or); $i<$n; $i++) {

		$email_ship .='<tr bgcolor="#CCCCCC">

	<td><div align="center" class="style1">' . $tmp_or[$i]['products_name'] . '</div></td>

	<td><div align="center" class="style1">' . $tmp_or[$i]['products_quantity'].'</div></td>

	</tr>';

	}

 

Thanks

Link to comment
Share on other sites

However it seems to duplicate them I did a test order ordered one product with a quantity of two. This only happens in the email. Not on any other page

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...