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 Button (https://forum.x-cart.com/showthread.php?t=10335)

longhorn180 11-12-2004 05:26 AM

Flash Button
 
Hey guys. I want to use a flash button in place of the default add to cart button. I'm wondering how to integrate the code with the button.tpl code to make it work properly and actually add the product to the customers cart. Here is the code for the flash button.

Code:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="105" height="33">
          <param name="movie" value="button5.swf" />
          <param name="quality" value="high" />
          <embed src="button5.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="105" height="33" ></embed>
        </object>


And here is the code for button.tpl

Code:

{* MAKE SURE YOU HAVE NO REDUNDANT CARRIAGE RETURNS IN THIS FILE ! *}{if $type eq "input"}{assign var="img_type" value="INPUT type=image"}{else}{assign var="img_type" value="img"}{/if}{capture name=goimage}{include file="buttons/go_image.tpl"}{/capture}{if $style eq "button" and $webmaster_mode ne "editor"}<SCRIPT>
if (navigator.appName.indexOf('Microsoft')>=0)
document.write('<nobr><{$img_type} src="{$ImagesDir}/but1.gif" width="7" height="14" border="0" align="absmiddle"><FONT class="Button">{$button_title}</FONT>[img]{$ImagesDir}/but2.gif[/img]</nobr>');
else
document.write('<font class="FormButton">{$button_title} <{$img_type} {$smarty.capture.goimage|replace:"\r":""|replace:"\n":""}></font>' );
</SCRIPT>{else}<font class="FormButton">{$button_title} <{$img_type} {include file="buttons/go_image.tpl"}></font>{/if}



If anyone could point me in the right direction I would certainly appreciate it. I'm trying to do this in version 3.5.11

shan 11-12-2004 05:43 AM

one thing to watch out for is people without flash installed.

no flash = no button = no sale

longhorn180 11-12-2004 05:46 AM

Yes I know. This is for experimintation purposes really. I don't want to put it on my live site.


All times are GMT -8. The time now is 06:00 AM.

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