Product videos are a compelling way to increase customer interest.
According to this InternetRetailer.com article, Shoeline.com increased conversion rates by 40% after adding 100 videos showing how a shoe looks on a model’s foot.
We’ll show you how to add links to YouTube videos that pop up when the user clicks a link. To do this, we’re going to use a script called Thickbox. Thickbox opens a modal box displaying the content, immediately drawing the user’s attention to the video.
We’re going to do this in three main steps:
1. Download and install Thickbox on your site.
2. Modify the skin template to use Thickbox.
3. Modify the product description to add a link to the video.
Downloading and Installing Thickbox
Your first step will be to acquire the software. Go to http://jquery.com/demo/thickbox/ and scroll down underneath the “Overview” section to find the “Download” tab.
There are three files to download:
- thickbox-compressed.js
- thickbox.css
- loadingAnimation.gif
You can safely ignore the other downloads listed, but remember where you save these three files on your machine.
Next you will need to apply the files to your AspDotNetStorefront site.
Copy the files to the following locations:
- Copy “thickbox-compressed.js” to the “jscripts” folder.
- Copy “thickbox.css” to the “styles” folder of your skin folder (“skins/skin_1” in the root directory).
- Copy “loadingAnimation.gif” to the “images” folder.
Now that the files have found their new homes you can need to modify the template to use them.
Modifying the Template
Enabling Thickbox requires some changes to the skin template. The template is named “template.ascx”, and you can find it in your skin directory (“skins/skin_1” in the root directory).
First Thickbox requires you to enable jQuery on your site. jQuery is a fantastic cross-browser Javascript framework that makes Javascript development much less painful.
We’ll use Google’s AJAX Libraries API to get jQuery, so there’s nothing to download or install on your site.
Add the following inside the head tag of the template:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"><!--mce:0--></script>
You will also need to include the Thickbox script itself:
<script src="jscripts/thickbox-compressed.js" type="text/javascript"><!--mce:1--></script>
Thickbox also depends on a stylesheet. Insert the following inside the head tag:
Your template now loads everything Thickbox needs to function. The last step will be to modify your product descriptions to link to the videos.
Modifying the Product Description
Now you can finally add a link to the video!
Go into the AspDotNetStorefront Admin section and open up a product for editing. Find the “Description” tab and switch the editor to HTML mode and paste in the following code, replacing “Link Text Here” with the text you want displayed:
<a class="thickbox" href="#TB_inline?height=380&width=425&inlineId=videoPlayerContainer"> Link Text Here </a>
Next we will need to insert the video embed from YouTube. Paste the following at the bottom of the description:
<div id="videoPlayerContainer" style="display:none;">Embed Tag Goes Here</div>
Now find the video you want to embed from YouTube. On the right hand side, underneath the description, there will be a text box labeled “Embed”. Copy the text out of this box and replace the text “Embed Tag Goes Here” in the code above.
Update the product and navigate to your product page. When you click the link, you should be presented with your video in a box floating over the page content.
Written by Jason A.Tags: AspDotNetStoreFront, e-commerce, Video, youtube




















is your expert

Captivate your audience and showcase your brand with our
Are you just starting your online business? Did you have a pre-exisiting site and have recently converted to the AspDotNetStoreFront platform? Try our economical design solution with
Increase conversions by up to 145%. Studies show that making the right changes to your site can increase your conversion rate by as much as 145%!
May 27th, 2009 at 8:36 am
Also, add macFFBgHack.png to the images folder and open thickbox.css and replace:
.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
With:
.TB_overlayMacFFBGHack {background: url(http://www.YourSiteName.com/images/macFFBgHack.png) repeat;}
June 2nd, 2009 at 3:19 pm
Hi Jason, nice article!
One thing though: Under the
“Thickbox also depends on a stylesheet. Insert the following inside the head tag:”
nothing shows up. Seems like a great thing to add but I was a bit lost since I couldn’t figure out this part.
Ben
June 3rd, 2009 at 12:20 pm
Hi Ben. That’s fixed now. Thanks!