Flash SWF file for product image

  • Posts: 29
  • Thank you received: 2
13 years 6 months ago #20666

Learning HikaShop and loving it!

Client wants to use a SWF file for the initial image on the product page but have a regular image for the product default. Is there a way to add a swf file to the image gallery?

If so, then can I have any swf file be positioned ahead of all other images? That way the default image on a product will be a regular graphic but if the product has a swf file uploaded, it becomes the initial item viewed in the gallery.

I'm trying to avoid having the swf file AND a separate gallery. Visually that gets cluttered (as if the spinning product isn't distracting enough.)

Please Log in or Create an account to join the conversation.

  • Posts: 83050
  • Thank you received: 13410
  • MODERATOR
13 years 6 months ago #20668

The image gallery can only contain images because the browsers and the PHP GD library do not handle SWF resizing.
You could try to add the extension swf to the list of valid image extensions and deactivate the thumbnails in the tab Files of the configuration. That might do the trick but you will loose the thumbnails of the products listing and the display on the product pag might not be what you want...

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 2
13 years 6 months ago #20674

That's what I figured. I tried that and it's not going to work for me.

I was considering uploading the swf to the file attachments section. Is it possible to parse out the swf files before displaying the downloads section? Then I could display the swf in the product template and still have other files available for download.

I am NOT someone who can code this so I'm hoping someone might be able to help out. If there's an easier way that perhaps I can accomplish, I'd love some ideas.

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 83050
  • Thank you received: 13410
  • MODERATOR
13 years 6 months ago #20690

It's possible but you will indeed have to add code in the view file in order to handle it so it's not easy to do and definitely requires programming skills.

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 2
13 years 6 months ago #20733

I can probably manage to modify existing code to do this. The problem for me is I'm new to the MVC structure and don't have a grasp on just what part to modify or where to put it when I do. There also seems to be some inconsistency to how it is done by different companies.

In once instance I was able to duplicate and entire page as a template override and just make minor changes. But for another extension, doing the same process broke it since for them I could only override the function, not the whole page. Then different places use different paths to where to place the files. There may be some logic to it, but as yet, I've not grasped it.

If I want to make an override to parse out swf files, what file do I need to duplicate and to where. (mytemplate/html/???)

I'm willing to try.

Please Log in or Create an account to join the conversation.

  • Posts: 83050
  • Thank you received: 13410
  • MODERATOR
13 years 6 months ago #20750

With HikaShop, you can override any view via the menu Display->Views. Your modifications will be saved automatically in your template folder.
In your case, you would have to override the file "show" of the view "product".

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum