Forums / All Other Contributions/Addons / Product videos from youtube [Support Thread]

Product videos from youtube [Support Thread]

Views: 18,800

Results 1 to 20 of 60
24 Aug 2010, 1:42 PM
#1
info1 avatar

info1

New Zenner

Join Date:
Aug 2010
Posts:
2
Plugin Contributions:
1

Product videos from youtube [Support Thread]

Hello mates,
Thanks for choosing this addon. if you experience any problems regarding the addon 'PRODUCT VIDEOS FROM YOUTUBE' please post here. I can help you.

Link to Plugin: http://www.zen-cart.com/downloads.php?do=file&id=1152

Regards,
VJ

24 Aug 2010, 1:55 PM
#2
info1 avatar

info1

New Zenner

Join Date:
Aug 2010
Posts:
2
Plugin Contributions:
1

Re: Product videos from youtube [Support Thread]

Future Updates :

  • access to change the size of player and color
  • pull videos from other video portals

Regards,
Vj

Regards,
VJ

9 Nov 2010, 4:29 AM
#3
jjrmy1 avatar

jjrmy1

New Zenner

Join Date:
Apr 2010
Posts:
23
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

I installed your mod and am getting the following error upon hitting the "add/update button

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/jjrmy1/public_html/bpthingsbackoffice/update.php on line 18
Inserted Successfully

I'd love to be able to use this mod.
Here's the bottom of the collect_info.php file:

<?php
    }
