$is_tracked

c0psrul3's picture
Offline
Joined: 10/07/2007
Juice: 95
$is_tracked

change in uc_stocklevels.module

~ line 139

$form['table']['body'][$key]['is_tracked'] = array(
'#type' => 'checkbox',
'#default_value' => $stock_level->is_tracked, <=== THIS ONE!
'#prefix' => '<td>',
'#suffix' => '</td>'
);

and

~ line 180

function uc_stocklevels_product_node_form_submit($form_id, $values)
{
if(isset($values['quantity'])) // If there at attributes then this will not be set
{
// Convert the 'is_tracking' option to a boolean (1 or 0)
$is_tracked = ($values['tracking_options']['is_tracked']) 1: 0;  <== THIS ONE TOO!

$detail = _uc_stocklevels_get_details($values['model']);

should fix the default "1" value for column "is_tracked" in table "uc_stocklevels"

Inventory API & Simple Stock Levels By: CpILL (139 replies) Fri, 08/10/2007 - 08:33