Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help needed with custom email


alexsc

Recommended Posts

Hi everyone,

I'm adding a part in the admin so that when I click a button an email is automatically sent to myself with specific information.

 

However I can't get the email to show all products from an order but only the last product.

 

I have tried searching and found that I needed to add a while statement but this doesn't work either.

 

This is part of what I have at the moment:

 

$orders_products_query = tep_db_query("SELECT orders_id, products_name  FROM " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $oID . "'");

while ($orders_products = tep_db_fetch_array($orders_products_query))
{
extract($orders_products);
$products = $orders_products['$products_name'];
}

$email =  $products;

 

Can anyone see why only one product is displayed?

 

Any help would be greatly appreciated.

Alex

"If we don't succeed, we run the risk of failure."

...George W. Bush

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...