@badarac, et al.
In includes/classes/observers/class.product_with_attributes_stock.php
Find the function:
Replace with the following:
Code:
/*
* Function that is activated when NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_END is encountered as a notifier.
*/
// Line 776
function updateNotifyOrderProcessingStockDecrementEnd(&$callingClass, $notifier, $paramsArray) {
if (zen_product_is_sba($this->_productI['id'])) { // Only take SBA action on SBA tracked product mc12345678 12-18-2015
//Need to modify the email that is going out regarding low-stock.
//paramsArray is $i at time of development.
if ($callingClass->email_low_stock == '' && $callingClass->doStockDecrement && $this->_stock_values->RecordCount() > 0 && $this->_attribute_stock_left <= STOCK_REORDER_LEVEL) {
// kuroi: trigger and details for attribute low stock email
$callingClass->email_low_stock .= 'ID# ' . zen_get_prid($this->_productI['id']) . ', model# ' . $this->_productI['model'] . ', customid ' . $this->_productI['customid'] . ', name ' . $this->_productI['name'] . ', ';
foreach($this->_productI['attributes'] as $attributes){
$callingClass->email_low_stock .= $attributes['option'] . ': ' . $attributes['value'] . ', ';
}
$callingClass->email_low_stock .= 'Stock: ' . $this->_attribute_stock_left . "\n\n";
// kuroi: End Stock by Attribute additions
}
}
}
Bookmarks