Support Forums - Classified Ads Script Osclass
Osclass theme support => Beta Osclass Theme => Topic started by: Jesus on October 09, 2019, 04:12:48 PM
-
make the search can also search the name of the users, and that the results give the user items
example: to be able to search for "Pedro" and to show the ads that "Pedro" has
I know it's possible
In the osclass forum I had found something about this, but it doesn't exist anymore and I don't know what to do!
-
@Jesus
You are right, it is possible using code similar to this one:
function filter_extend() {
Search::newInstance()->addConditions(sprintf("%st_item_veronika.i_transaction = %d", DB_TABLE_PREFIX, Params::getParam('sTransaction')));
}
osc_add_hook('search_conditions', 'filter_extend');
-
@Jesus
You are right, it is possible using code similar to this one:
function filter_extend() {
Search::newInstance()->addConditions(sprintf("%st_item_veronika.i_transaction = %d", DB_TABLE_PREFIX, Params::getParam('sTransaction')));
}
osc_add_hook('search_conditions', 'filter_extend');
where?, in functions.php of theme?
-
yes
-
@Jesus
You are right, it is possible using code similar to this one:
function filter_extend() {
Search::newInstance()->addConditions(sprintf("%st_item_veronika.i_transaction = %d", DB_TABLE_PREFIX, Params::getParam('sTransaction')));
}
osc_add_hook('search_conditions', 'filter_extend');
item_beta no item_veronika :-)
-
It was just example with 1 table.
-
It was just example with 1 table.
function filter_extend() {
Search::newInstance()->addConditions(sprintf("%st_item_beta.i_item_contact_name = %d", DB_TABLE_PREFIX, Params::getParam('sitem_contact_name')));
}
osc_add_hook('search_conditions', 'filter_extend');
It may be so?