Re: Product videos from youtube
Hello, if you have z-index problems add the red marked in the tpl_modules_youtube.php
<object width="<?=$dimentions[0];?>" height="<?=$dimentions[1];?>">
<param name="movie" value="http://www.youtube.com/v/<?=$youtube_id;?>"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<param name="wmode" value="opaque" />
<embed src="http://www.youtube.com/v/<?=$youtube_id;?>" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="opaque" allowfullscreen="true" width="<?=$dimentions[0];?>" height="<?=$dimentions[1];?>"></embed>
</object>
Re: Product videos from youtube
Hi
Im really new here and looking at the fix of the mysqlprefix.
Would any one tell me where do you enter the prefix like:
admin/product_video_youtube.php
LINE 18
insert your table prefix before "products_videos"
Please explaing if you can in details where and what line from the congif.php do i need to put?
Here is the prefix for me just dont know where to enter it?
define('DB_SERVER_USERNAME', 'choices2_zc1');
It would be great is some one writes both update files so just to upload them.
Many thanks in advanced.
Daniel.
Re: Product videos from youtube
How do you add multiple videos for one product page? Please let me know thanks! :)
Re: Product videos from youtube
danielnika, I'll try to help...
There are 2 files to upload and 3 ZC files to modify, along with one small sql patch.
I modified the sql patch from the original of:
CREATE TABLE IF NOT EXISTS products_videos ( id int(5) NOT NULL auto_increment, PRIMARY KEY (id), products_id int(11) NOT NULL, youtube_id text, dimentions varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
to this:
CREATE TABLE IF NOT EXISTS YOUR-DB-PREFIX_products_videos ( id int(5) NOT NULL auto_increment, PRIMARY KEY (id), products_id int(11) NOT NULL, youtube_id text, dimentions varchar(10) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE latin1_general_ci AUTO_INCREMENT=1;
Add your database prefix to products_videos in the above code. I also changed the Engine type and CHARSET type to those used in my database.
Next, add your database prefix to all references in the files to upload (product_video_youtube.php, tpl_modules_youtube.php, and collect_info.php).
Upload your files, patch the database. I moved the display code to a different location in my tpl_product_info_display.php file than recommended in the instructions and used my css to do some formatting.
I am testing it on a site I am setting up. It can be seen (for now!) at:
http://remoteworldsupply.com/index.p...&products_id=8
Using: v. 1.3.9g
Hope this helps! -john
Re: Product videos from youtube
jnb41578:
I haven't tried this, but I would think you would have to add another database to the mix, using a different table name, and duplicating the code (using that name) in your modified/added ZC files, including adding another div id="productMainImage2" to the div id="productMainImage" already there.
Re: Product videos from youtube
In the above reply: "add another database to the mix" should read:
add another database table to the mix
Re: Product videos from youtube
Hello, i'm still trying to make the addon to work I followed all the steps but I still get this error when I enter the youtube video ID.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/86/6666286/html/fx/adminurrhtcqq/product_video_youtube.php on line 19
Inserted Successfully
Can someone HELP ME PLEASE!
Re: Product videos from youtube
Quote:
Originally Posted by
plalande
Hello, i'm still trying to make the addon to work I followed all the steps but I still get this error when I enter the youtube video ID.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/86/6666286/html/fx/adminurrhtcqq/product_video_youtube.php on line 19
Inserted Successfully
Can someone HELP ME PLEASE!
I was having the same trouble until I change the engine and charset to match my database
ENGINE=MyISAM
CHARSET=utf8
this got the add/update function working and the video showing up in my product but I'm still showing the error in cache
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/user/public_html/mysite.com/zc_admin/includes/modules/product/collect_info.php on line 1020
and the video doesn't show in preview.
1 Attachment(s)
Re: Product videos from youtube
buildingblocks,
My collect_info.php has only 556 lines, even after the added code plus my modifications, yet the error message reports an error on line 1020. Unless you have added bunches of other code to this file could it be that you may have inadvertently copy/pasted the entire file into the original or perhaps the text instructions along with the needed code?
On my home server it works fine with the collation set at 'latin1_swedish_ci', but at my online host I had to change the collation to 'latin1_general_ci' for some reason before it would work.
That error makes me thimk (yes, thimk) that the sql table structure for products_videos has an error in it... should look like the attached screenshot.
Attachment 9516
Apparently the video does not show up in the 'preview' page.
Re: Product videos from youtube
Could anybody help me figure out why these won't load on my site?
I don't seem to be having any prefix issues mentioned earlier in this thread; the table shows fine in my database and I can add and update the video ids through my product editing page in the admin, but they don't display at all on my catalog page.
If I view the source of the page all that is displayed is this:
<!--bof youtube -->
<!--eof youtube -->
The tpl_modues_youtube.php template that displays the youtube vid simply isn't showing up at all for some reason. :blink: