Home Forums Basel support forum Visual Composer Product Category Grid

Visual Composer Product Category Grid

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1617

    lgsikaffy
    Participant

    I’m having an issue spacing these product categories evenly. If I add a new one, a new row will pop up. I Can’t get these to center.

    #1624

    Artem Temos
    Keymaster

    Hello there,

    Could you please add one more category on your web-site so we could see the issue? And please provide us your admin panel access.

    #1674

    lgsikaffy
    Participant

    example

    #1679

    Artem Temos
    Keymaster

    We have found this bug in our theme. It will be fixed in the next release.

    As a work around you may try to replace all lines in the file basel/woocommerce/content-product_cat.php

    <?php
    /**
     * The template for displaying product category thumbnails within loops.
     *
     * Override this template by copying it to yourtheme/woocommerce/content-product_cat.php
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version 	2.6.1
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $woocommerce_loop;
    
    $isotope 		 = basel_get_opt( 'products_masonry' );
    $different_sizes = basel_get_opt( 'products_different_sizes' );
    
    // Store column count for displaying the grid
    if ( empty( $woocommerce_loop['columns'] ) )
    	$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 );
    
    // Increase loop count
    // $woocommerce_loop['loop']++;
    
    $different_sizes = false;
    
    if( ! empty( $woocommerce_loop['different_sizes'] ) ) {
    	$different_sizes = $woocommerce_loop['different_sizes'];
    	$isotope = true;
    }
    
    // Store loop count we're currently on
    if ( empty( $woocommerce_loop['loop'] ) ) {
    	if( $different_sizes ) {
    		$woocommerce_loop['loop'] = 1;
    	} else {
    		$woocommerce_loop['loop'] = 0;
    	}
    }
    
    $classes = array();
    $classes[] = basel_get_grid_el_class($woocommerce_loop['loop'], $woocommerce_loop['columns'], $different_sizes);
    $classes[] = 'category-grid-item';
    
    ?>
    <div <?php wc_product_cat_class($classes, $category); ?>>
    	
    	<div class="category-content">
    		<a href="<?php echo esc_url( get_term_link( $category->slug, 'product_cat' ) ); ?>">
    			<?php do_action( 'woocommerce_before_subcategory', $category ); ?>
    
    			<?php
    				/**
    				 * woocommerce_before_subcategory_title hook
    				 *
    				 * @hooked woocommerce_subcategory_thumbnail - 10
    				 */
    				do_action( 'woocommerce_before_subcategory_title', $category );
    			?>
    		</a>
    		<div class="hover-mask">
    			<h3>
    				<?php
    					echo esc_html( $category->name );
    
    					if ( $category->count > 0 )
    						echo apply_filters( 'woocommerce_subcategory_count_html', ' <mark class="count">(' . $category->count . ')</mark>', $category );
    				?>
    			</h3>
    
    			<a href="<?php echo esc_url( get_term_link( $category->slug, 'product_cat' ) ); ?>"><?php _e('View products', 'basel'); ?></a>
    
    			<?php
    				/**
    				 * woocommerce_after_subcategory_title hook
    				 */
    				do_action( 'woocommerce_after_subcategory_title', $category );
    			?>
    		</div>
    
    		<?php do_action( 'woocommerce_after_subcategory', $category ); ?>
    	</div>
    </div>
    
    <?php if( ! $isotope ) echo basel_get_grid_clear($woocommerce_loop['loop'], $woocommerce_loop['columns']); ?>

    Regards

    #2210

    lgsikaffy
    Participant

    Thank you So MUCH!!!!

    #2212

    Artem Temos
    Keymaster

    You are welcome, write us when you have any difficulties or issues with our theme.

    And we would be glad if you will rate our theme with 5 stars on themeforest in case you are satisfied with our theme and customer service http://themeforest.net/downloads

    Thank you in advance 🙂

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

The topic ‘Visual Composer Product Category Grid’ is closed to new replies.