Forum Replies Created
- JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27816
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 61Also, 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…
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27814how do I get the basics like product image to work?
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27812my 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
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27810in algolia the display of the results is controlled by a hit template, meaning the way the product itself displays.
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27808I 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.
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27806I also have a bunch of date data in my index that I don’t think is necessary… This seems to be automatically generated
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27805So 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; }
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27803#2 It’s working correctly, my apologies. It must have corrected itself after the new index
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27801#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.JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27796public 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
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27794with 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 502JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27792commenting out every reference to get_option_plugin_woocommerce_is_replace_sort_items() in that files removed the 502
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27791With all of the indexes deleted, still 502
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27788Hello theme, I changed themes and its still a 502
JmaskedParticipant3 years, 7 months ago in reply to: integration issues – custom fields, speed, drop down list sort etc #27785What 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.