Forums Forums Search & Filter Pro Woocommerce integration

Viewing 10 posts - 1 through 10 (of 18 total)
  • Anonymous
    #9336

    Dear support,

    I have a working WooCommerce setup filled with products. It took me a while to get all the styling done. However Woocommerce is limited in search capabilities so that’s the reason why I bought search and filter Pro.

    As far as I understood i should deselect Ajax and use a page template. Mine is (relative to the theme directory) /woocommerce/archive-product.php. I think it cannot find it because it sticks to the default results.php which is located in {themedir}/search-filter/results.php.

    What am I doing wrong?

    Ross Moderator
    #9353

    Hey Janno – please update to the latest version – the way you are modifying teh template is for when using a shortcode, but it doesn’t seem like this is what you are doing…

    The latest version has some UI fixes which should make things clearer – if you’re still having problems let me know.

    Thanks

    Anonymous
    #9408

    Hi Ross, I do use the shortcodes. But I’ll try the update first and let you know if I’m still having trouble getting the Woocommerce template to work.

    Best regards, Janno

    Anonymous
    #9441

    Hi Ross, just to keep you updated: Tomorrow I’ll test the new plugin on my product search page. I saw new options that could do the job.

    Have a nice day, Janno

    Anonymous
    #9895

    Hi Ross,

    back from holidays I updated the plugin and tested the integration. Maybe I’m doing something wrong, please help me with the correct way to use your plugin.

    I created a new page, inserted the [searchandfilter id=”2726″]. In Settings I selected ‘As an archive page’, ‘Use a custom template for results’ and entered the filename: /woocommerce/archive-product.php

    Under Ajax: I checked Load results using Ajax.

    Search is working. However, my lay-out is not consistent with the Woocommerce output of the search results.

    What must I do to get them the same?

    Best regards, Janno

    Anonymous
    #9896

    Extra info:

    If you go to http://vanka.magicservices.nl/?s=ketjap%20gekruid&post_type=product Woocommerce will show you 3 products in a correct lay-out.

    If you search voor ‘Ketjap Gekruid’ on page http://vanka.magicservices.nl/producten2/ your plugin is using woocommerce/archive-product.php but the layout is different: the products are not listed next to each other. The URL is then: http://vanka.magicservices.nl/producten/?s=Ketjap%20gekruid

    Please help, I’m running out of time on a strict deadline for next friday afternoon.

    Best regards, Janno

    Ross Moderator
    #9924

    Hey Janno

    Can you give me a run down of your settings?

    I had another user report that he needed is_search to be set to true in order to display products properly using product-archive.php in his theme – I added an option, goto the advanced tab in the settings & defaults box…

    Tick “force is_search to always be true” – let me know if that helps?

    If not the next question is, is it actually using product archive? Have you tried customising the results or putting some text in the template to see if it is actually being loaded by this plugin for your results?

    Thanks

    Anonymous
    #9929

    Hi Ross,

    I checked force is_search always be true (it was not set before). But no difference. I added a H2 tag to archive-product.php and it is shown in the results. So it’s definitely loading the template.

    Do you need login credentials to WordPress and FTP?

    Best regards, Janno

    Ross Moderator
    #9931

    Hey Janno

    I would say this is a theme specific issue and not a plugin issue. I generally do not provide support for customising your theme template files – as these are more to do with your theme than the plugin – for example you can use this template anywhere in your theme (that is not the product archive) and I’m sure you would find similar results/problems.

    However, that being said, the first thing to do with this kind of problem is check what the differences are between these two pages.

    So I had a quick look at the source of the both the pages – although very similar there is one big difference.

    If you take a look at the opening body tag you will notice the woocommerce page formatted in a grid has the class woocommerce-page and the results page does not.

    I added it via the dom inspector to http://vanka.magicservices.nl/producten and the grid works ๐Ÿ™‚

    So there are two approaches to fixing this – the first – edit your css rules so the grid classes are also applied to the Search & Filter results page…

    or

    Add this class to the body tag on your results page ๐Ÿ™‚ This option is easier and only requires copying and pasting some code into functions.php:

    add_filter('body_class','add_body_class_to_search_filter');
    function add_body_class_to_search_filter($classes) {
    	
    	global $sf_form_data;
    	
    	if ($sf_form_data->is_valid_form())
    	{		
    		$classes[] = "woocommerce-page";
    	}
    	// return the $classes array
    	return $classes;
    }

    Hope that helps!

    Anonymous
    #9935

    Hi Ross,

    my lay-out is okay now, thanx for the help. I put the shortcode on the /Product page but upon ajax-reload the shortcode is not displaying my search form. Anyway to solve that?

    I’m almost done now ๐Ÿ™‚

    Best regards, Janno

Viewing 10 posts - 1 through 10 (of 18 total)