Home › Forums › Basel support forum › Products on shop page possible bug
Products on shop page possible bug
- This topic has 14 replies, 2 voices, and was last updated 6 years, 10 months ago by Artem Temos.
-
AuthorPosts
-
January 19, 2018 at 10:02 pm #34388
theDevelopersParticipantHi 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
January 20, 2018 at 8:44 am #34402
Artem TemosKeymasterHello,
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
XtemosJanuary 20, 2018 at 2:55 pm #34446
theDevelopersParticipantYes, but my question was
Check the image again – https://cl.ly/oxJHThanks
January 20, 2018 at 3:17 pm #34459
Artem TemosKeymasterDid you try to disable that option? Could you please provide us your admin access so we can check what is wrong there?
January 20, 2018 at 3:23 pm #34460
theDevelopersParticipantYes, 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.January 20, 2018 at 3:29 pm #34461
theDevelopersParticipantUpdated
January 20, 2018 at 3:32 pm #34462
Artem TemosKeymasterCould you please provide us your FTP access as well?
January 20, 2018 at 4:33 pm #34468
theDevelopersParticipantYes
Sorry for the delay.
January 21, 2018 at 3:22 pm #34562
Artem TemosKeymasterTry 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
January 21, 2018 at 3:51 pm #34577
theDevelopersParticipantThe 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.January 21, 2018 at 3:54 pm #34578
theDevelopersParticipantAdded 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
January 21, 2018 at 4:12 pm #34579
Artem TemosKeymasterWe moved the code to the child theme so you will not have any problems after theme updates.
January 21, 2018 at 4:14 pm #34580
theDevelopersParticipantOk, thanks
January 21, 2018 at 4:22 pm #34582
theDevelopersParticipantBut why it will not be fixed in the next version?
January 21, 2018 at 5:35 pm #34588
Artem TemosKeymasterIt is a temporary solution for you and we need to investigate it more to implement a general fix in our future updates.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register