Page 1 of 2 12 LastLast
Results 1 to 10 of 60

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Posts
    47
    Plugin Contributions
    0

    Default Re: Product videos from youtube

    Quote Originally Posted by sigung View Post
    I emailed Jeremy and asked him what specifically he did to fix this. Here is his fix, I've implemented it, and it works perfectly.


    admin/product_video_youtube.php
    LINE 18
    insert your table prefix before "products_videos"
    LINE 21
    insert your table prefix before "products_videos"
    LINE 24
    insert your table prefix before "products_videos"
    includes/templates/your template/templates/tpl_modules_youtube.php
    LINE 14
    insert your table prefix before "products_videos"
    For example. The prefix for my ZenCart tables is "cart_" So mine looks like this: cart_products_videos.

    You must change both files.

    Hi Where can i finf the " Prefix for my ZenCart tables" .

    Thank you in advance

  2. #2
    Join Date
    Jun 2008
    Posts
    30
    Plugin Contributions
    0

    Default Re: Product videos from youtube

    either download a copy of your:

    includes/configure.php file or open it with the built in editor in cpanel.

    do a find for the phrase:

    define('DB_SERVER_USERNAME

    and you will come to a line that says something like this:

    define('DB_SERVER_USERNAME', '( your database prefix here )_zc1');

    so, it might look like

    define('DB_SERVER_USERNAME', 'sgspeer_zc1');

    or whatever name you set up originally when you defined your database.

  3. #3
    Join Date
    Jul 2010
    Posts
    33
    Plugin Contributions
    0

    Default 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>

  4. #4
    Join Date
    Jul 2011
    Posts
    1
    Plugin Contributions
    0

    Default 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.

  5. #5
    Join Date
    Jul 2011
    Posts
    72
    Plugin Contributions
    0

    Default Re: Product videos from youtube

    How do you add multiple videos for one product page? Please let me know thanks! :)

  6. #6
    Join Date
    Apr 2007
    Location
    in the woods
    Posts
    9
    Plugin Contributions
    0

    Default 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.

  7. #7
    Join Date
    Apr 2007
    Location
    in the woods
    Posts
    9
    Plugin Contributions
    0

    Default Re: Product videos from youtube

    In the above reply: "add another database to the mix" should read:

    add another database table to the mix

  8. #8
    Join Date
    Apr 2007
    Location
    in the woods
    Posts
    9
    Plugin Contributions
    0

    Default 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
    products_videos
    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

  9. #9
    Join Date
    Mar 2011
    Posts
    2
    Plugin Contributions
    0

    Default 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!

  10. #10
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: Product videos from youtube

    Quote Originally Posted by plalande View Post
    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.
    Last edited by buildingblocks; 24 Jul 2011 at 09:41 PM.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Embedding YouTube videos on Product pages
    By ailtait in forum General Questions
    Replies: 24
    Last Post: 23 Nov 2022, 10:56 AM
  2. v155 Default Attribute - Add from product list [Support Thread]
    By swguy in forum Addon Admin Tools
    Replies: 9
    Last Post: 6 Jul 2020, 01:13 PM
  3. v139h adding youtube videos to products - annoying error
    By kitcorsa in forum General Questions
    Replies: 1
    Last Post: 23 Jul 2013, 02:30 PM
  4. Imbedding YouTube videos into ez-pages
    By strugglingnovice in forum General Questions
    Replies: 18
    Last Post: 14 Apr 2012, 01:16 AM
  5. Is there a way to embed my youtube videos?
    By outeredge2 in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 20 Aug 2010, 02:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg