Forum Replies Created

  • wpsolr
    Keymaster
    4 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.

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Hide facet filter in frontend #30887

    You 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;
    }
    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Hide facet filter in frontend #30884

    No, but you can use some css to hide the facet. Each facet has a unique id.

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Hide facet filter in frontend #30882

    You should then remove the facet from the facets definition in screen 2.4

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Pre-sales questions #30880

    Is 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.

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Search keyword not working properly #30874

    I also indexed a post with § in Solr, with success.

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Hide facet filter in frontend #30873

    You could be interested in this topic about hiding certain facet values

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: unfortunately wpsolr doesn’t woore #30871

    WPSOLR requires PHP 7.4

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Hide products with empty or zero price #30869

    The 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 );
    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Hide products with empty or zero price #30866

    Can’t you mark those products as out of stock?

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: License for Test Branches #30864

    I confirm that some features remain unavailable within the “test” environments. This is a bug.

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: Hide products with empty or zero price #30863

    You 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.

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: unfortunately wpsolr doesn’t woore #30861

    Which PHP version do you use? WPSOLR requires PHP 7.4

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: PHP 8.x support #30854

    I will test WPSOLR 22.4 with PHP 8.1 anyway…

    wpsolr
    Keymaster
    4 years, 1 month ago in reply to: License for Test Branches #30852

    The 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?

Viewing 15 posts - 916 through 930 (of 3,679 total)