X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Flash in X-cart (https://forum.x-cart.com/showthread.php?t=38253)

ricardomz 03-12-2008 11:20 AM

Flash in X-cart
 
Hello friends,

I think this is a common question, but How I can add a flash animation in my X-cart store?

Thankyou! :D

balinor 03-12-2008 11:39 AM

Re: Flash in X-cart
 
Where would you like to add it?

AG9V 03-12-2008 11:49 AM

Re: Flash in X-cart
 
It's not that difficult... just a matter of editing the skin1/customer/main/welcome.tpl file...

The only tough part is getting the swf file to play nice with IE7. Dreamweaver CS3 took care of that for me...

**Good one, balinor... I guess it would be helpful to know where the animation were to go... I just assumed storefront...**

ricardomz 03-12-2008 12:29 PM

Re: Flash in X-cart
 
Dear friends, thanks for your replys..

Yes I'd like to change the welcome image for a swf animation, my question is.. I only have to put the swf code instead of the img code?

http://industrialdecerraduras.com/catalogo/home.php

The image I would like to change is http://industrialdecerraduras.com/catalogo/skin1/images/customer_images/welcome.jpg for a swf file..

Thankyou so much

Regards!

AG9V 03-12-2008 12:51 PM

Re: Flash in X-cart
 
The welcome image is loaded from this tempate: skin1/customer/main/welcome.tpl so you will need to edit this file. I recommend backing up first. :)

Quote:

<h3>{$lng.lbl_welcome_to|substitute:"company":$lng .lbl_site_title}</h3>
{else}
<h3>{$lng.lbl_welcome_to|substitute:"company":$con fig.Company.company_name}</h3>
{/if}
{$lng.txt_welcome}
<br />

In my site I remarked out the code including lbl_site_title and txt_welcome and used Dreamweaver CS3 to insert my swf animation code:

Quote:

<center>
<p>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','width','300','heigh t','400','src','{ImagesDir}/front','scale','exactfit','quality','high','bgcolo r','#FFFFFF','movie','{ImagesDir}/front' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="400">
<param name="movie" value="{ImagesDir}/front.swf">
<param name="quality" value="high"><param name="BGCOLOR" value="#FFFFFF"><param name="SCALE" value="exactfit">
<embed src="{ImagesDir}/front.swf" width="300" height="400" scale="exactfit" quality="high" type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>
</object>

You will have to play with your template file due to the layout of your store, but it should not be too difficult at all.

balinor 03-12-2008 03:14 PM

Re: Flash in X-cart
 
Note - {ImagesDir} should be {$ImagesDir}

AG9V 03-12-2008 03:25 PM

Re: Flash in X-cart
 
You're right... but what has me scratching my head is why it works? I never noticed that before...

kube 03-12-2008 03:28 PM

Re: Flash in X-cart
 
And perhaps a closing tag for <noscript> (or having noscript at all)

kube 03-12-2008 03:30 PM

Re: Flash in X-cart
 
Regarding why it works: Are the .swfs in your images directory? Might be one reason? ({ImagesDir} will not appear at all it will be blank)

Macy 04-06-2008 11:15 PM

Re: Flash in X-cart
 
I have tried following the instructions in this thread. However, I have had no success. The problem is I do not know html or php or "Smarty" (what ever that is). If anyone could help, this is what I did.

1. I downloaded the /shop/skin1/customer/main/welcome.tpl file from my host server to my personal computer.

2. I opened it in Dreamweaver CS3 and used Dreamwever to Insert > Flash. I inserted the Flash (.swf) right below this line "{$lng.txt_welcome}"

3. This is what Dreamweaver inserted in the code area:

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','250','heigh t','250','src','flash/Movie1','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','flash/Movie1' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="250" height="250">
<param name="movie" value="flash/Movie1.swf" />
<param name="quality" value="high" />
<embed src="flash/Movie1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="250"></embed>
</object></noscript>

4. I changed every reference of "flash/Movie1" to "{$ImagesDir}/Movie1". I did this because Movie1.swf was on my PC in a folder named flash. But, on the server it would be in another folder, presumably one named images. So, now the code looks like this:

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','250','heigh t','250','src','{$ImagesDir}/Movie1','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','{$ImagesDir}/Movie1' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="250" height="250">
<param name="movie" value="{$ImagesDir}/Movie1.swf" />
<param name="quality" value="high" />
<embed src="{$ImagesDir}/Movie1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="250"></embed>
</object></noscript>

5. I save the welcome.tpl file in Dreamweaver.

6. Now, on the hosting co server I backup the original welcome.tpl to a different location and replace it with the newly uploaded Dreamweaver altered welcome.tpl file.

7. Because, I am not sure which "images" folder is being referenced by "{$ImagesDir}", I upload my "Movie1.swf" to all of them:
/shop/images
/shop/images/T (because it might be referring to images for Templates)
/shop/skin1/images

I even create an /images folder on the root.

8. Then, I held my breath and checked my website's home page to see my flash animation.

NOTHING happened. And I have no idea what to do. Any help is greatly appreciated.

Macy 04-08-2008 01:48 PM

Re: Flash in X-cart
 
