Jump to content

Adding Flash .swf file as logo in PrestaShop 1.5


GraveDigger101

Recommended Posts

I am new to PrestaShop and attempting to make some modifications to the default template (copied as another template so I don't messup the original).

 

I have a flash .swf file which is an animated movie clip of my logo. How do I replace the standard logo with my flash file?

 

I saw a post in the forums area from back in 2009 but I belive the code and files being referenced have changed in PrestaShop 1.5

 

Can someone provide me the exact code example and explanation of the changes I need to make for version 1.5?

 

I hope this development area is the correct location for this request.

 

 

Thanks

Link to comment
Share on other sites

in this case you have to edit the header.tpl file located in your theme directory. But before you open it - upload your swf file - it must be online.

 

okay, so in the header.tpl file you've got:

<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
 <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />
   </a>

 

insted this code, use your code with flash .swf file

Link to comment
Share on other sites

in this case you have to edit the header.tpl file located in your theme directory. But before you open it - upload your swf file - it must be online.

 

okay, so in the header.tpl file you've got:

<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
 <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />
</a>

 

insted this code, use your code with flash .swf file

 

I can see that this is overriding the normal core functionality of displaying the logo.

 

You stated to "use your code with flash .swf file". Please clarify. This is a broad statement.

 

1. Should all the code be replaced? if not, what information should be modified?

2. Do I replace all the code with normal html execution of a .swf file?

 

Can you provide an example of modified code? (can you use the name "sample.swf" as the flash file name)

Link to comment
Share on other sites

well, this is not kind of "override" it's a just template modification

 

1) yes, in this case you should remove the code. you can also comment it with {* *} tags, example

 

{*
<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
	 <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />
</a>
*}

 

2) example of the flash code

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="468" height="60"  id="mymoviename">
<param name="movie"  value="example.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="example.swf" quality="high" bgcolor="#ffffff" width="468" height="60" name="mymoviename" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Hi

 

I need to add a slideshow in swf file, in my home text editor...

All the attempt i have tried are not working, i am new in flash and i probably miss to do something too  so i am seeking help ...

 

I give you the link to the tuto i am following to add my slideshow in my shop: http://www.flshow.net/dokuwiki/doku.php?id=carousel:carousel_101

 

I add everything on the folder "shop" knowing that to access to the shop in my website it's www.mfsuccess.net/shop

 

So far no luck nothing works :S

 

Thank you for your help i really love that slideshow and i really want it to be install on the shop not on my website. 

 

Irene

Link to comment
Share on other sites

Hi Vekia

 

The code ... yes of course 

 

here the code for the images :

 

<?xml version="1.0" encoding="utf-8"?>
 
<!--
flShow Carousel 2.0 configuration file
Please visit http://www.flshow.net/ for more info
-->


<slide_show>
<options>
<background>transparent</background> <!-- #RRGGBB, transparent -->
</options>


<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs1.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs2.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs3.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs4.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs5.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs6.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs7.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs8.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs9.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs10.jpg</photo>
<photo href="http://www.mfsuccess.net/shop" target="_self">./image/mfs11.jpg</photo>
</slide_show>

And here the code to reach the image files :

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<div class="container">
  <div id="mySlideShowDiv">This slideshow requires Adobe Flash Player 9 and JavaScript enabled.</div>
</div>
<script type="text/javascript">
  swfobject.embedSWF("http://www.mfsuccess.net/shop/Carousel.swf",  // flash file
    "mySlideShowDiv",   // div id
    "750", "550",  // width and height
    "9.0.0",       // flash palyer version
    false,         // autoinstall 
    {xmlfile:"default.xml", loaderColor:"#0000FF"},  // flashvars
    {bgcolor: "#CCCCCC"},  // parameter
    {});                   // attributes
</script>
</body>
</html>
I put the swf file on the  : .../shop and also my image folder too : .../image/mfs1.jpg
 
Then i add the second code  i past in here ( html one) in my home text editor and save it but in my shop it shows the image links  but not the images ... I probably miss something somewhere
 
Thanks for your prompt response i hope to resolve that issue today
 
Irene

 

Link to comment
Share on other sites

  • 4 months later...

Hello every one, I added logo.svf file, everything looks fine exept on older IE browsers.

code

<!-- Header -->
			<div id="header" class="grid_9 alpha omega">
				<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="980px" height="136px"  id="{$shop_name|escape:'htmlall':'UTF-8'}">
<param name="{$shop_name|escape:'htmlall':'UTF-8'}"  value="logo" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="../img/logo.swf" quality="high" bgcolor="#ffffff" width="980px" height="136px" name="{$shop_name|escape:'htmlall':'UTF-8'}" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>

Maybe some one already had problems with what.

http://www.akvakomfortas.lt

Edited by apastalas (see edit history)
Link to comment
Share on other sites

  • 2 months later...

So about html5 I used VideoJs player, but there is a problem. I changed header.tpl file. Here is code:

<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
					<!-- Chang URLs to wherever Video.js files will be hosted -->
					<link href="video-js.css" rel="stylesheet" type="text/css">
					<!-- video.js must be in the <head> for older IEs to work. -->
					<script src="video.js"></script>
					<!-- Unless using the CDN hosted version, update the URL to the Flash SWF -->
				<script>
				videojs.options.flash.swf = "video-js.swf";
				</script>				
				<video id="header_logo" class="video-js vjs-default-skin" preload="none" autoplay="true" loop="true"
				data-setup="{}">
				<source src="http://www.akvakomfortas.lt/img/logo.mp4" type='video/mp4' />
    <source src="http://www.akvakomfortas.lt/img/logo.webm" type='video/webm' />
    <source src="http://www.akvakomfortas.lt/img/logo.ogv" type='video/ogg' />
  </video>

				</a>
                                    </div> 

so everything looks fine, but as in exmples in VideoJs I typed

data-setup='{"example_option":true}'>

then website did't load, I removed

"example_option":true

the page gets loaded, but logo doesn't show on cell phones. Does it possible to fix it?

Edited by apastalas (see edit history)
Link to comment
Share on other sites

HTML5 gives problems with older browsers, like old IE versions as it's not supported (of course)

 

Another option is to convert the flash animation to gif format.

 

gif is widely supported by as far as I know all browsers (all the way back to Netscape Navigator and even (later versions of) the mosaic... :-)  )

 

http://technewsreview.overblog.com/best-5-swf-to-gif-converters-for-mac-and-windows

 

It may create a bigger file however, so check the size before using this.

 

My 2 cents,

pascal

Link to comment
Share on other sites

  • 1 year later...

Hi, I would like to insert an animated banner (.swf or video) to the right side of the home main banner (instead of the two static banners). What is the best way to do that? I tried to insert a .gif format but for some reason it become a static picture.

Please let me know.

I'd appreciate it

Thanks

 

p.s. I'm using Prestashop 1.6

Edited by lizanta (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...