Multiple videos

By default, we only allow you to add in one embedded video onto your product's pages. Using this extension you can add as many videos as you like.

(Please note you can only embed videos onto product pages that are hosted on a video hosting website like YouTube or Vimeo).

Installing the extension means that you'll need to make some changes to your product page to display the videos in some sort of video gallery, as shown in the example above.


Installing the extension

Select 'apps and extensions' from the left menu and then 'available extensions'. Find the 'multiple videos' extension and click to activate it on your account.

Once the extension is activated you'll then need to add the relevant code to your website's files (described below). Adding the code will output the video embedding code (entered on the add/edit product page) on to the product page on your website. To add the relevant code you'll need to use the page editor, alternatively you can click the 'request installation' button and we'll install the code for you (a small charge will be made for the installation, which is listed on the extension page).

Installation By Us

If you choose to have us install the extension for you, as part of the installation process we'll design how the videos will display on the product page, as shown in the example above.

Self-installation

1. Locate the product.twig file (located in /views/product pages/product.twig).

2. You'll need to add the code shown below where you would like to display these videos.

{% if product.videos|length %}
    {% for video in product.videos %}
        {{ video|raw }}
    {% endfor %}
{% endif %}

for example

This will output the video code (represented by {{ video|raw }}) for each video you have added in.

4. Save your changes.

Please Note: The code shown above comes with no styling so will simply output the embedding code and display the videos. To display a nice looking gallery as shown on the example below you'll need to add some CSS styling.


Adding multiple videos to your products

To display videos on your product pages they must be hosted on a video hosting website like YouTube or Vimeo. Once the video is on one of those services you'll be provided with some embedding code.

To add these videos to your products, when adding/editing the product scroll to the 'images & video section'.

Add your first video in the 'product video' field.

Click the 'add another' link in order to display another field. You can add unlimited videos to your products.