Search

WordPress AI Recommendations
- SEO, conversions -

Forum Replies Created

  • Jmasked
    Participant

    Okay, that’s not working as it should, for example… I go to the product category “Hair”
    it states there are 6089 results..
    however the category hierarchy only shows
    Category
    Color Care
    Hair Color 61

    Also, if that’s the case then the brand should be displaying as it always was… nothing change for the product -item template that shows brand…

    Jmasked
    Participant

    how do I get the basics like product image to work?

    Jmasked
    Participant

    my code to add the custom data isn’t working though.

    Also I was looking to use the plugins built in features and needed to know how to access the attribute values by html

    Jmasked
    Participant

    in algolia the display of the results is controlled by a hit template, meaning the way the product itself displays.

    Jmasked
    Participant

    I am using Algolia, how do I include the attribute value in my hit template using your plugin?
    I am still missing product image, variation data, attribute values etc. Algolia controls the front end hits display… So I would need those values not only for hits display but for searching…

    I currently have the brand being generated by a function in product loops, it’s working on the homepage, however it’s broken on any pages like search or category that use algolia.

    I need the custom function field for attribute count to work.

    Jmasked
    Participant

    I also have a bunch of date data in my index that I don’t think is necessary… This seems to be automatically generated

    Jmasked
    Participant

    So really what I need now is…

    I need to display certain attribute values on the single product item.
    For example “pwb-brand_str”: [
    “TOM FORD”
    ],
    how is this called?

    I also need to clean up my index
    the product thumbnail was never added to the index so the products don’t have images.
    No variation data linked to the parent product is in the index, no product image, no variation sku or attributes.
    The only thing close but not really is an empty value product attribute, this is what is in the index
    _product_attributes_s [
    {
    name:”pa_tom-ford_color”
    value:””
    position:”0″
    is_visible:”1″
    is_variation:”1″
    is_taxonomy:”1″
    }
    ]

    I also need this custom attribute added to the index to display the attribute count ie: “5 Colors”:

    function filter_custom_fields( array $custom_fields, WP_Post $post) {
        
        $product = wc_get_product( $post );
        // Extract prices.
        $variations_count = 0;
        if ( $product instanceof WC_Product_Variable ) {
            $variations_count = count( $product->get_available_variations() );
            $variations = $product->get_available_variations();
            $attricount      = count( $variations );
            $allattributes = $variations[0]['attributes'];
    }
    
         if($attricount > 0 && is_array($allattributes) && count( $allattributes ) == 1){
            foreach ($allattributes as $key => $value){
                $attriname = '';
                if(strpos($key, 'color')){
                    $attriname = 'Colors';
                }elseif(strpos($key, 'size')){
                    $attriname = 'Sizes';
                }else{
                    $rawattriname = substr($key, -5);
                    $attriname = ucwords(str_replace("_","",$key));
                }
                $variation_count_meta = $attricount . ' ' .$attriname;
                $custom_fields['variation_count_display'] = $variation_count_meta;
            }
        }
            return $custom_fields;
        
    }
    
    Jmasked
    Participant

    #2 It’s working correctly, my apologies. It must have corrected itself after the new index

    Jmasked
    Participant

    #1 and #3 are fixed now

    still need help with #2, #4
    lastly #5 I need to fix my code and know how to display these attributes within the single product “hit” template. I need the “brand” and the variation count displayed with the product.

    Jmasked
    Participant
    public
    	function wpsolr_filter_url_parameters(
    		WPSOLR_Query $wpsolr_query, $url_parameters
    	) {
    
    		if ( WPSOLR_Service_Container::getOption()->get_option_plugin_woocommerce_is_replace_sort_items() ) {
    			// Get WooCommerce order by value from url, or use the default one set in settings->products->display.
    
    			$order_by_value = isset( $url_parameters[ self::WOOCOMERCE_URL_PARAMETER_SORT_BY ] )
    				? wc_clean( $url_parameters[ self::WOOCOMERCE_URL_PARAMETER_SORT_BY ] )
    				: apply_filters( 'woocommerce_default_catalog_orderby', WPSOLR_Service_Container::getOption()->get_option( true, 'woocommerce_default_catalog_orderby' ) );
    
    			if ( ! empty( $order_by_value ) ) {
    				//$wpsolr_query->set_wpsolr_sort( $order_by_value );
    			}
    		}
    	}
    

    is the culprit

    Jmasked
    Participant

    with the index empty I get a 502
    with commenting out every reference to get_option_plugin_woocommerce_is_replace_sort_items() in that file no 502

    Jmasked
    Participant

    commenting out every reference to get_option_plugin_woocommerce_is_replace_sort_items() in that files removed the 502

    Jmasked
    Participant

    With all of the indexes deleted, still 502

    Jmasked
    Participant

    Hello theme, I changed themes and its still a 502

    Jmasked
    Participant

    What I did notice is that in the instructions it has you go into woocommerce settings to change the sort to default. Whereas in my theme it has me change it in customize.

Viewing 15 posts - 1 through 15 (of 32 total)