Here is what I figured out and how I got it to work. I do not know exactly why it works or if this is the correct way to go about things. As a said before, I do not know html, php or Smarty.

A. I downloaded the /store/skin1/customer/main/welcome.tpl file from my host server to my personal computer.

B. I opened it in Dreamweaver CS3 in a new site where the links where defined relative to this "http://yourwebsitename.com/x-cartShopFolderNameOnYourHostServer/" site root. Then I used Dreamweaver to Insert > Flash. I inserted the Flash (.swf) right below this line "{$lng.txt_welcome}" in the html code.

C. This is what Dreamweaver inserted in the code area:

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','250','heigh t','250','src','/x-cartShopFolderNameOnYourHostServer/FolderNameHoldingYourFlashFileOnYourHostServer/YourFlashFileName','quality','high','pluginspage', 'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','/x-cartShopFolderNameOnYourHostServer/FolderNameHoldingYourFlashFileOnYourHostServer/YourFlashFileName' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="250" height="250">
<param name="movie" value="/x-cartShopFolderNameOnYourHostServer/FolderNameHoldingYourFlashFileOnYourHostServer/YourFlashFileName.swf" />
<param name="quality" value="high" />
<embed src="/x-cartShopFolderNameOnYourHostServer/FolderNameHoldingYourFlashFileOnYourHostServer/YourFlashFileName.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="250"></embed>
</object></noscript>


Please Note: That the smiley face is actually ":" and "D" (with no spaces)


Please Note:
Also, at the top of the code Dreamweaver inserted this: <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"&gt;</script>


Please Note:
x-cartShopFolderNameOnYourHostServer
=is the name of the folder on your server where your x-cart shop is installed.

FolderNameHoldingYourFlashFileOnYourHostServer
=is the name of the folder holding your flash file (it should be located just one level down inside the x-cart shop install, ie. on the same level as the images folder.


D. I save the welcome.tpl file in Dreamweaver.

E. Now, on the hosting co server I backup the original welcome.tpl to a different location and replace it with the newly uploaded Dreamweaver altered welcome.tpl file, here:/x-cartShopFolderNameOnYourHostServer/skin1/customer/main/welcome.tpl

F. Then I create 2 folders on the host server:
/x-cartShopFolderNameOnYourHostServer/Scripts/ and
/x-cartShopFolderNameOnYourHostServer/FolderNameHoldingYourFlashFileOnYourHostServer/

G. In the newly created Scripts folder I upload the AC_RunActiveContent.js file created by Dreamweaver when I inserted my flash .swf into the welcome.tpl file.
Note: In Dreamweaver when you insert a flash file into an html doc, Dreamweaver will create a folder in the Site called Scripts with the above .js file in it.

H. And in the newly created flash folder I upload my .swf file and the "notes" folder created by Dreamweaver.

Note: In Dreamweaver a "notes" folder is added to your folder holding your flash files whenever you insert flash into an html doc. I don't know the significance of the files in the notes folder but they are named after your flash files (ie. YourFlashFileName.swf.mno)

This seemed to work fine and my flash animation plays on the homepage even though the forum thread said that the flash file references should be "{$ImagesDir}/flashfilename" (in which case I have no idea to what or to which folder {$ImagesDir} refers to.

However, the Flash animation only seems to play on Firefox browsers, I am still having problems with IE. I hope this helps someone.

Can someone explain how to replace Product Images with Flash .swf files and or how to add flash .swf files to the product descriptions details area?

UNHBuzzard 05-15-2008 11:12 AM

Re: Flash in X-cart
 
My insert of Flash was fairly easy, I created a test page in Dreamweaver for the table layout (one of 5 images was flash), then inserted the flash via DW, I put in the "<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"&gt;</script>" just before the flash code & after the <TD> tag of the cell my flash was in, uploaded the Scripts directory, and everything worked perfectly.

Did you try adding in the flash code in the static link field of adding the image? Might have to copy the code out of DW then paste into X-Cart.

Macy 05-16-2008 08:35 AM

Re: Flash in X-cart
 
Learned how to add flash to product description. Now just working on getting it to show up in Internet Explorer. It works fine in Firefox.

boomobile 08-12-2008 12:41 PM

Re: Flash in X-cart
 
<param name="movie" value="{$ImagesDir}/Movie1.swf" />

This is telling it to look in the folder:
skin1/images/
Is that where you placed the flash file?
(PS if your file is large, you are loading unnecessary files to the other directories - make sure you delete the others when you figure out where you DO need the file placed)

scraps 08-31-2008 05:53 AM

Re: Flash in X-cart
 
Thanks for the tips on adding flash, this thread worked for me to, simply used dreamweaver to get it right, and wala, all was making it work. So wanted to thank those who started this thread.

ARW VISIONS 08-31-2008 01:47 PM

Re: Flash in X-cart
 
I made a flash navigation movie for my store.

http://www.arwvisions.com/pages.php?pageid=7

I used swfObject to embed it.

There is a cool flash tutorial about how to embed flash. pretty cool stuff.
http://www.gotoandlearn.com/

The tutorial for the carousel is also there, but its a bit more complicated.


All times are GMT -8. The time now is 02:27 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.