Hi chofi,
Sorry for taking so long to get back to you. Try this code.
//save the osclass items so we can return them once we are done with our search data.
$osclassItems = View::newInstance()->_get('items');
$search1 = new search();
// you can use this line to sort the results down by category.
$search1->addCategory(1); // this accepts category id numbers
// you can use the following line to add a condition to the search results. This is an example from the carousel plugin.
$search1->addConditions(sprintf("%st_item_resource.fk_i_item_id = %st_item.pk_i_id", DB_TABLE_PREFIX, DB_TABLE_PREFIX));
//you can use this to set a limit on the number of items to load
$search1->limit (0, 10);
//the following line does the search
$aItems = $search1->doSearch();
//this line returns the number of records it found by doing the search
$iTotalItems = $search1->count();
//the following line exports the search results so you can view the results of the search
View::newInstance()->_exportVariableToView('items', $aItems);
Then you can go about calling the items as you would normally.
<?php while ( osc_has_items() ) { ?>
<a href="<?php echo osc_item_url() ; ?>"><?php echo osc_item_title() ; ?></a>
<?php } ?>
// call the following line to return the view back to the default items not our search results.
View::newInstance()->_exportVariableToView('items', $osclassItems);
Now you can use the helpers found in oc-includes/osclass/helpers/hItems.php
Jay