Forum Replies Created
-
wpsolrKeymaster4 years, 1 month ago in reply to: Custom Query support for wpsolr ? #30892
This is how internally facet range queries are implemented with the Solarium PHP library
But WPSOLR does not expose its Solarium client to actions and filters.
wpsolrKeymaster4 years, 1 month ago in reply to: Hide facet filter in frontend #30887You can try:
<?php use wpsolr\core\classes\WPSOLR_Events; add_filter( WPSOLR_Events::WPSOLR_FILTER_UPDATE_FACETS_DATA, 'hide_facets', 10, 1 ); /** * * Hide facets. * * @param array $facets_data * * @return array */ public function hide_facets( $facets_data ) { /** * unset the facet from $facets_data['facets'] */ return $facets_data; }wpsolrKeymaster4 years, 1 month ago in reply to: Hide facet filter in frontend #30884No, but you can use some css to hide the facet. Each facet has a unique id.
wpsolrKeymaster4 years, 1 month ago in reply to: Hide facet filter in frontend #30882You should then remove the facet from the facets definition in screen 2.4
wpsolrKeymaster4 years, 1 month ago in reply to: Pre-sales questions #30880Is the WPSolr plugin compatible with the latest version of the media cloud plugin?
We are not aware of this plugin.
Has WPSolr been used by other clients who host on Pantheon? Are there any known issues with hosting on Pantheon and using WPSolor?
We have agency clients with tens of licenses on Pantheon. Just know that WPSOLR does not work with Pantheon’s hosted Solr. You will need some external Solr/Elasticsearch/OpenSearch hosting.
wpsolrKeymaster4 years, 1 month ago in reply to: Search keyword not working properly #30874I also indexed a post with § in Solr, with success.
wpsolrKeymaster4 years, 1 month ago in reply to: Hide facet filter in frontend #30873You could be interested in this topic about hiding certain facet values
wpsolrKeymaster4 years, 1 month ago in reply to: unfortunately wpsolr doesn’t woore #30871WPSOLR requires PHP 7.4
wpsolrKeymaster4 years, 1 month ago in reply to: Hide products with empty or zero price #30869The following code in your functions.php should filter out your products without a price from indexing.
Delete the content of your index to remove current indexed products with no price, then reindex.<?php use wpsolr\core\classes\WPSOLR_Events; /** * Modify the SQL query that retrieves all post types to be indexed, to remove products with some condition on _price */ add_filter( WPSOLR_Events::WPSOLR_FILTER_SQL_QUERY_STATEMENT, function ( $sql_statements, $parameters ) { global $wpdb; $model_type = $parameters['model_type']; if ( 'product' === $model_type->get_type() ) { /* * Use a WHERE sub query to filter out posts with _price not > 0 * This is an exemple: fine tune your query as you like */ $sql_statements['WHERE'] .= " AND A.ID in (SELECT post_id from {$wpdb->prefix}postmeta WHERE meta_key = '_price' AND CAST(meta_value as SIGNED) > 0) "; /* * We could also use a JOIN * $sql_statements['JOIN'] .= '...' ; */ } return $sql_statements; } , 10, 2 );wpsolrKeymaster4 years, 1 month ago in reply to: Hide products with empty or zero price #30866Can’t you mark those products as out of stock?
wpsolrKeymaster4 years, 1 month ago in reply to: License for Test Branches #30864I confirm that some features remain unavailable within the “test” environments. This is a bug.
wpsolrKeymaster4 years, 1 month ago in reply to: Hide products with empty or zero price #30863You could activate the WooCommerce inventory “Hide out of stock items from the catalog” option, and mark those items with no-stock. WPSOLR will de-index them.
wpsolrKeymaster4 years, 1 month ago in reply to: unfortunately wpsolr doesn’t woore #30861Which PHP version do you use? WPSOLR requires PHP 7.4
wpsolrKeymaster4 years, 1 month ago in reply to: PHP 8.x support #30854I will test WPSOLR 22.4 with PHP 8.1 anyway…
wpsolrKeymaster4 years, 1 month ago in reply to: License for Test Branches #30852The image I see above shows an environment recognized as “test”: license-free to use, and with all add-ons and features unlocked.
What is the issue exactly?