If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

VirtueMart 3.x. How to change number of related products

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 products

By default, you’ll see 4 products displayed in the related products block:

VirtueMart_3.x._How_to_change_the_number_of_related_products-1

In order to change the number of related products on the product page, you need to take the following steps:

  1. Open the templates/themeXXX/html/com_virtuemart/sublayouts/customfieldsrelatedprod.php file using your favorite code editor.

  2. 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
    
    VirtueMart_3.x._How_to_change_the_number_of_related_products-2
  3. Change the number of items for each device type, save changes and upload the customfieldsrelatedprod.php file to the server replacing the old one:

    VirtueMart_3.x._How_to_change_the_number_of_related_products-3
  4. Reload the product page. The number of the related products has been changed:

    VirtueMart_3.x._How_to_change_the_number_of_related_products-4

Feel free to check the detailed video tutorial below:

VirtueMart 3.x. How to change number of related products
 
Live Chat
We help you to choose the right product.
Start chat