Osclass forums
Support forums => Tips, tricks, and tutorials => Topic started by: davidos68000 on March 08, 2015, 10:43:35 pm
-
Code Drop down categorie
<div class="row">
<?php osc_categories_select('sCategory', $category, __('Select a category', 'spain')) ; ?>
</div>
So How we can call this function when the selection is change
this code call the attribu when we click Search (Submit bouton)
i need to call this function when the selection change
<?php
if(osc_search_category_id()) {
osc_run_hook('search_form', osc_search_category_id()) ;
} else {
osc_run_hook('search_form') ;
}
?> </div>
Why we have to do this ??????
when i select category the attribut don't change only when i click applay (SubmiT bouton)
Exemple i isearch fo a car and i have the attribut to choose make, model,....
if i change the select to exemple dating, i still have the attribut for car, i have allaways to click applay for the attribut change
in the item-post.php it's good we just select and the attribut change
I want the same function for the search.php
-
Sorry, I am having a hard time understanding what you are looking to do. Are you have an issue with the category or the search?
-
HELLO MY WEB SITE (test) http://plicos.com/ile-de-france-r781355 (http://plicos.com/ile-de-france-r781355)
Please help i have about 30 days i looking for this
I have a select dropdown for category in Osclass (search.php)
when i select category the attribut don't change only when i click applay (Submit bouton)
Exemple i search for a car and i have the attribut to choose make, model,....
if i change the select to exemple dating, i still have the attribut for car, i have allaways to clic applay for the attribut change
it's not normal we imagine somebody look for a wommen and we ask him to choose model, mak...
in the item-post.php it's good we just select and the attribut change
I want the same function for the search.php WHEN WE CHAGE THE SELECTION THE ATTRIBU CHAGE AUMATIC
So its simple go to my web site http://plicos.com/ile-de-france-r781355 (http://plicos.com/ile-de-france-r781355)
choose a category you cant get the attribut if you don'click aplay (Submit bouton)
-
i just want the same function like (item-post.php) http://plicos.com/item/new (http://plicos.com/item/new)
we change the category automatc we have (plugin-hook)
i need this for (search.php) http://plicos.com/ile-de-france-r781355 (http://plicos.com/ile-de-france-r781355)
-
Hi,
Default Osclass function if you go to search page with clicking category. custom fields of that categories will show.
ex if you go this link http://plicos.com/search/sOrder,dt_pub_date/iOrderType,desc/category,97 (http://plicos.com/search/sOrder,dt_pub_date/iOrderType,desc/category,97)
it will show. but if you are clicking location without category it will not be shown.
You cant make same as item-post.php. but you can with jquery on change function.
-
hi thanks for replay
can you send me the function for jquery and where i can put it
thank you
-
my code
can some body tell me how we make the function
to get plugin-hooks when the selection change (with out click)
<?php osc_categories_select('sCategory', $category, __('Select a category', 'spain')) ; ?>
</div>
<script>
$category = __get("category");
if(!isset($category['pk_i_id']) ) {
$category['pk_i_id'] = null;
}
});
</script>
<div class="plugin-hooks">
<?php
if(osc_search_category_id()) {
osc_run_hook('search_form', osc_search_category_id()) ;
} else {
osc_run_hook('search_form') ;
}
?>
something lik this but i don' now how to make it
$('------').change(function() {
help please :'( :'( :'( :'( :'( :'( :'(
-
osc_run_hook('search_form', osc_search_category_id()) ;
this code not working any way if you are not in current category.
but try this
<script>
$("select[name='sCategory']").change(function(){
if($(this).val() == "Vechiles"){
show Car attirbutes
//you must get car_form show here don't use hook function
}
});
-
thank you for replay
but don't work
-
when i use
<?php
if(osc_search_category_id()) {
osc_run_hook('search_form', osc_search_category_id()) ;
} else {
osc_run_hook('search_form') ;
}
?>
if i click submit i have the attribu for the category selected, wat i'm looking for is (autosubmit) for this selcteor of category,
but i don'ont know how to do it for this
wich you can help me i'm getting crazy, 32days now i'm looking for this
-
THANKS FOR YOUR HELP
I FOUND IT BY MY SELF
-
thank you (fre2mansur)
i found it
-
Can you you show me how you solved and make this thered to solved :)
-
so after 32 day th'as the Solution
in your search.php
Categorie selector
<div class="row">
<h6><?php _e('Category'); ?></h6>
<?php osc_categories_select('sCategory', $category, __('Select a category', 'spain')) ; ?>
</div>
REMEMBER Categorie
<script>
$category = __get("category");
if(!isset($category['pk_i_id']) ) {
$category['pk_i_id'] = null;
}
});
</script>
Run The Hook
<div class="plugin-hooks">
<?php
if(osc_search_category_id()) {
osc_run_hook('search_form', osc_search_category_id()) ;
} else {
osc_run_hook('search_form') ;
}
?>
And now you Go to your Theme/js/jquery.uniform.js
YOU ADD This in the END OF jquery.uniform.js
$(function() {
$('#sCategory').change(function() {
this.form.submit();
});
});
sO THAT's all