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)
-   -   Button.tpl is tearing me up!!! (https://forum.x-cart.com/showthread.php?t=42417)

hhiker 09-17-2008 10:08 AM

Button.tpl is tearing me up!!!
 
Can someone please break down the file button.tpl to idiot level. I swear, I go cross-eyed every time I look at it. I just want a standard button throughout the site! Well, maybe 2 buttons.

Last time I messed with that file, I broke it a good dozen times and never could figure out how to get it to be what I wanted. Finally left it and just gave up.

Or... does anyone have a better button setup that works?

TIA!!!

Yurij 09-18-2008 12:49 AM

Re: Button.tpl is tearing me up!!!
 
Quote:

Originally Posted by hhiker
I just want a standard button throughout the site! Well, maybe 2 buttons.



file - "button/button.tpl"

PHP Code:

....

{if 
$style eq 'button' && ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}

...
Here is a graphical button (but1.gifbut_bg.gifbut2.gif)
If 
set a variable - {$add_style} (but{$add_style}1.gif,  class="Button{$add_style}"but{$add_style}2.gif)
...

{elseif 
$image_menu}

...
Here is a text-link button (with image "go_menu.gif",  class="GoImage")
...

{else}

...
Here is a text-link button (with image "go.gif",  class="GoImage")
 ...

{/if} 



When using a graphical button uses the following construction (for support "If Javascript is enabled in your browser click here" option):

PHP Code:

{if $js_enabled}
        {include 
file="buttons/login_menu.tpl" style="button" button_style="menu"}
{else}
         <
input type="submit" value="{$lng.lbl_log_in|escape}/>
{/if} 


hhiker 09-18-2008 10:18 AM

Re: Button.tpl is tearing me up!!!
 
So I can use simply

<input type="submit" value="{$lng.lbl_log_in|escape}" />

And not have to worry about using the javascript?

Thedae2k 09-18-2008 01:30 PM

Re: Button.tpl is tearing me up!!!
 
I tend to just make a new button.tpl file with the images that I want. Works great and pretty easy

Yurij 09-19-2008 12:17 AM

Re: Button.tpl is tearing me up!!!
 
Quote:

Originally Posted by hhiker
So I can use simply

<input type="submit" value="{$lng.lbl_log_in|escape}" />

And not have to worry about using the javascript?



Yes, but not for all the buttons.

Zaja 09-19-2008 07:22 AM

Re: Button.tpl is tearing me up!!!
 
You can try this hack (replace the table based buttons with pure css):

http://forum.x-cart.com/showthread.php?p=162540

hhiker 09-24-2008 09:18 AM

Re: Button.tpl is tearing me up!!!
 
I really want that darn image button gone! No images! None!

Where are all the images at? Particularly that darn Go button!


All times are GMT -8. The time now is 03:08 AM.

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