@Vlad7
Update bo_mgr_form_post function in index.php with following:
function bo_mgr_form_post($item) {
$status_email = osc_get_preference('bo_mgr_status_email', 'plugin-bo_mgr') <> '' ? osc_get_preference('bo_mgr_status_email', 'plugin-bo_mgr') : 1;
$detail = ModelBO::newInstance()->getItem( $item['pk_i_id'] );
$status = array();
if(Params::getParam('bo_mgr_status') <> '') {
//$status = ModelLS::newInstance()->getStatus( $status_id );
$status = ModelLS::newInstance()->getStatus(Params::getParam('bo_mgr_status'));
}
if(isset($detail['pk_i_id']) && $detail['pk_i_id'] > 0) {
ModelBO::newInstance()->updateItem( $item['pk_i_id'], $detail['republish_times'], $detail['form_used'], Params::getParam('bo_mgr_passwrd'), Params::getParam('bo_mgr_mobile'), Params::getParam('bo_mgr_status'), Params::getParam('bo_mgr_autorepublish') );
//if status is "Sold" status, set item to expired
if(isset($status['status_sold']) && $status['status_sold'] == 1) {
$today = date('Y-m-d', strtotime(' -1 day', time()));
ModelLS::newInstance()->itemToExpired($item['pk_i_id'], $today);
}
} else {
ModelBO::newInstance()->addItem( $item['pk_i_id'], 0, 0, Params::getParam('bo_mgr_passwrd'), Params::getParam('bo_mgr_mobile'), Params::getParam('bo_mgr_status'), Params::getParam('bo_mgr_autorepublish') );
if($status_email == 1) {
email_status($item['pk_i_id']);
}
}
}