Product SKU in SimpleCart Emails

By Perchpole - August 28, 2015

Hello, All

My client has pointed out that the sales invoice does not show the product SKU. This is a concern for him as he currently has over 1300 items in his store and needs the SKU for book-keeping purposes.

I thought it would be a simple task to include this info in the email sent out by customCart.php but then realised that the order does not record the SKU. Undeterred, I had a look at the code and decided to add my snippet to the email section:

foreach ($cartItems as $record) {
$tableBody .= "<tr><td>";
$product_sku = array_value(mysql_get('products', $record['num']) , 'product_id_sku');
$tableBody .= $record_sku;
$tableBody .= "</td>";
...

I added the line in red.For some reason however, it does not work. I can't quite see where I'm going wrong...

:0(

Perch

By Perchpole - September 4, 2015

Hi, Damon -

It's ok. I worked it out myself:

$product_sku = array_value(mysql_get('products', $record['recordNum']) , 'product_id_sku');

Perch