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
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
Last edited by swguy; 7 Apr 2013 at 05:03 PM.
Future Updates :
- access to change the size of player and color
- pull videos from other video portals
Regards,
Vj
I installed your mod and am getting the following error upon hitting the "add/update button
I'd love to be able to use this mod.Code: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
Here's the bottom of the collect_info.php file:
Thanks a lot in advance for the helpCode:<?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>
jjrmy1
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.
Never mind. I had to change the table prefixes.
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 ************
Hi,
Will this module work for version 1.3.8?
Thanks
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![]()
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:Code:$rows = mysql_num_rows($sql)
Bookmarks