Forums › Forums › Search & Filter Pro › Multiple Search Forms – Woo
Tagged: attribute, multiple categories, Taxonomies, woocommerce
- This topic has 5 replies, 2 voices, and was last updated 6 years, 7 months ago by Anonymous.
-
Anonymous(Private) March 28, 2018 at 3:40 pm #168787
Have a site with multiple product categories – Accessories, Jewellery, Footwear & Watches.
We need to have the search form show sub-category, taxonomy & attribute choices.
I thought I could do this by setting up a different form for each of the four parent categories.
But got the following: ‘Error: There are 2 Search Forms using display mode WooCommerce Shop – you may only have 1’
If we can’t set up a separate form for each category, with selected taxonomies in each.
Then, how can I set the form up to only show choices that are available within the category that is showing on archive-product.phpAnonymous(Private) March 28, 2018 at 3:45 pm #168789The plan was to be able to ‘call’ different search forms for each parent category.
<div id="product-search" class="cell"> <?php if ( is_product_category() ) { if ( is_product_category( 'accessories' ) ) { echo 'Check our range of accessories'; echo do_shortcode( '53441' ); } elseif ( is_product_category( 'footwear' ) ) { echo 'Check our range of footwear'; echo do_shortcode( '[searchandfilter id="53442"]' ); } elseif ( is_product_category( 'jewellery' ) ) { echo 'Check our range of jewellery'; echo do_shortcode( '[searchandfilter id="53443"]' ); } elseif ( is_product_category( 'watches' ) ) { echo 'Check our range of watches'; echo do_shortcode( '[searchandfilter id="53444"]' ); } else { echo 'Hi! Check our our products below.'; } } ?> </div>
Trevor(Private) March 28, 2018 at 4:16 pm #168799Would the category be obvious in the page URL? If there is a product-category taxonomy field in the form, and the
Choose which kinds of pages S&F will try to do this on
option is checked forTag, Category & Taxonomy Archives
then it would auto complete that field. IfAuto Count
(both settings) are set toON
and in each fieldHide Empty
is set toON
then only options relevant to the category would show.Anonymous(Private) March 28, 2018 at 4:38 pm #168813Hi Trevor,
The product category URLs are displaying like the following:
/product-category/footwear/shoes/flat/
So that should work OK.
Detect defaults from current page is set to ‘Tag, Category & Taxonomy Archives ‘
And ‘Enable Auto count’ is enabled, as is ‘Update the Search Form on user interaction’Now what I am getting is the ‘No products were found matching your selection.’ on all product category pages.
Took the Search form UI back to simple search & submit – no results on all categories. -
AuthorPosts