products misaligments in shop page woocommerce


#1

hi I have problem with the product number alignments. when ever I put number per row the last product in the row drop alone in the next line below the row and the same for the rest.
I have shopkeeper Theme.

Thanks for your help!


#2

remove_action( ‘woocommerce_before_shop_loop’, ‘woocommerce_catalog_ordering’, 30 );
add_filter(‘loop_shop_columns’, ‘loop_columns’);if (!function_exists(‘loop_columns’)) { function loop_columns() { return 5; }}
if ( empty( $woocommerce_loop[‘columns’] ) ) { $woocommerce_loop[‘columns’] = apply_filters( ‘loop_shop_columns’, 4 );}


#3

but it did not wok with me.

this is my shop loop:

// Shop loop columns
//==============================================================================
//
if ( !function_exists(‘shopkeeper_loop_columns_class’)):
function shopkeeper_loop_columns_class() {
global $shopkeeper_theme_options, $woocommerce_loop;
if ( ( isset($woocommerce_loop[‘columns’]) && $woocommerce_loop[‘columns’] != “” ) ) {
$products_per_column = $woocommerce_loop[‘columns’];
} else {
$products_per_column = get_option(‘woocommerce_catalog_columns’, 5);

		if (isset($_GET["products_per_row"])) {
			$products_per_column = $_GET["products_per_row"];
		}
	}

	if ($products_per_column == 6) {
		$products_per_column_xlarge = 6;
		$products_per_column_large = 4;
		$products_per_column_medium = 3;
	}

	if ($products_per_column == 5) {
		$products_per_column_xlarge = 5;
		$products_per_column_large = 4;
		$products_per_column_medium = 3;
	}

	if ($products_per_column == 4) {
		$products_per_column_xlarge = 4;
		$products_per_column_large = 4;
		$products_per_column_medium = 3;
	}

	if ($products_per_column == 3) {
		$products_per_column_xlarge = 3;
		$products_per_column_large = 3;
		$products_per_column_medium = 2;
	}

	if ($products_per_column == 2) {
		$products_per_column_xlarge = 2;
		$products_per_column_large = 2;
		$products_per_column_medium = 2;
	}

	if ($products_per_column == 1) {
		$products_per_column_xlarge = 1;
		$products_per_column_large = 1;
		$products_per_column_medium = 1;
	}
	echo $shopkeeper_theme_options['mobile_columns'] == 1 ? 'small-up-1' : 'small-up-2'; ?> medium-up-<?php echo $products_per_column_medium; ?> large-up-<?php echo $products_per_column_large; ?> xlarge-up-<?php echo $products_per_column_xlarge; ?> xxlarge-up-<?php echo $products_per_column;
}

endif;

// Deactivate out of stock variations in select
add_filter( ‘woocommerce_variation_is_active’, ‘gbt_variation_is_active’, 10, 2 );
if( !function_exists(‘gbt_variation_is_active’) ) {
function gbt_variation_is_active( $active, $variation ) {
global $shopkeeper_theme_options;

	if( $shopkeeper_theme_options['disabled_outofstock_variations'] ) {
		if( ! $variation->is_in_stock() ) {
			return false;
		}
	}

	return $active;
}

}

// Deactivate AJAX Add to Cart when incompatible plugin is active
function gbt_deactivate_ajax_add_to_cart() {

global $shopkeeper_theme_options;

if( class_exists('WC_Product_Addons') || class_exists('Wcff') ) {

	set_theme_mod( 'ajax_add_to_cart', false);
}

}
add_action( ‘init’, ‘gbt_deactivate_ajax_add_to_cart’ );

function gbt_customizer_deactivate_ajax_add_to_cart() {

$active_option['active_option'] = '1';
$active_option['plugin'] = '';

if( class_exists('WC_Product_Addons') ) {
	$active_option['active_option'] = '0';
	$active_option['plugin'] .= 'incompatible-woo-addons ';
}

if( class_exists('Wcff') ) {
	$active_option['active_option'] = '0';
	$active_option['plugin'] .= 'incompatible-fields-factory ';
}

wp_localize_script( 'shopkeeper-customizer', 'getbowtied_customizer_vars', $active_option );

}
add_action( ‘admin_enqueue_scripts’, ‘gbt_customizer_deactivate_ajax_add_to_cart’ );

add_action( ‘admin_notices’, ‘sk_theme_warning’ );
if( !function_exists(‘sk_theme_warning’) ) {
function sk_theme_warning() {
?>

	<?php if ( ! get_option('dismissed-hookmeup-notice', FALSE ) ) : ?>
		<div class="notice-warning settings-error notice is-dismissible hookmeup_notice">
			<p>
				<strong>
					<span>This theme recommends the following plugin: <em><a href="https://wordpress.org/plugins/hookmeup/" target="_blank">HookMeUp – Additional Content for WooCommerce</a></em>.</span>
				</strong>
			</p>
		</div>
	<?php endif; ?>

	<?php if ( !class_exists('ShopkeeperPortfolio') && ! get_option('dismissed-sk-portfolio-notice', FALSE ) ) : ?>
		<div class="notice-warning settings-error notice is-dismissible sk_portfolio_notice">
			<p>
				<strong>
					<span>Shopkeeper's Portfolio is now a plugin. <a href="themes.php?page=tgmpa-install-plugins">Install Plugin</a> and read more about <a href="https://shopkeeper.wp-theme.help/hc/en-us/articles/207365265-Updates-History-Changelog-" target="_blank">What's new in Shopkeeper 2.8.2?</a></span>
				</strong>
			</p>
		</div>
	<?php endif;

}

}

if ( ! function_exists( ‘gbt_dismiss_dashboard_notice’ ) ) {
function gbt_dismiss_dashboard_notice() {
if( $_POST[‘notice’] == ‘hookmeup’ ) {
update_option(‘dismissed-hookmeup-notice’, TRUE );
}

	if( $_POST['notice'] == 'sk-portfolio' ) {
		update_option('dismissed-sk-portfolio-notice', TRUE );
	}

}
add_action( 'wp_ajax_gbt_dismiss_dashboard_notice', 'gbt_dismiss_dashboard_notice' );

}


#4

Hi

The best way to get the support is Contact your purchased Item Author and let them know.

Thanks


#5