?>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_weight', $pInfo->products_weight); ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_SORT_ORDER; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_sort_order', $pInfo->products_sort_order); ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
<?php
		//////////////////////////youtube code starts here///////////////////////// ?> 
		<tr>
				<td bgcolor="#e5e5ff">Select Video Player Size</td>
				<td bgcolor="#e5e5ff"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15');?>
				<label>
				  <input type="radio" name="vsize" value="320x240" checked="checked" />320 x 240 </label>
				
				  <label>
				  <input type="radio" name="vsize" value="560x340" />560 x 340</label>
				    
				  <label>
				  <input type="radio" name="vsize" value="640x385" />640 x 385</label>
				
				  <label>
				  <input type="radio" name="vsize" value="853x505" />853 x 505</label>
				    
				  <label>
				  <input type="radio" name="vsize" value="1280x745" />1280 x 745</label>
				</td>
			</tr>
			<tr>
			      <td colspan="2" bgcolor="#e5e5ff"><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
			</tr>
          <tr>
            <td class="main" vaign="top" bgcolor="#e5e5ff">
			<?php 
				$sql = mysql_query("select youtube_id from products_videos where products_id = \"$pid\" ");
					if(mysql_num_rows($sql)){
						$row = mysql_fetch_array($sql);
						$youid = "value=".$row['youtube_id'];
					}
					else{
						$youid = "";
					}
				
				echo "Youtube Video Id"; ?> ex: '6cKIPvfvxKo'</td>
            <td class="main" bgcolor="#e5e5ff"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15');?><input type="text" id="youtube_id" <?=$youid?> /> 
			<span style="background-color:#d1f5ff; border:solid 1px #89c0d0; padding:3px;"><a href="javascript:void(0)" style="text-decoration:none;" onclick="loadXMLDoc()">Add / Update</span> </a><br><?php echo zen_draw_separator('pixel_trans.gif', '24', '18');?>
			<div id="myDiv"></div>
          </tr>
	
	<?php
		//////////////////////////youtube code ends here///////////////////////// ?>
      <tr>
        <td class="main" align="right"><?php echo zen_draw_hidden_field('products_date_added', (zen_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . ( (isset($_GET['search']) && !empty($_GET['search'])) ? zen_draw_hidden_field('search', $_GET['search']) : '') . ( (isset($_POST['search']) && !empty($_POST['search']) && empty($_GET['search'])) ? zen_draw_hidden_field('search', $_POST['search']) : '') . zen_image_submit('button_preview.gif', IMAGE_PREVIEW) . '  <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . ( (isset($_GET['search']) && !empty($_GET['search'])) ? '&search=' . $_GET['search'] : '') . ( (isset($_POST['search']) && !empty($_POST['search']) && empty($_GET['search'])) ? '&search=' . $_POST['search'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
      </tr>
    </table></form>

Thanks a lot in advance for the help
jjrmy1

10 Nov 2010, 2:55 AM
#4
jjrmy1 avatar

jjrmy1

New Zenner

Join Date:
Apr 2010
Posts:
23
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

I manually input the values into the database and no video shows on the product page. Sounds like it would be a great mod but it does need some work. The database input doesn't work, neither does the display. installed according to the directions.

11 Nov 2010, 3:00 PM
#5
jjrmy1 avatar

jjrmy1

New Zenner

Join Date:
Apr 2010
Posts:
23
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

Never mind. I had to change the table prefixes.

25 Nov 2010, 7:32 PM
#6
flexiblelove avatar

flexiblelove

New Zenner

Join Date:
Nov 2010
Posts:
4
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

info1:

Future Updates :

  • access to change the size of player and color
  • pull videos from other video portals

Regards,
Vj

Great add-on! Terribly easy to install and a wonderful addition to my site! Thanks very much!

flexiblelove.ca

27 Nov 2010, 2:36 AM
#7
pcsdesign avatar

pcsdesign

Inactive

Join Date:
Nov 2010
Posts:
21
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

Copied this codde to the SQL patch - results below

<?php $sql = mysql_query("select youtube_id, dimentions from products_videos where products_id = \"$pid\" "); if(mysql_num_rows($sql)){ $row = mysql_fetch_array($sql); $youid = $row['youtube_id']; $dimentions = $row['dimentions']; }else{ $youid = ""; } ?> <tr><td colspan="2"><?php echo zen_draw_separator('pixel_black.gif', '100%', '3'); ?></td></tr> <tr> <td bgcolor="#e5e5ff">Select Video Player Size</td> <td bgcolor="#e5e5ff"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15');?> <label><input type="radio" name="vsize" value="230x140" <?php if($dimentions=="230x140"){ echo "checked=\"checked\""; }?>/>230 x 140</label> <label><input type="radio" name="vsize" value="330x200" <?php if($dimentions=="330x200"){ echo "checked=\"checked\""; }?>/>330 x 200</label> <label><input type="radio" name="vsize" value="430x260" <?php if($dimentions=="430x260"){ echo "checked=\"checked\""; }?>/>430 x 260</label> <label><input type="radio" name="vsize" value="530x320" <?php if($dimentions=="530x320"){ echo "checked=\"checked\""; }?>/>530 x 320</label> </td> </tr> <tr><td colspan="2" bgcolor="#e5e5ff"><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td></tr> <tr> <td class="main" vaign="top" bgcolor="#e5e5ff">Youtube Video Id ex: '6cKIPvfvxKo'</td> <td class="main" bgcolor="#e5e5ff"> <?php echo zen_draw_separator('pixel_trans.gif', '24', '15');?> <input type="text" id="youtube_id" value="<?=$youid;?>" /> <span style="background-color:#d1f5ff; border:solid 1px #89c0d0; padding:3px;"> <a href="javascript:void(0)" style="text-decoration:none;" onclick="loadXMLDoc()">Add / Update</a> </span> <br> <?php echo zen_draw_separator('pixel_trans.gif', '24', '18');?> <div id="myDiv"></div> </td> </tr>

************** Results ******************
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'in:
[<?php $sql = mysql_query("select youtube_id, dimentions from products_videos where products_id = "$pid" ");]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
*** End of Results ************

7 Dec 2010, 3:20 AM
#8
essentiality avatar

essentiality

New Zenner

Join Date:
Dec 2010
Posts:
1
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

Hi,

Will this module work for version 1.3.8?

Thanks

14 Jan 2011, 1:32 AM
#9
hollywood691 avatar

hollywood691

New Zenner

Join Date:
Jan 2011
Posts:
58
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

the directions say: admin/includes/modules/product/collect_info.php and go to end of the last but one table and paste the following code after this:

what in the world does:" go to the end of the last but one table mean?

I am confused - I dont know what the end of the last but one table is:cry:

14 Jan 2011, 2:09 AM
#10
hollywood691 avatar

hollywood691

New Zenner

Join Date:
Jan 2011
Posts:
58
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

I got it......but am getting an error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /xxxx/xxxxx/xxxxx/xxxxx/myadminfolder/product_video_youtube.php on line 19
Inserted Successfully

this is the line at 19:```
$rows = mysql_num_rows($sql)

6 Apr 2011, 10:57 PM
#11
sigung avatar

sigung

New Zenner

Join Date:
Jun 2008
Posts:
30
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

jjrmy1:

Never mind. I had to change the table prefixes.

I am struggling to get this to work, what did you mean you had to change the table prefiixes? What tables are you talking about and what did you change them to please?

6 Apr 2011, 10:59 PM
#12
sigung avatar

sigung

New Zenner

Join Date:
Jun 2008
Posts:
30
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

Hollywood691:

the directions say: admin/includes/modules/product/collect_info.php and go to end of the last but one table and paste the following code after this:

what in the world does:" go to the end of the last but one table mean?

I am confused - I dont know what the end of the last but one table is:cry:

What he means is go to the next to the last table and insert the code there. Good luck getting it to work, though. All I get are sql errors..

6 Apr 2011, 11:02 PM
#13
sigung avatar

sigung

New Zenner

Join Date:
Jun 2008
Posts:
30
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

info1:

Hello mates,
Thanks for choosing this addon. if you experience any problems regarding the addon 'PRODUCT VIDEOS FROM YOUTUBE' please post here. I can help you.

Okay I'm posting here. All I get after installing according to instructions is this when I try to add a video ID

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/myusername/public_html/admin/product_video_youtube.php on line 19
Inserted Successfully

7 Apr 2011, 2:35 AM
#14
sigung avatar

sigung

New Zenner

Join Date:
Jun 2008
Posts:
30
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

jjrmy1:

Never mind. I had to change the table prefixes.

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.:clap:

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.

25 Apr 2011, 1:50 AM
#15
ubique17 avatar

ubique17

New Zenner

Join Date:
Aug 2010
Location:
BrisVegas
Posts:
18
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

Brilliant, works well - thanks for this. Especially like how easy it is to place to a specific point within the page, certainly beats the hard coding like I was doing for every clip previous to this!

25 Apr 2011, 2:10 AM
#16
sigung avatar

sigung

New Zenner

Join Date:
Jun 2008
Posts:
30
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

You're quite welcome. I followed the original parts of this thread and found the one reference to how he got it to work, but it was too vague to be useful. Contacted him directly through his zen cart contact page and he was kind enough to respond with specifics. Thought it might be a good idea to let everyone else in on it. Glad I could help in some small way.

3 May 2011, 6:29 PM
#17
kencor1 avatar

kencor1

New Zenner

Join Date:
Aug 2010
Posts:
26
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

I tried to use this mod but I could not get the video to display on the product page. I applied all of the fixes listed here, everything seems to load fine but nothing shows up on the product page. Does anyone have any ideas?

Thanks
Tom

3 May 2011, 9:08 PM
#18
sigung avatar

sigung

New Zenner

Join Date:
Jun 2008
Posts:
30
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

kencor1:

I tried to use this mod but I could not get the video to display on the product page. I applied all of the fixes listed here, everything seems to load fine but nothing shows up on the product page. Does anyone have any ideas?

Thanks
Tom

Can you be more specific in regards to the statement "everything seems to load fine" What exactly is loading?

10 May 2011, 5:53 AM
#19
sgspeer avatar

sgspeer

New Zenner

Join Date:
Aug 2010
Posts:
47
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

sigung:

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.:clap:

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

10 May 2011, 7:40 AM
#20
sigung avatar

sigung

New Zenner

Join Date:
Jun 2008
Posts:
30
Plugin Contributions:
0

Re: Product videos from youtube [Support Thread]

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.