Hey I am having trouble figuring out how to add a different video on each product page. I was successful in embedding one into the home page but don't know enough php to go any further. Any ideas? Any help would be greatly appreciated.
Hey I am having trouble figuring out how to add a different video on each product page. I was successful in embedding one into the home page but don't know enough php to go any further. Any ideas? Any help would be greatly appreciated.
Using flash is mostly html and js so if you have onew on you home page you have the js thing squared.
Just include the image code in the product description area where you want it - before the text - middle of the text or after
Ight so I figured it out, basically what I did was insert my flash code into the tpl_product_info_display.php page and then concatenated the product id onto the end of the swf file. This enables you to have a unique video playing based on each product id. So my code looked like this:
<object type="application/x-shockwave-flash" data="includes/languages/english/ss/video<?php echo $products_id_current; ?>.swf" width="368px" height="280px">
<param name="movie" value="includes/languages/english/ss/video<?php echo $products_id_current; ?>.swf" />
<param name="quality" value="high"><param name="BGCOLOR" value="#000000">
<param name="menu" value="false">
</object>
Thanks for sharing.. so the videos are stored in
and swf files are named according to each product number?includes/languages/english/ss/video
Yup! Then whenever a new video is needed, it just needs to have the product id at the end.
Very clever snippit of code there...will give it a try,
thanks for confirming my assumption re swf code.
![]()
Can someone help me out here? I am new at php coding in zen cart-
Where does the product id actually go?
And does the .swf file name need to be the id number to match, ex.) id33.swf
I am assuming the flash file name would go before the .swf-
I have tried adding the name of my flash file before the .swf in both places and only get a black box where the flash file should be showing. I have added the ss/video folders, and my flash file is located under the video folder.
Any help would be greatly appreciated! Thanks to all in advance!!
Miranda
Mir13,
Are you placing this code in a copy of your tpl_product_info_display.php file?
The code allows for a dynamic pointing and your swf's are stored in
includes/languages/english/ss/video folder that you create
Your swf's are named with the product ID
Maybe OP will post a bit more detailOriginally Posted by lqmatrix
Thanks for the quick reply!
No, I am placing the code in the actual tpl_product_info_display.php file under template_default-
So if my product id was 33, this section of code needs to look like:
<param name="movie" value="includes/languages/english/ss/video<?php echo $products_id_current; ?>33.swf" />
The whole php echo part is confusing to me-
Does that part of the code need to be edited to match the file name or is that just code pulling the product by it's id?
Thank you!!!!
You should NEVER edit the core filesNo, I am placing the code in the actual tpl_product_info_display.php file under template_default-
https://www.zen-cart.com/tutorials/index.php?article=36
https://www.zen-cart.com/tutorials/i...hp?article=232
https://www.zen-cart.com/tutorials/i...hp?article=142
No, it should be as posted to keep it dynamic for other productsDoes that part of the code need to be edited to match the file name or is that just code pulling the product by it's id?
And follow the suggested location for the swf filesCode:<param name="movie" value="includes/languages/english/ss/video<?php echo $products_id_current; ?>.swf" />