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
Printable View
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
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:cry:
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)
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
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.
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!
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.
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
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.
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>
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.
How do you add multiple videos for one product page? Please let me know thanks! :)
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 allreferences in the files to upload (product_video_youtube.php, tpl_modules_youtube.php, and collect_info.php).Quote:
products_videos
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
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.
In the above reply: "add another database to the mix" should read:
add another database table to the mix
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.
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.
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:
Hmmm.... sounds like maybe your tpl_modues_youtube.php is in the wrong place:
../includes/templates/your_theme/templates/tpl_modues_youtube.php
is working for me, both online and at my local server. Have you edited your tpl_product_inf_display.php file to include the line
<?php require($template->get_template_dir('/tpl_modules_youtube.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_youtube.php'); ?>
AND placed it in includes/templates/your_template/templates/ ?
Thanks for your helpful reply; I've downloaded the latest version 1.3 of this mod and reinstalled everything in the correct locations and I can add all kinds of videos through the admin that are visible in the database phpMyAdmin panel, but still no love.
The /includes/templates/my template/templates/tpl_modules_youtube.php simply refuses to load into the /includes/templates/my template/templates/tpl_product_info_display.php page, no matter where I place the code. It just gets stripped out when the page loads, leaving this unhelpful bit of code behind:
<!--bof youtube -->
<!--eof youtube -->
*sigh*. I've never had this problem with a mod before - it's rather perplexing.
I've even added youtube.com to my .htaccess and crossdomain.xml files just incase it was being blocked that way, but no luck.
Oh well, thanks for the reply. I'm glad others are able to use this at least.
If anybody else is having the same issues I've had getting this mod to work, I found an alternate method to getting YouTube videos in your product page:
http://mydigitalfixation.com/how-to-add-youtube-video
It's essentially just pasting YouTube's iframe embed code directly into the product description text editor form (in HTML mode) on the product editing page in Admin.
Works fine, and you also have the added flexibility to select YouTube's extra embedding options such as using https to avoid error messages and the no-cookie viewer for increased customer privacy. :smile:
I have installed the add on to www.irishshopper.co.uk and it is working OK but it does not work on www.irishshopper.com even though it is accepting the Yourtube 11 character code OK.
The test clip we have is on the same procuct on both sites
The Plain Tweed Walking Hat
http://www.irishshopper.co.uk/ZenCar...products_id=34
Is there anyway you can get the clip to show in the middle of the Shopping Cart rather than left aligned ? I have enclosed the code in <center> and </center> but it made no difference
Hello,
Just was wondering if any of you guys have thought about making youtube video pop up in a light box...???
If yes, could you please share with me the code or module you used.
If no, I think that it's definitely worth trying.
Here are some great ideas: http://embedyoutubevideo.com/lightbo...be-joomla.html
Hi All,
could someone please tell me if this is suitable for zen cart 138.a (YouTube Video on Product Info Page)
http://www.zen-cart.com/downloads.php?do=file&id=1340 (if not could you please give me a link to one that is)
Many Thanks
Renz
Hi, I'm using zen-cart v1.3.9h. I was wondering what happens when the video ends in this addon. Does anybody know if recommended videos show up after the video ends or does the video just end and show a black screen. I do not want other recommended videos from youtube to show up on my product listing.
Thank you for your help.
Derrick
i use iframe in the html editor...
Hello All,
Does this mod work with version 1.5.0 please let me know as i'd like to have this great feature for my site. I thank you for your time and response!!
Has anyone used this with the tabbed products info addon? I can't get the video to show. There isn't an error, it just doesn't show. However, when I inspect elements in google, it only shows:
<!--bof YouTube -->
<!--eof YouTube -->
I made sure the template file is in the right directory.
This mod has been updated for Zen Cart 1.5x and PHP 5.5+.
Completely given up with this Plugin. Tried everything. Didn't work. I was hoping to get away from the iframe option but as it works I'll stick with it.
I think with this Plugin I'll wait until someone puts together an actual 'how to' that is idiot proof and easy to follow.
Version 1.5 is now available https://www.zen-cart.com/downloads.php?do=file&id=1152
Corrections to various code have been made and upgrading/installing is now easier.
I am confused reading the first instruction. You say "remove" but do not show what to remove from 1. /MY_ADMIN_NAME/product.php
Can you please explain?
------------------------------
To Do Before Upgrading
------------------------------
3 files will first need some code removed.
---
1. /ADMIN_NAME/product.php
remove the following, should be in the <head> section:
<?php //////////////////////////youtube code starts here///////////////////////// ?>
etc etc..
I am also confused also with two sets of instruction text. I have already product.php but your plugin do not have any under as you say you do ADMIN_NAME/product.php . this file 'ADMIN_NAME/product.php' is missing from your downloaded zip..
Can you please explain how to update /alter existing files little clearer?
I really want to use this and hope you can assist.
Where it says: To Do Before Upgrading
only applies if a previous version of the module has been installed
if not then safe to ignore that section
Where it says: To Do Before New Install of v1.5
applies to installing the 1.5 version
'ADMIN_NAME/product.php' is not included as that is a core file you need to edit, adding the one line that is mentioned
add:
<?php require('includes/product_videos_from_youtube/patch_product.php'); ?>
before: </body> tag
Thanks for that.
I have successfully installed to my v1.5.5e. On my products page I get nothing.
When I want to add youtube, URL is like https://www.youtube.com/watch?v=wnP8J6I8654&t=12s
So I take the ' v=wnP8J6I8654&t=12s' portion and [Add / Update]
===VIDEO INSERT DOES SHOW IN ADMIN PRODUCT INSERT PAGE AS BELOW ===========================
Product Video - Player Size 230 x 140 330 x 200 430 x 260 530 x 320
YouTube Video ID (example: X_mU1bUK0pU) : v=wnP8J6I8654&t=12s [Add / Update]
To delete the current Video, enter REMOVE (in capital letters) in the text box above and click Add/Update.
=============================
On my products page I get nothing.
I even changed the location as suggested
"before:
wherever you want the Video to show
if not sure then put before:
<!--bof Product date add:ed/available-->"
Can you please advice?
Product with video URL: http://www.qbrands.com.au/index.php?...r_of_uploads=0
NOTE: I have noticed that it makes my footer dissapear. If I take the insereted video code it comes back again. So where I need to insert seems to be very sensetive.
=== here is the tpl_product_info_display.php ===========
<?php
/**
* Page Template
* Mod > https://www.zen-cart.com/showthread....ox#post1188155
* Loaded automatically by index.php?main_page=product_info.<br />
* Displays details of a typical product
*
* @package templateSystem
* @copyright Copyright 2003-2014 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: $
*/
//require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
?>
<div class="centerColumn" id="productGeneral">
<!--bof Form start added by OAVS-->
<?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product', $request_type), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
<!--eof Form start end added by OAVS -->
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORY_ICON_DISPLAY)); ?>
<div class="wrapper bot-border">
<!--bof Prev/Next bottom position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 2 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
* display the product previous/next helper
*/
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
</div>
<div class="tie">
<div class="tie-indent">
<div class="page-content">
<!--bof Form start-->
<?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
<!--eof Form start-->
<?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>
<!--bof Category Icon -->
<?php /*
<?php if ($module_show_categories != 0) {?>
<?php
// display the category icons
require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); }
<!--eof Category Icon -->
*/ ?>
<div class="row">
<div class="main-image col-xs-12 col-sm-6">
<div id="fb-root"></div>
<!--bof Main Product Image -->
<?php
if (zen_not_null($products_image)) {
?>
<?php
/**
* display the main product image
*/
require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php
}
?>
<!--eof Main Product Image-->
<!--bof Additional Product Images -->
<?php
require(DIR_WS_MODULES . zen_get_module_directory('additional_images.php'));
?>
<?php
if ($flag_show_product_info_additional_images != 0 && $num_images > 0) {
?>
<ul id="productAdditionalImages">
<?php
require($template->get_template_dir('tpl_columnar_display_li.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display_li.php'); ?>
</ul>
<?php
}
?>
<!--eof Additional Product Images -->
<div class="video_desc">
<div class="row">
<!--bof -->
<?php echo (($flag_show_product_info_youtube == 1 && $products_youtube !='') ?
'<div id="productYouTube" class="col-xs-12 col-sm-12">
<iframe src="http://www.youtube-nocookie.com/embed/' . $products_youtube . '?rel=0&showinfo=0&fs=0" allowfullscreen></iframe></div>' : '') . "\n"; ?>
<!--eof YouTube -->
<!--bof Product description -->
<?php //if ($products_description != '') { ?>
<!--<div id="productDescription" class="description biggerText col-sm-12 col-xs-12<?php //if ($flag_show_product_info_youtube == 1 && $products_youtube !=''){?> col-sm-12 <?php //} ?>"><?php //echo stripslashes($products_description); ?></div>-->
<?php //} ?>
<!--eof Product description -->
</div>
</div>
</div>
<div class="pb-center-column col-xs-12 col-sm-6">
<!--bof free ship icon -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon -->
<h2 class="title_product"><?php echo $products_name; ?></h2>
<h3 class="sub_title"><?php echo $products_model; ?> </h3>
<!--bof Product description -->
<?php if ($products_description != '') { ?>
<div id="shortDescription" class="description"><?php echo substr(strip_tags($products_description), 0, 300) . '...' .''; ?></div>
<?php } ?>
<!--eof Product description -->
<?php
//if (!TPP_GLOBAL_EXTRA_FIELDS_ON_TAB) { //Comented by OAVS - This will display file name and the file link
if(true) {
?>
<?php if (isset($products_file_1_link) || isset($products_file_2_link) || isset($products_file_3_link) || isset($products_file_4_link) || isset($video_file_link) || isset($extra_field) || isset($text_1) ||isset($text_2) || isset($text_3) || isset($text_4)) {
echo '<div class="files"><div class="filesHead">'.TEXT_PRODUCT_MORE_INFO.'</div><ul>';
}?>
<?php if($extra_field!='') {
echo '<li>'.$extra_field . '</li>';
} ?>
<?php if($text_1!='') {
echo '<li>'. PRODUCT_TEXT_1 .' '.$text_1 . '';
}
if(isset($products_file_1_link)) {
echo ' '.$products_file_1_link . '</li>';
} ?>
<?php if($text_2!='') {
echo '<li>'. PRODUCT_TEXT_2 .' '.$text_2 . '';
}
if(isset($products_file_2_link)) {
echo ' '.$products_file_2_link . '</li>';
} ?>
<?php if($text_3!='') {
echo '<li>'. PRODUCT_TEXT_3 .' '.$text_3 . '</li>';
} ?>
<?php if($text_4!='') {
echo '<li>'. PRODUCT_TEXT_4 .' '.$text_4 . '</li>';
} ?>
<?php if(isset($products_video_link)) {
echo '<li>'.$products_video_link . '</li>';
} ?>
<?php //if(isset($products_file_1_link)) {
//echo '<li>'.$products_file_1_link . '</li>';
//} ?>
<?php //if(isset($products_file_2_link)) {
//echo '<li>'.$products_file_2_link . '</li>';
//} ?>
<?php if(isset($products_file_3_link)) {
echo '<li>'.$products_file_3_link. '</li>';
} ?>
<?php if(isset($products_file_4_link)) {
echo '<li>'.$products_file_4_link;
}
if(isset($products_file_1_link) || isset($products_file_2_link) || isset($products_file_3_link) || isset($products_file_4_link) || isset($video_file_link) || isset($extra_field)) {
echo '</ul></div>';
}
?>
<?php
}
?>
<!--eof Product description end by OAVS-->
<br class="clearBoth" />
<!--bof Product details list -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul class="instock">
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . '<strong>'.TEXT_PRODUCT_WEIGHT.'</strong>' . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . '<strong>'.TEXT_PRODUCT_MANUFACTURER.'</strong>' . $manufacturers_name . '</li>' : '') . "\n"; ?>
</ul>
<?php
}
?>
<!--eof Product details list -->
<div class="wrapper atrib"> <span class="quantity_label"><?php echo $products_quantity.TEXT_PRODUCT_QUANTITY; ?></span>
<!--bof Reviews button and count-->
<?php
if ($flag_show_product_info_reviews == 1) {
// if more than 0 reviews, then show reviews button; otherwise, show the "write review" button
if ($reviews->fields['count'] > 0 ) { ?>
<div id="productReviewLink" class="buttonRow left"><?php echo '<a class="btn-default-small" href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>'; ?></div>
<br class="clearBoth">
<p class="reviewCount"><?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?></p>
<?php } else { ?>
<div id="productReviewLink" class="buttonRow left"><?php echo '<a class="btn-add-small" href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div>
<br class="clearBoth">
<?php
}
}
?>
<!--eof Reviews button and count -->
</div>
<div class="wrapper atrib2">
<!--bof Attributes Module -->
<?php
if ($pr_attr->fields['total'] > 0) {
?>
<?php
/**
* display the product atributes
*/
require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
<?php
}
?>
<!--eof Attributes Module -->
<div class="add_to_cart_block">
<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
/*bof OAVS Removes additional zencart quantyity field box */
//if ($zv_display_select_option > 0) {
//if ($grid_records > 0) {
///////// OAVS Removed for testing bof /////
//if ($grid_records > 0) {
// bof MOD: hide the quantity box if attributes exists // only works with Attribute Grid Module.
//$the_button = '' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '<span class="buttonRow">'.zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT).'</span>'; // eof
//} elseif ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
// $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '<span class="buttonRow">'.zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT).'</span>';
//}
/////////' Removed for testing eof /////
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1 or $zv_display_select_option > 0) { // bof MOD: hide the quantity box if attributes exists // only works with Attribute Grid Module.
// hide the quantity box and default to 1
//$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '<span class="fright">'.zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT).'</span>';
$the_button = '<div class="add_to_cart_row"><strong class="fleft text2"><input type="hidden" class="form-control" name="cart_quantity" value="1" maxlength="6" size="8" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']).'</strong>' . '<span class="buttonRow">'.zen_image_submit('', BUTTON_IN_CART_ALT).'</span></div>';
}/*eof Removes additional zencart quantyity field box */
else {
// show the quantity box
$the_button = '<div class="add_to_cart_row"><strong class="fleft text2"><input type="text" class="form-control" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="8" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . zen_draw_hidden_field('products_id', (int)$_GET['products_id']).'</strong>' . '<span class="buttonRow">'.zen_image_submit('', BUTTON_IN_CART_ALT).'</span></div>';
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="prod-price">
<?php
// base price
if ($show_onetime_charges_description == 'true') {
$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span>';
} else {
$one_time = '';
}
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? '<span class="price-text">'.TEXT_BASE_PRICE.'</span>' : '') . zen_get_products_display_price((int)$_GET['products_id']);
?>
</div>
<div class="clearfix"></div>
<?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->
</div>
</div>
<div id="button_product">
<?php
echo $display_button;
echo $display_qty;
?>
</div>
<!-- bof Social Media Icons -->
<?php if(TM_SOCIAL_BLOCK_STATUS == 'true') { ?>
<ul id="social">
<?php if(TM_SOCIAL_BLOCK_STATUS_FB == 'true') { ?>
<li class="facebook"><fb:like send="false" layout="button_count" width="150" show_faces="false"></fb:like></li>
<?php } ?>
<?php if(TM_SOCIAL_BLOCK_STATUS_PN == 'true') { ?>
<li class="pinterest"><a href="http://pinterest.com/pin/create/button/?url='. urlencode(zen_href_link(zen_get_info_page($_GET['products_id']), 'cPath=' . $_GET['cPath'] . '&products_id=' . $_GET['products_id']) ).'&media=' . urlencode(HTTP_SERVER . DIR_WS_CATALOG . $products_img) . '&description=' . rawurlencode($products_name) . '" class="pin-it-button"><img src="//assets.pinterest.com/images/PinExt.png" title="Pin It" alt=""></a></li>
<?php } ?>
<?php if(TM_SOCIAL_BLOCK_STATUS_TW == 'true') { ?>
<li class="twitter"><a href="https://twitter.com/share" class="twitter-share-button fleft">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></li>
<?php } ?>
<?php if(TM_SOCIAL_BLOCK_STATUS_GO == 'true') { ?>
<li class="google"><div class="g-plusone" data-size="medium"></div></li>
<?php } ?>
</ul>
<?php } ?>
<!-- eof Social Media Icons -->
</div>
</div>
<!--bof Quantity Discounts table -->
<?php
if ($products_discount_type != 0) { ?>
<?php
/**
* display the products quantity discount
*/
require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
<?php
}
?>
<!--eof Quantity Discounts table -->
<!--bof also related products module-->
<?php require($template->get_template_dir('tpl_modules_related_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_related_products.php');?>
<!--eof also related products module-->
<br />
<div class="text2">
<p class="reviewCount"><strong><?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?></strong></p>
<?php //////////////////////////OAVS youtube code begins here/////////////// ?>
<?php // boc product video
if ($sniffer->table_exists(TABLE_PRODUCTS_VIDEOS) && (defined('PRODUCT_VIDEOS_STATUS') && PRODUCT_VIDEOS_STATUS == 'true')) {
require($template->get_template_dir('/tpl_modules_youtube.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_youtube.php');
}
// eoc product video
?>
<?php //////////////////////////OAVS youtube code ends here/////////////// ?>
<!--bof Product date added/available-->
<?php
if ($products_date_available > date('Y-m-d H:i:s')) {
if ($flag_show_product_info_date_available == 1) {
?>
<p id="productDateAvailable" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_AVAILABLE, zen_date_long($products_date_available)); ?></p>
<?php
}
} else {
if ($flag_show_product_info_date_added == 1) {
?>
<p id="productDateAdded" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_ADDED, zen_date_long($products_date_added)); ?></p>
<?php
} // $flag_show_product_info_date_added
}
?>
<!--eof Product date added/available -->
<!--bof Product URL -->
<?php
if (zen_not_null($products_url)) {
if ($flag_show_product_info_url == 1) {
?>
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php
} // $flag_show_product_info_url
}
?>
<!--eof Product URL -->
</div>
<!--bof also purchased products module-->
<?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>
<!--eof also purchased products module-->
<!--bof Form close-->
</form>
<!--bof Form close-->
</div>
</div>
</div>
</div>
Your YouTube video ID is wnP8J6I8654 - so that is all you need to insert.
To find out your video ID go to your video on youtube.com
Underneath the red 'Subscribe' button you will see a link/image named 'Share'
Click the link to see ID, it shown after https://youtu.be/
Hi
Yes I tried wnP8J6I8654 as well but some reason after entering the code below in the tpl_product_info_display.php,
===VIDEO INSERT DOES SHOW IN ADMIN PRODUCT INSERT PAGE AS BELOW ===========================
Product Video - Player Size 230 x 140 330 x 200 430 x 260 530 x 320
YouTube Video ID (example: X_mU1bUK0pU) : v=wnP8J6I8654&t=12s [Add / Update]
To delete the current Video, enter REMOVE (in capital letters) in the text box above and click Add/Update.
=============================
PROBLEM OCCURS:
1. Page footer dissapears (as your code entered just before <!--bof Product date added/available--> and also before my page footer code.
2. YouTubeVideo does not show in the http://www.qbrands.com.au/index.php?...r_of_uploads=0 .
If you kindly look/serach at the code below I supplied you will see your code right below the
<?php //////////////////////////OAVS youtube code begins here/////////////// ?>
...your you tube code
Yes thank you for reminding me again and I did use the code as you advised as 'wnP8J6I8654'
Problem is it is not showing in the tpl_product_info_display.php page due the reasons explained my previous post.
Here is the problem again.
PROBLEM OCCURS:
1. Page footer dissapears (as your code entered just before <!--bof Product date added/available--> and also before my page footer code.
2. YouTubeVideo does not show on the page >>> http://www.qbrands.com.au/index.php?...r_of_uploads=0 .
after entering your code ...your you tube code
<?php //////////////////////////youtube code begins here/////////////// ?>
<?php // boc product video
if ($sniffer->table_exists(TABLE_PRODUCTS_VIDEOS) && (defined('PRODUCT_VIDEOS_STATUS') && PRODUCT_VIDEOS_STATUS == 'true')) {
require($template->get_template_dir('/tpl_modules_youtube.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_youtube.php');
}
// eoc product video
?>
<?php //////////////////////////youtube code ends here/////////////// ?>
<!--bof Product date added/available-->
If you kindly look/search at the complete code in the file tpl_product_info_display.php below I supplied in my previous post below you can see its exact positioning.
Did you enable the module as mentioned in the readme.txt? (it is disabled by default)
Are you seeing any error log files in the 'logs' dir. related to this problem?
It also looks like there is incorrect coding on your 'tpl_product_info_display.php'
If you remove all the module code, does the footer show?
remove
Also, did you previously have this module installed?Code:<?php //////////////////////////OAVS youtube code begins here/////////////// ?>
<?php // boc product video
if ($sniffer->table_exists(TABLE_PRODUCTS_VIDEOS) && (defined('PRODUCT_VIDEOS_STATUS') && PRODUCT_VIDEOS_STATUS == 'true')) {
require($template->get_template_dir('/tpl_modules_youtube.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_youtube.php');
}
// eoc product video
?>
<?php //////////////////////////OAVS youtube code ends here/////////////// ?>
Did you enable the module as mentioned in the readme.txt? (it is disabled by default) : YES I have enabled it.
Are you seeing any error log files in the 'logs' dir. related to this problem? : No and there is no log file.
On the page code view I can see the video code.
When page loads first time IO can see in a flash at the bottom of the product image ...swf icon ..that' all
<!-- ////////////////////////// youtube code begins here/////////////// -->
<br>
<div class="centeredContent">
<object data="movie.swf" type="application/x-shockwave-flash" width="330" height="200">
<param name="movie" value="https://www.youtube-nocookie.com/embed/wnP8J6I8654">
<embed src="https://www.youtube-nocookie.com/embed/wnP8J6I8654" width="330" height="200">
</object>
</div>
<br>
<!-- ////////////////////////// youtube code ends here/////////////// -->
<!--bof Product date added/available-->
You have a lot of coding errors on your Product Info pages which need to be corrected.
For example, before the module code there are 3 unclosed DIV tags.
Unclosed element div.
From line 642, column 7; to line 642, column 32
<div class="page-content">
Unclosed element div.
From line 641, column 5; to line 641, column 28
<div class="tie-indent">
Unclosed element div.
From line 640, column 3; to line 640, column 19
<div class="tie">
Your current problems with the module not displaying are not related to the module code but to the other coding errors. The module code itself works fine but when there are a lot of coding errors, they need to be corrected first.
I have removed the plugin sorry. Too many file changes just add a video.
Find a simpler solution.
http://www.qbrands.com.au/index.php?...roducts_id=311
Thank you for guiding through. Much appreciated.
Using version 1.5.4, all installed, and video turned on in admin, when I enter the code in the video id in the product description it doesn't stay there after Add/Update, refreshes and won't show any video on product page. looked at logs, no related errors (I only get a php warning: PHP Warning: htmlspecialchars(): charset `iso-8559-1' not supported, assuming utf-8 in, but that wouldn't have to do with it?)