Stuff & Things

Add SKU to WP e-Commerce 3.8.6 Admin Reports

WP eCommerce offers a feature where an email is dispatched to the administrator when an order is completed.  WP eCommerce calls this email an “Admin Report”.

These emails are useful for order fulfilment, but they are lacking a key piece of data that you may need to fulfill an order: the product’s SKU.

Fortunately, there’s a way to include the each product’s SKU in the Admin Report.  To accomplish this, you need to edit file within the plugin folder: wp‑e‑commercewpsc‑themefunctionswpsc‑transaction_results_functions.php

In this file find the following code around line 235 (in version 3.8.6):

$report_product_list.= " - " . $row['quantity'] . " " . $row['name'] . "  " . $message_price . "nr";

And paste the following line in it’s place:

$report_product_list.= " - " . $row['quantity'] . " " . wpsc_product_sku($row['prodid']) . " " . $row['name'] . "  " . $message_price . "nr";

With this change, the SKU will be added to your Admin Report after each item’s quantity.

Please remember: you may need to edit this code with each WP eCommerce update, so please bookmark this page.