Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007
    Posts
    25
    Plugin Contributions
    0

    Default Replace product images with swf

    Hi,

    I have a question about product images, is it possible to replace jpg or gif with swf in each product image?

    Thanks

  2. #2
    Join Date
    Feb 2007
    Location
    Ferndale, MI
    Posts
    8
    Plugin Contributions
    0

    Default Re: Replace product images with swf

    yes, it definitely is. but it does take/is taking some creative coding, including a database workaround. there's an easy way and a hard/correct way:

    Here's my understanding (and I'm a weak php programmer): whenever you see an image in zencart, it is often called from the same file, located in YOURSTORE/includes/templates/template_default/templates/tpl_modules_main_product _image.php. This file calls all the database data regarding the filename for the photo, and your product display files call this file and the photo data to display the picture on the site.

    When you see a products image on the display page, it's URL is being called from the database into the tpl_modules_main_product_image.php file by whatever filename and location you gave it when you uploaded the photo to the catalog. If you go to the Admin Products section and manually type in the path of the .swf file that you want, the database will call the .swf file as the image. So yes, it is possible to have a .swf in place of your product image, and fairly easily.

    Now here's the tricky part. You have to modify your tpl_modules_main_product_image.php file to echo the proper flash movie embedding code, then call your variable (in this case, $products_image) within the code. (If you want more information on this, just post or PM me and I'll try to help you out.)

    If you correctly modify the file to read your .swf file locations and properly embed them in the product display, you're all set - the easy way. Remember, Zen Cart uses the same file to call your image in a number of different places, including thumbnails in category view, in the Featured and New products, etc. etc. I assume you still want a picture to appear in those other places - you just want the .swf on the product display page.

    That's where I am at present. My next steps are to create a new column in my products table in the database, write the proper functions, variables in my language files, etc. to properly call it.

    If/when I figure it out, I'll box it up in a contribution. but it is possible, if you want to beat me to it.

 

 

Similar Threads

  1. SWF Flash Logo to Replace existing JPG
    By limelites in forum General Questions
    Replies: 1
    Last Post: 6 Dec 2011, 12:05 AM
  2. replace item image with a swf file
    By Fireburst in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Sep 2008, 10:14 PM
  3. Flash swf files as product images
    By TracNez411 in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 31 Aug 2007, 03:18 PM
  4. replace product name text with images - possible??
    By Matt Noiseux in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 11 Oct 2006, 06:48 AM
  5. Replace image with SWF
    By ThatRonGuy in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Oct 2006, 08:43 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR