Categories

Featured templates

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

Guillaume Dumas January 26, 2016
Rating: 3.0/5. From 4 votes.
Please wait...

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
This entry was posted in VirtueMart Tutorials and tagged number, product, Related, VirtueMart. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket