insert order number into wp ecommerce order confirmation email

In the wp-e-commerce admin, Settings -> Store -> Admin, you can customise the Customer Purchase Receipt (confirmation email) template to add this, e.g.

Please quote %purchase_id% as reference when paying by EFT.

There are a couple of hooks in wp-e-commerce that let you insert other data into the confirmation emails:

  • wpsc_transaction_result_cart_item — this is called for each item in the cart array
  • wpsc_transaction_result_message — this is called to filter the text of the email
  • wpsc_transaction_result_message_html — this is called to filter the on-page confirmation

You can get more information about the whole deal on a blog post I wrote a while ago (NB: pre-3.8.9 which changed things slightly!)