Home › Forums › WoodMart support forum › Product filters
Product filters
- This topic has 21 replies, 2 voices, and was last updated 4 years, 3 months ago by
Artem Temos.
-
AuthorPosts
-
April 20, 2021 at 5:35 pm #284756
duniesParticipantHello, I created a product filter like this https://woodmart.xtemos.com/demo-motorcycle/demo/motorcycle/ at homepage but because data are too many it doesn’t work smoothly and takes ages to load.
It would have been very convenient if we could write and narrow the search. Will you please consider to make it like the widget?
April 21, 2021 at 6:22 am #284912
Artem TemosKeymasterHello,
Please, update the theme to the latest version and provide us with your admin and FTP access so we can check what is wrong. It shouldn’t work this way…
Kind Regards
April 21, 2021 at 2:33 pm #285125
duniesParticipantHello and thank you for the reply.
Unfortunately the theme update wasn’t successful although I installed it twice because home was loading forever and ended in a timeout gateway. However the woocommerce and woodmart core plugin were updated with no issues. I just had to return to previous version for the website to load. I believe that something is wrong with this update. Actually it never happened to me before, with this theme.
I created an account for you to check out both issues. The details can be found in private area.
April 22, 2021 at 6:06 am #285322
Artem TemosKeymasterHello,
As we can see, the 6.0.3 is already installed. Could you please try to disable all external plugins that are not related to our theme? We will try to activate the theme for you.
Kind Regards
April 22, 2021 at 7:29 am #285379
duniesParticipantHello, I deactivated all third party plugins and installed the new version but page doesn’t load.
April 22, 2021 at 7:35 am #285387
Artem TemosKeymasterWe are trying to test how it works with a default theme and it looks like your website is not loading well also. It takes 5-10 seconds to load. Please, check this with your hosting provider first. It should be loaded in 0.5-1s.
April 22, 2021 at 7:43 am #285393
duniesParticipantBesides the delay, it loads. With the old version of theme also loads. With this version doesn’t load at all!
Please let me know when you are done so that I will install the old version
April 22, 2021 at 8:27 am #285422
duniesParticipantSince you didn’t reply, I have turned the website back to old version because I don’t want my client to see website broken.
Site with old version works and so does with default. There is a problem with the new version that doesn’t load at all.
Regarding the speed website is on a testing domain and no tweeks have been made. However the new version doesn’t work and this is a problem.
April 22, 2021 at 10:55 am #285506
duniesParticipantNo reply after 3 hours. You left website in a mess and didn’t respond either to let me know if you you are done or to try to help with the issue.
My hosting company replied to talk with theme developer.
New version doesn’t load at all. Old works. What is the problem? How do we proceed?
April 22, 2021 at 11:17 am #285512
Artem TemosKeymasterYou need to resolve this delay problem first. Otherwise, our theme will not work well on your website. As a workaround, you can increase the timeout parameter on your server. But it is not a solution.
Make sure that your website is loaded in 0.5-1s seconds with the default theme first. Our theme doesn’t affect the loading time when it is disabled.
April 22, 2021 at 1:43 pm #285582
duniesParticipantThis is the faster my server goes. My problem is not the speed. It is that the new version doesn’t load AT ALL! The 5.36 loads, slowly but loads.
April 22, 2021 at 1:54 pm #285587
Artem TemosKeymasterPlease, provide us your FTP access so we can check what is wrong with the home page.
April 22, 2021 at 2:42 pm #285606
duniesParticipantIt is the brands the cause of the issue. Now homepage loads and I found out that the page I send you in private which displays brands also doesn’t load. What can be done? Brands are important. There we no issues at old version.
April 22, 2021 at 2:43 pm #285610
Artem TemosKeymasterYes, we need to check this on your side. Please, provide us your FTP access.
April 22, 2021 at 3:34 pm #285617
duniesParticipanthere it is
April 23, 2021 at 6:44 am #285794
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this
function woodmart_shortcode_brands( $atts, $content = '' ) { $item_class = $items_wrap_class = $owl_atts = ''; $parsed_atts = shortcode_atts( array_merge( woodmart_get_owl_atts(), array( 'title' => '', 'username' => 'flickr', 'number' => 20, 'hover' => 'default', 'target' => '_self', 'link' => '', 'ids' => '', 'style' => 'carousel', 'brand_style' => 'default', 'per_row' => 3, 'columns' => 3, 'orderby' => '', 'order' => 'ASC', 'hide_empty' => 'no', 'scroll_carousel_init' => 'no', ) ), $atts ); extract( $parsed_atts ); $carousel_id = 'brands_' . rand(1000,9999); $attribute = woodmart_get_opt( 'brands_attribute' ); if( empty( $attribute ) || ! taxonomy_exists( $attribute ) ) return '<div class="wd-notice wd-info">' . esc_html__( 'You must select your brand attribute in Theme Settings -> Shop -> Brands', 'woodmart' ) . '</div>'; ob_start(); $class = 'brands-widget slider-' . $carousel_id; if( $style != '' ) { $class .= ' brands-' . $style; } $class .= ' brands-hover-' . $hover; $class .= ' brands-style-' . $brand_style; if ( $style == 'carousel' ) { woodmart_enqueue_inline_style( 'owl-carousel' ); $custom_sizes = apply_filters( 'woodmart_brands_shortcode_custom_sizes', false ); $parsed_atts['wrap'] = $wrap; $parsed_atts['scroll_per_page'] = 'yes'; $parsed_atts['carousel_id'] = $carousel_id; $parsed_atts['slides_per_view'] = $per_row; $parsed_atts['custom_sizes'] = $custom_sizes; $owl_atts = woodmart_get_owl_attributes( $parsed_atts ); $items_wrap_class .= ' owl-carousel ' . woodmart_owl_items_per_slide( $per_row, array(), false, false, $custom_sizes ); $class .= ' wd-carousel-container'; $class .= ' wd-carousel-spacing-0'; if ( $scroll_carousel_init == 'yes' ) { woodmart_enqueue_js_library( 'waypoints' ); $class .= ' scroll-init'; } if ( woodmart_get_opt( 'disable_owl_mobile_devices' ) ) { $class .= ' disable-owl-mobile'; } } else { $items_wrap_class .= ' row'; $items_wrap_class .= ' wd-spacing-0'; $item_class .= woodmart_get_grid_el_class( 0, $columns ); } echo '<div id="'. esc_attr( $carousel_id ) . '" class="brands-items-wrapper ' . esc_attr( $class ) . '" ' . $owl_atts . '>'; if(!empty($title)) { echo '<h3 class="title">' . $title . '</h3>'; }; $args = array( 'taxonomy' => $attribute, 'hide_empty' => 'yes' === $hide_empty, 'order' => $order, 'number' => $number ); if ( $orderby ) $args['orderby'] = $orderby; if ( $orderby == 'random' ) { $args['orderby'] = 'id'; $brand_count = wp_count_terms( $attribute, array( 'hide_empty' => 'yes' === $hide_empty ) ); $offset = rand( 0, $brand_count - $number ); if ( $offset <= 0 ) { $offset = ''; } $args['offset'] = $offset; } if( ! empty( $ids ) ) { $args['include'] = explode(',', $ids); } $brands = get_terms( $args ); $taxonomy = get_taxonomy( $attribute ); if ( $orderby == 'random' ) shuffle( $brands ); if ( woodmart_is_shop_on_front() ) { $link = home_url(); } else { $link = get_post_type_archive_link( 'product' ); } woodmart_enqueue_inline_style( 'brands' ); echo '<div class="' . esc_attr( $items_wrap_class ) . '">'; if( ! is_wp_error( $brands ) && count( $brands ) > 0 ) { foreach ($brands as $key => $brand) { $image = get_term_meta( $brand->term_id, 'image', true ); $filter_name = 'filter_' . sanitize_title( str_replace( 'pa_', '', $attribute ) ); if ( is_object( $taxonomy ) && $taxonomy->public ) { $attr_link = get_term_link( $brand->term_id, $brand->taxonomy ); } else { $attr_link = add_query_arg( $filter_name, $brand->slug, $link ); } echo '<div class="brand-item' . esc_attr( $item_class ) . '">'; echo '<a href="' . esc_url( $attr_link ) . '">'; if( $style == 'list' || empty( $image ) ) { echo '<span class="brand-title-wrap">' . $brand->name . '</span>'; } else { echo '<img src="' . $image . '" alt="' . $brand->name . '" title="' . $brand->name . '">'; } echo '</a>'; echo '</div>'; } } echo '</div></div>'; $output = ob_get_contents(); ob_end_clean(); return $output; }
April 23, 2021 at 10:35 am #285882
duniesParticipantHello and thank you very much because it now works fine! I would just like to ask you if I will have to remove this code on a future update or is it better to leave it there?
And if you please, can you check the filter issue which was the reason this post started?
Thank you once again
April 23, 2021 at 11:19 am #285900
Artem TemosKeymasterThe filter doesn’t work because it has a huge number of sub-elements. There is no “autocomplete” functionality that loads selections with AJAX, unfortunately.
Yes, the brand’s fix will be included in our next update.
April 23, 2021 at 1:06 pm #285964
duniesParticipantI know that the number is huge and that is why I suggested that you may think to include it in one of your future updates.
Please check this search just below slider in this website https://www.bibliotopia.gr
Thank you!
Attachments:
You must be logged in to view attached files.April 23, 2021 at 1:46 pm #285985
Artem TemosKeymasterWe will consider this for our future updates. Thank you
May 31, 2021 at 10:57 am #296619
duniesParticipantHello,
I have updated to the newer version but still needs this code on post
#285794 to work. You said that I will not need it on future updates.May 31, 2021 at 11:58 am #296648
Artem TemosKeymasterHello,
It will be fixed in our next theme update, sorry. Also, after the update, you would need to add the following single line only
add_filter( 'woodmart_brands_element_images_with_attributes', '__return_false' );
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register