Home Forums Basel support forum Products on shop page possible bug

Products on shop page possible bug

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #34388

    theDevelopers
    Participant

    Hi there, I noticed on my shop page that only once i see on a row that only 2 products are loading.
    The rest of the rows have 4 small images or 2 big images.
    Is this a bug?

    Check here the image – https://cl.ly/oxJH

    #34402

    Artem Temos
    Keymaster

    Hello,

    We are glad to know that you considered using Basel for your web-site. I hope you will be happy with it.

    Probably, you have enabled Products grid with different sizes option in Theme Settings -> Shop. Try to turn it off.

    Kind Regards
    Xtemos

    #34446

    theDevelopers
    Participant

    Yes, but my question was
    Check the image again – https://cl.ly/oxJH

    Thanks

    #34459

    Artem Temos
    Keymaster

    Did you try to disable that option? Could you please provide us your admin access so we can check what is wrong there?

    #34460

    theDevelopers
    Participant

    Yes, I disabled that option and the products are loading fine. But I like this option, with 2 big products from time to time. It’s something different.
    The only problem is that those products on the next row are just 2 and looks bad.

    #34461

    theDevelopers
    Participant

    Updated

    #34462

    Artem Temos
    Keymaster

    Could you please provide us your FTP access as well?

    #34468

    theDevelopers
    Participant

    Yes

    Sorry for the delay.

    #34562

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to fix this

    function basel_wide_array(){
    	$array = array_chunk( range( -1, 999 ), 4);
    	for ( $i = 0; $i < count( $array ); $i++ ){
    	  if ( ( $i % 2 ) == 0) unset ( $array[$i] );
    	}
    	$newArray = array_reduce( $array, function ( $carry, $item ) {
        	return array_merge( $carry, $item );
    	}, []);
    	return $newArray;
    }
    
    function basel_get_wide_items_array( $different_sizes = false ){
    	$items_wide = apply_filters( 'basel_wide_items', basel_wide_array() );
    
    	if( is_array( $different_sizes ) ) {
    		$items_wide = apply_filters( 'basel_wide_items', $different_sizes );
    	}
    
    	return $items_wide;
    }

    Regards

    #34577

    theDevelopers
    Participant

    The code snippet you are trying to save produced a fatal error on line 20:

    Cannot redeclare basel_get_wide_items_array() (previously declared in /home/queenflo/public_html/wp-content/themes/basel/inc/woocommerce.php:1916)
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    #34578

    theDevelopers
    Participant

    Added to functions.php and it’s working.
    This fix will be added to the next release of Basel? Or I should add it again when I update?

    Also I can edit my posts here and I would like to remove the full path from above. Thanks

    #34579

    Artem Temos
    Keymaster

    We moved the code to the child theme so you will not have any problems after theme updates.

    #34580

    theDevelopers
    Participant

    Ok, thanks

    #34582

    theDevelopers
    Participant

    But why it will not be fixed in the next version?

    #34588

    Artem Temos
    Keymaster

    It is a temporary solution for you and we need to investigate it more to implement a general fix in our future updates.

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