Hi,
Normally, the "products in row" is calculated automatically based on "item count", "viewArea width" and "deviceWidth".
If you are non happy with this automatic calculation, you can use CSS to force the carousel plugin to have constant grid counts for certain devices.
To manually set the grid count, follow these steps:
1- Open this PHP file:
/templates/flexible_sportmart/html/mod_virtuemart_product/mod_virtuemart_product.php
2- Make sure you have set min and max values to cover all your needs (for example => min:1 & max:5)
visible: {
min: 1,
max: 5
},
3- Refresh the Joomla Cache (because joomla caches the module template PHP file)
4- Open this CSS file (or practically any CSS file)
/templates/flexible_sportmart/css/custom.css
5- and include these rules:
/* Don't touch this line */
.FlexibleFeatured ul li img { max-width:100% !important;}
/* Don't touch this line */
/* Extra Large Screens, 4K Screens */
@media (min-width : 1601px) {
.FlexibleFeatured ul li { width:20%;}
}
/* Laptops, Desktops */
@media (max-width : 1600px) {
.FlexibleFeatured ul li { width:25%;}
}
/* Tablets (iPad)*/
@media (max-width : 769px) {
.FlexibleFeatured ul li { width:33%;}
}
/* Phones (iPhone 6) */
@media (max-width : 480px) {
.FlexibleFeatured ul li { width:50%;}
}
/* Extra Small Phones (iPhone 3-4-5)*/
@media (max-width : 321px) {
.FlexibleFeatured ul li { width:100%;}
}
If you carefully look at these CSS rules, they are pretty straight forward. These CSS rules above will let you have
- 5 products per row on large screens (i.e: 4K screens)
- 4 products per row on laptop, dektop
- 3 products per row on iPad
- 2 products per row on iPhone
- 1 products per row on extra smaller devices
You can modify the percentage values depends on your needs.
-- while testing this approach, make sure to refresh the page each time you change the browser resolution
Regards.