Tel: 0151 223 0001

We believe in three things: users, users, users.

Virtuemart: Adding videos to product pages

Virtuemart: Adding videos to product pages - brought to you by sdesign1 - Joomla specialists

This article will demonstrate how to embed videos from youtube to your product pages in Virtuemart. You will need FTP access and access to the Joomla administration back-end with Super Administrator privileges.

When you edit a product, you are given a text editor to add any text or images that you would like to display. However, the problem with text editors, is that they strip out lots of useful code that you may want to use on your pages.

We first need to disable the text editor, so we can paste in our code in to show the video. You need to:

  • Log into the Joomla back-end
  • Go to Site > User Manager
  • Click your Username
  • Then under "Parameters" select "Editor - No Editor" under "User Editor"
  • Click "Save"

Next we need to change a configuration file for Virtuemart to allow some HTML elements to be saved.

Log into your server with your FTP client and download the following file:

administrator/components/com_virtuemart/classes/phpinputfilter/class.inputfilter.php

Now find the following line:

var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml');

Remove the "object" and "embed" tags so your code should look like this:

var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'script', 'style', 'title', 'xml');

  • Save the file
  • Upload it

Next, you should choose the youtube video you wish to put onto your product page.

Once you have found this:

  • Cclick "Embed"
  • Copy the embed code that displays

Now navigate to your Joomla back-end and find the product that you wish to add the video to.

You will now notice that your "Product Description" no longer uses a text editor, and is simply a blank textarea.

  • Paste your embed code into the "Product Description"
  • Click "Save"

Now when you look at your product page, your youtube video will display.

hi

how can i bring the text editor in my "Product Description" back?

text editor

To bring the text editor back, simply go back to your administrator pages, click "Site" > "User Manager". Then click your username, which allows you to edit your user settings. On the right hand side it says "User Editor" - change this from "Editor - No Editor" to "Editor - Tiny MCE 2.0" and click "Save". Now you can once again use Tiny MCE for editing your content, in Virtuemart and other content.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Fill in the blank