Discussions

thinking of adding embedded video into some product items

I would be interested to read if anyone as done this, if so how did you do it?

It would not be something I would want for all items, but it would be fun to perk up some items in this manner.

Posted: Feb 11, 2013

Comments

realskorpion on February 17, 2013

1. If you want to store the videos in your site you can use this module: http://drupal.org/project/video (needs some extra setup)
2. If you want to let youtube or vimeo to store your videos then you can use this module: http://drupal.org/project/video_embed_field

I prefer option 2 because you won't have to store the videos, you won't waste band width, the people can share the videos, etc.

After configure option 1 or 2 just add any of those fields to your variations types and it will be pretty much done.

Thanks,
Oscar

asperi on February 26, 2013

New to all this but I have the ecommerce pro theme (themesnap) I have modified a lot, I am on my last tweeks but getting stuck. I have the theme going good, products and everything work good, I am just trying to add a video to the product page. I can make a video page on it's own, plays fine. I have added the field to the product set up page, so now you can upload the video to the product page, but it does not show up when the page is viewed. Maybe my css from my theme is blocking it? Any help or a point in the right direction would be awesome, sorry if this is not posted in the right place. Cheers- Oh, I am using JWplayer and the jw player module -

asperi on February 26, 2013

I just have it local so I dont have a link, sorry, and I have firebug, I have only used it to click on an element and see what it is, not sure how to click ono the video when I cannot see the element but maybe there is another way. So just looking at the source or two pages, one is just a simple page, was able to add the video, the other is a product page, while looking at the edit part of the page as admin you can see the video field there, shows size, looks good, yet when you look at the page normally - no video.
Some source (sorry in know these are active pages but maybe this can help point me in the right direction)
Video test page:
<body class="html not-front not-logged-in no-sidebars page-node page-node- page-node-13 node-type-video" >
Product page:
<body class="html not-front not-logged-in no-sidebars page-node page-node- page-node-12 node-type-product" >

My test page was made with the content type I created called: Video
"Video" was added to the products page and thats where I can upload the video while in that product page but maybe this is where I went wrong, maybe I need to make a different field with the jwplay to add to the product and not a "content type"?

Other source:

Video test page:

</div></div></div><div class="field field-name-field-video field-type-file field-label-above"><div class="field-label">video:&nbsp;</div><div class="field-items"><div class="field-item even"><div class="jwplayer-video">
  <video id="a274315e1abede44d63005826249d1df" width="320" height="240" controls="controls" preload="none">
    <source src="http://localhost/ecommercepro/sites/default/files/MB4V_0.mp4" type="video/mp4" />
  </video>
</div>

Product page:
-Same line/ area in the product page I see nothing about video, infact nowhere in the code do I see video. I must not be adding it to the product page right, any suggestions? Thanks again!

asperi on February 26, 2013

Right. So it seems maybe I messed up in adding the field..?
Here is what I did, basically what this guy did: http://www.youtube.com/watch?v=mAAIfi0pYHw
Installed the JW player module and player, made a preset
Then admin> structure> add content type- named: video -in that added the field- video, type: file, save, enable display/ default
Settings - added mp4, mov, avi, then in Display> format- set to JW player. Save
Now > add content- video. This will make a page that plays video just fine on its own, but if I add the "video" to the products page it will not show on the page.
I'm a noob so I know I'm doing something wrong or the themes css is hiding it.

asperi on February 26, 2013

Sorry, I dont see anything that says Product variation.... When I add a new field in the products Manage Field page it does not give me the option to give it the format- JW player.. I only have that option when I make a new content type..

asperi on February 28, 2013

Ok, I see where the player is but it says " no video with supported format and mime type found" But it looks like you were able to get the player in. If you have a chance, can you give me a run down on your process to adding the video? Thanks!

realskorpion on February 28, 2013

Hi,

I don't see the error message that you saw.
But anyway here's the steps to add the video.

1. Install and enable the jwplayer module.
2. Go to admin/config/media/jw_player and add a new preset, let's call it "test". There you can set the videos settings.
3. Go to products -> variations types
4. Click on "manage fields" (for the variaton type that you want to have video: drinks, hats, etc)
5. Add a new field, let's call it "video" and choose "file" as field type and control (and configure the field)
6. Save the variation type
7. Click on "manage display" and then click on "full node"
8. Drag and drop the "video" field where you want it (I just put it below the product image)
9. In the format dropdown select "jw player"
10. Click the configuration button (at the right of the format dropdown)
11. On de select preset dropdown choose the one that you created at step 2.
12. Save the product variation type.
13. Edit any product of that variation type and add the video.
14. Save the product

Of course, probably you'll want to change a lot of things
but those are the basics steps to add video to your products

Thanks

realskorpion on February 28, 2013

Hi,

Yes, I just saw that. It's because I removed the module and install it again with errors
but probably you won't have that issue if you install jwplayer correctly

These are the errors with the module installation:

"...The file player.swf is not present in the directory
The file jwplayer.js is not present in the directory
Please consult INSTALL.txt for installation instructions..."

I won't fix them because I won't use that module but maybe you won't
get those errors.

Thanks

asperi on February 28, 2013

Right, I have the player installed good, I had to run a patch on it, if you do decide to use that module I made a post/ guide on patching it and getting it to work, thats here: http://www.longtailvideo.com/support/forums/jw-player/setup-issues-and-e...
What admin are you using? I dont have some of the menu options you mentioned. Like structure>content types> product- there is no option for "product variation"

realskorpion on February 28, 2013

The basic idea is to add a new video field in your product variation type of choice (go to products -> variation types, where you can edit "Bag and Cases", "Hats", etc, select the one that you want to have a video) there is where all the "magic" happens.
The steps are similar to these: http://www.drupalcommerce.org/commerce-kickstart-2/adding-taxonomy-field...
but you'll add a file field type and its display will be using the jw player.

Thanks

asperi on February 28, 2013

Seems any new field I add will not show up then the product page is viewed. Yet all the fields work and are present in the edit of the page. I have a node--product.tpl.php ..does that need to be edited to allow for the changes to be viewable?

realskorpion on February 28, 2013

Hi asperi

No, you don't need to change node--product.tpl.php (not yet, probably later)
Check the steps 8 and 9 in one of my previous posts (check every step in that post in case you missed something).
You need to go to "manage display" and make the video field visible where you need it (product list, full node, summary, etc, full node is the product details page).
Check the 2nd image in this link:
http://www.drupalcommerce.org/commerce-kickstart-2/adding-taxonomy-field...
Do you see the "manage display" tab?
There you can control what fields are visible/invisible, position, the control used to display the info, etc

Thanks

asperi on March 1, 2013

I just dont understand why this is not working. I fallowed all the steps, tried many times, I cannot add a single thing to products. I can add the fields, they show up in the Product edit page, so it seems like it should work but nothing ever displays. So frustrated.

asperi on March 1, 2013

So it seems I have been doing this right the whole time btu something in my theme is messing it up.
I just noticed this- when in the edit page for the product, if I click "preview" I can see the new field and video I added. Yet this Preview page is basic and without css. So it shows up there but not when viewed normally. I think something with the theme is blocking the new fields.