Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1. #1
    Join Date
    Mar 2008
    Posts
    7
    Plugin Contributions
    0

    Default Flash Video on Products page

    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.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Flash Video on Products page

    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

  3. #3
    Join Date
    Mar 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Flash Video on Products page

    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>

  4. #4
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Flash Video on Products page

    Thanks for sharing.. so the videos are stored in
    includes/languages/english/ss/video
    and swf files are named according to each product number?

  5. #5
    Join Date
    Mar 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Flash Video on Products page

    Yup! Then whenever a new video is needed, it just needs to have the product id at the end.

  6. #6
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Flash Video on Products page

    Very clever snippit of code there...will give it a try,
    thanks for confirming my assumption re swf code.

  7. #7
    Join Date
    May 2008
    Posts
    27
    Plugin Contributions
    0

    Default Re: Flash Video on Products page- Help, please!

    Quote Originally Posted by lqmatrix View Post
    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>
    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

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Flash Video on Products page

    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
    Quote Originally Posted by lqmatrix
    Then whenever a new video is needed, it just needs to have the product id at the end
    Maybe OP will post a bit more detail

  9. #9
    Join Date
    May 2008
    Posts
    27
    Plugin Contributions
    0

    Default Re: Flash Video on Products page

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

  10. #10
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Flash Video on Products page

    No, I am placing the code in the actual tpl_product_info_display.php file under template_default-
    You should NEVER edit the core files
    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
    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?
    No, it should be as posted to keep it dynamic for other products
    Code:
    <param name="movie" value="includes/languages/english/ss/video<?php echo $products_id_current; ?>.swf" />
    And follow the suggested location for the swf files

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v150 Flash video
    By ckelley in forum Customization from the Admin
    Replies: 1
    Last Post: 9 Aug 2012, 06:56 PM
  2. Adding Flash Player/Video to Product Info Page
    By KADesign in forum General Questions
    Replies: 1
    Last Post: 7 Apr 2009, 05:23 AM
  3. How to size flash video?
    By johnd in forum General Questions
    Replies: 1
    Last Post: 23 Mar 2009, 03:22 AM
  4. Flash video to preview product
    By dgsignal in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 May 2008, 03:36 PM
  5. Embedding Flash Video at Top of Page
    By mdlesk in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Jan 2008, 01:11 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