nielsjvd
Forum Replies Created
-
I currently have some javascript in place to rewrite the url to avoid the problem.
But for example:
https://kruit-en-kramer.nl/producten/
When you select the outlet category the url changes to something like:
https://kruit-en-kramer.nl/producten/?swoof=1&product_cat=outlet
Put when you go to the last link, the other categories disappear. But I would still like to be able to select another category.Forum: Plugins
In reply to: [HUSKY - Products Filter Professional for WooCommerce] Meta fields slider@realmag777 The solution is not hard at all.
I solved it by adding a cron job instead of a hook. I just added the following$width_max = ""; $width_min = "0"; $args = array( 'post_type' => 'product', 'posts_per_page' => 1, 'meta_query' => array( array( 'key' => '_width', 'value' => '', 'compare' => '!=', ) ), 'orderby' => 'meta_value_num', 'order' => 'DESC' ); $loop = new WP_Query( $args ); $new_counter = 0; if ( $loop->have_posts() ) { while ( $loop->have_posts() ) : $loop->the_post(); $id = get_the_ID(); $new_counter++; $width_max = get_post_meta($id, '_width', true); endwhile; } $options = get_option('woof_settings'); $options['_width']['range'] = $width_min.'^'.$width_max; update_option('woof_settings', $options);
The best practice here is probably to add this functionality to a hook that gets fired everytime a product is edited. But since we get around 3000 new products every morning I decided to add a cronjob that fires after the retrieval of products is finished
- This reply was modified 4 years ago by nielsjvd.
Forum: Plugins
In reply to: [HUSKY - Products Filter Professional for WooCommerce] Meta fields sliderIs this feature on the roadmap for the plugin or will it get added in the foreseeable future?
Forum: Plugins
In reply to: [HUSKY - Products Filter Professional for WooCommerce] Meta fields filterIs this feature on the roadmap for the plugin or will it get added in the foreseeable future?
Forum: Plugins
In reply to: [HUSKY - Products Filter Professional for WooCommerce] Meta fields filterThanks for your response!
The problem with dropdown or multi-dropdown is that the values have to be predefined.
But in this case the delivery times are dynamically filled.That is why the multi-dropdown is not the functionality we are looking for.
Forum: Plugins
In reply to: [HUSKY - Products Filter Professional for WooCommerce] Meta fields sliderThanks for your response.
The problem with this option is that the values have to be predefined.For example height:
We get our products dynamically from all kind of different stores.
So when a new product is added with a new max height. We want the range to change automatically.
So we don’t have to check every day if there is a new min or max value.Forum: Plugins
In reply to: [HUSKY - Products Filter Professional for WooCommerce] Meta fields filterHello,
Unfortunately that doesn’t contain an answer to my question.
When I enable the metafield in the filterbar there is 1 checkbox that I can check and filters products that have this metafield filled in.
But I would like a list of checkboxes with all the possible values this metafield can have.
I couldn’t find the answer to this problem on the site you provided.
If this is already possible can you help me out and point me in the right direction?Thanks in advance!