
Originally Posted by
swguy
I'd like to force the listing pages to use larger product images/fewer columns - I know that Product Listing > Columns per Row is recommended to be 0; is there another option?
With that setting at 0, edit your template's override of /includes/modules/bootstrap/product_listing.php, finding the following section
Code:
// set css classes for "row" wrapper, to allow for fluid grouping of cells based on viewport
// these defaults are based on Bootstrap4, but can be customized to suit your own framework
if ($product_listing_layout_style === 'fluid') {
$grid_cards_classes = 'row-cols-1 row-cols-md-2 row-cols-lg-2 row-cols-xl-3';
// this array is intentionally in reverse order, with largest index first
$grid_classes_matrix = [
'10' => 'row-cols-1 row-cols-md-2 row-cols-lg-4 row-cols-xl-5',
'9' => 'row-cols-1 row-cols-md-3 row-cols-lg-4 row-cols-xl-5', //-lat9: Added for 3/9/0 configuration
'8' => 'row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4',
'6' => 'row-cols-1 row-cols-md-2 row-cols-lg-2 row-cols-xl-3',
];
// determine classes to use based on number of grid-columns used by "center" column
if (isset($center_column_width)) {
foreach ($grid_classes_matrix as $width => $classes) {
if ($center_column_width >= $width) {
$grid_cards_classes = $classes;
break;
}
}
}
$list_box_contents[$rows]['params'] = 'class="row ' . $grid_cards_classes . ' text-center"';
}
... and edit that grid_classes_matrix for your customizations.
Bookmarks