VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: feklee on August 20, 2012, 18:33:58 PM

Title: Replace product thumbnail with Video button?
Post by: feklee on August 20, 2012, 18:33:58 PM
Is it possible to replace a thumbnail image of a product with a video play button (on mouse-over)?

Videos could be hosted e.g. on Vimeo.

Here is how it may work:Note that I have no experience with Joomla! or VirtuaMart. However, I am a seasoned programmer, and I do have experience with embedding video in web sites (in the past, via YouTube's JS iframe API).
Title: Re: Replace product thumbnail with Video button?
Post by: ivus on August 20, 2012, 20:21:31 PM
Hi feklee,

How seasoned a programmer are you? Joomla and VM both use MVC architecture. Anything you want to change/alter/modify can all be done in the VIEW.

Your question did not mention which page you want your video on? Category Page, Product Detail Page, Shopping Cart? or perhaps one of the modules?
Title: Re: Replace product thumbnail with Video button?
Post by: feklee on August 20, 2012, 21:38:51 PM
Quote from: ivus on August 20, 2012, 20:21:31 PM
How seasoned a programmer are you?
I am experienced with the technologies that Joomla! is built upon: PHP, JavaScript, HTML, CSS

Quote
Anything you want to change/alter/modify can all be done in the VIEW.
The question is, can this be done without patching VirtueMart? Could I create some kind of module to provide the needed functionality?

Quote
Your question did not mention which page you want your video on? Category Page, Product Detail Page, Shopping Cart? or perhaps one of the modules?
It would be nice to have it on the page showing the products in a particular category.

Of course, I am aware that a fallback solution is to add the video to the product description.

Some background: I am asking this for a customer. He would set up Joomla! with VirtueMart, and he asked me for help on this particular issue.
Title: Re: Replace product thumbnail with Video button?
Post by: ivus on August 20, 2012, 21:53:03 PM
Hi feklee,

OK, you original post wasn't clear enough.

Joomla! and VirtueMart are built on PHP, MVC principles, if you know that, you shouldn't have any issues making anything you want happen :D

Yes it can be done without patching/hacking VM core. You need to create template overrides (information can be found on Joomla! website). This will ensure that changes you make to the output won't get overwritten on new updates.

The tricky part is if your client wants to have different (specific) videos for each of the products, in which case, you either need to create them as custom fields per product or use a third party plugin (http://extensions.virtuemart.net/component/sobi2/?sobi2Task=sobi2Details&catid=11&sobi2Id=224&Itemid=2 (http://extensions.virtuemart.net/component/sobi2/?sobi2Task=sobi2Details&catid=11&sobi2Id=224&Itemid=2))

I hope this helps.
Title: Re: Replace product thumbnail with Video button?
Post by: feklee on August 20, 2012, 21:58:31 PM
Thanks, ivus - that's valuable information!

And, yes, I am aware of MVC principles.
Title: Re: Replace product thumbnail with Video button?
Post by: feklee on August 21, 2012, 11:34:00 AM
Quote from: ivus on August 20, 2012, 21:53:03 PM
use a third party plugin

I now had a closer look at the Video - Where You Want (http://sleekapps.codingmall.com/products/24-video-where-you-want) plugin. It seems unattractive:
Title: Re: Replace product thumbnail with Video button?
Post by: ivus on August 21, 2012, 14:41:08 PM
Hi feklee,

looks like you're stuck with

QuoteYou need to create template overrides
Title: Re: Replace product thumbnail with Video button?
Post by: feklee on August 21, 2012, 15:24:49 PM
Quote from: ivus on August 21, 2012, 14:41:08 PM
looks like you're stuck with

QuoteYou need to create template overrides

No problem, if my customer wants to pay for development. Perhaps I can convince him to release code under an Open Source license, so that it can be shared.
Title: Re: Replace product thumbnail with Video button?
Post by: ivus on August 21, 2012, 15:29:14 PM
Hi feklee,

There's already code floating around on this forum that deals with the product images, how to use them and how to extend it's features. Why re-invent the wheel, just follow on from what others have started.

;)