$sellers = explode(',', osp_param('seller_users'));
$html = '';
if($item_id == -1) {
$item_id = osc_item_id();
}
if(osp_param('selling_allow') == 1 && $item_id <> '' && $item_id > 0) {
$item = Item::newInstance()->findByPrimaryKey($item_id);
$data = ModelOSP::newInstance()->getItemData($item_id);
$qty = @$data['i_quantity'] > 0 ? @$data['i_quantity'] : 0;
$title = '';
if(@$data['i_sell'] == 1 && (in_array($item['fk_i_user_id'], $sellers) || osp_param('seller_all') == 1)) {
if($item['i_price'] <> '' && $item['i_price'] > 0) {
//$html .= '<div class="osp-product ' . ($is_hook == 1 ? 'osp-is-hook' : '') . '">';
if(($qty <= 0 && osp_param('stock_management') == 1) || ($item['fk_i_user_id'] == osc_logged_user_id() && osc_is_web_user_logged_in())) {
} else {
// yes yes yes, for sale
}
}
}
}
}