one of the documented procedures in this installation of the ACS
ec_email_product_notification   db   order_id
What it does:
This proc sends notifications for any products in the order that require it.
Defined in: /web/philip/tcl/ecommerce-email.tcl

Source code:

  if { [ad_ssl_available_p] } {
    set order_link "[ec_secure_url]/admin/ecommerce/orders/one.tcl?[export_url_vars order_id]"
  } else {
    set order_link "[ec_insecure_url]/admin/ecommerce/orders/one.tcl?[export_url_vars order_id]"

  set selection [ns_db select $db "
  select ep.email_on_purchase_list, ep.product_name
  from ec_items ei, ec_products ep
  where ei.product_id = ep.product_id
  and ei.order_id = $order_id
  group by ep.email_on_purchase_list, ep.product_name

  while {[ns_db getrow $db $selection]} {
    ec_sendmail_from_service $email_on_purchase_list [ad_system_owner] "An order for $product_name" "
A order for $product_name has been placed at [ad_system_name].

The order can be viewed at: