- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
VirtueMart 3.x. How to change number of related products
January 26, 2016
This tutorial will show you how to change the number of related products on the product page in VirtueMart 3.x. templates.
VirtueMart 3.x. How to change number of related productsBy default, you’ll see 4 products displayed in the related products block:

In order to change the number of related products on the product page, you need to take the following steps:
-
Open the templates/themeXXX/html/com_virtuemart/sublayouts/customfieldsrelatedprod.php file using your favorite code editor.
-
Scroll to the bottom of the file and find the embedded JavaScript code which initializes the Owl Carousel. You will see 4 variables that define the number of related products for different device widths:
items : 4, itemsDesktop : [1000,3], //5 items between 1000px and 901px itemsDesktopSmall : [900,3], // betweem 900px and 601px itemsTablet: [600,2], //2 items between 600 and 0
-
Change the number of items for each device type, save changes and upload the customfieldsrelatedprod.php file to the server replacing the old one:
-
Reload the product page. The number of the related products has been changed:
Feel free to check the detailed video tutorial below:
VirtueMart 3.x. How to change number of related products