Home Forums WoodMart support forum Product filters

Product filters

Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #284756

    dunies
    Participant

    Hello, 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?

    #284912

    Artem Temos
    Keymaster

    Hello,

    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

    #285125

    dunies
    Participant

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

    #285322

    Artem Temos
    Keymaster

    Hello,

    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

    #285379

    dunies
    Participant

    Hello, I deactivated all third party plugins and installed the new version but page doesn’t load.

    #285387

    Artem Temos
    Keymaster

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

    #285393

    dunies
    Participant

    Besides 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

    #285422

    dunies
    Participant

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

    #285506

    dunies
    Participant

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

    #285512

    Artem Temos
    Keymaster

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

    #285582

    dunies
    Participant

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

    #285587

    Artem Temos
    Keymaster

    Please, provide us your FTP access so we can check what is wrong with the home page.

    #285606

    dunies
    Participant

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

    #285610

    Artem Temos
    Keymaster

    Yes, we need to check this on your side. Please, provide us your FTP access.

    #285617

    dunies
    Participant

    here it is

    #285794

    Artem Temos
    Keymaster

    Try 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;
    }
    #285882

    dunies
    Participant

    Hello 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

    #285900

    Artem Temos
    Keymaster

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

    #285964

    dunies
    Participant

    I 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.
    #285985

    Artem Temos
    Keymaster

    We will consider this for our future updates. Thank you

    #296619

    dunies
    Participant

    Hello,

    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.

    #296648

    Artem Temos
    Keymaster

    Hello,

    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

Viewing 22 posts - 1 through 22 (of 22 total)