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)
-   -   Buttons - Custom image that is (https://forum.x-cart.com/showthread.php?t=38344)

uglysign 03-15-2008 02:13 PM

Buttons - Custom image that is
 
I'd like to replace a few buttons and make them images instead.
This button thing was ok for Add to Cart etc found elsewhere on the forums but im having a hell of a time changing the buttons for the following:
  • Login
  • Logout
Would I have to make separate Button_name.tpl file for each of the above with it's own image? Can somebody strip the code down so one can place the appropriate image for each?

I've searched for Custom Buttons and I do not see tons of posts on this.

Anyone? :D/




Anyone care to explain Button.tpl? and why is it so complicated....

Yurij 03-18-2008 05:54 AM

Re: Buttons - Custom image that is
 
Quote:

Originally Posted by uglysign
I'd like to replace a few buttons and make them images instead.
This button thing was ok for Add to Cart etc found elsewhere on the forums but im having a hell of a time changing the buttons for the following:
  • Login
  • Logout
Would I have to make separate Button_name.tpl file for each of the above with it's own image? Can somebody strip the code down so one can place the appropriate image for each?

I've searched for Custom Buttons and I do not see tons of posts on this.

Anyone? :D/




Anyone care to explain Button.tpl? and why is it so complicated....




You need to edit two files:
skin1/buttons/logout_menu.tpl

PHP Code:

{*{include file="buttons/button.tpl" button_title=$lng.lbl_logoff href="javascript: document.loginform.submit();" js_to_href="Y" image_menu=true type="input"}
*}

<
class="VertMenuItems" href="javascript: document.loginform.submit();">
<
img src="{$ImagesDir}/dingbats_affiliates.gif" alt="{$title|escape}/>
</
a


Where "dingbats_affiliates.gif" image for button "Logout" in dir ("skin1/images")

skin1/buttons/login_menu.tpl

PHP Code:

{*{include file="buttons/button.tpl" button_title=$lng.lbl_log_in href="javascript: document.authform.submit();" js_to_href="Y" image_menu=true type="input"}
*}
<
class="VertMenuItems" href="javascript: document.authform.submit();">
<
img src="{$ImagesDir}/dingbats_affiliates.gif" alt="{$title|escape}/>
</
a

Where "dingbats_affiliates.gif" image for button "Login" in dir ("skin1/images")

You can ask any picture. Change the appropriate code in this example (instead of "dingbats_affiliates.gif")

uglysign 03-18-2008 03:07 PM

Re: Buttons - Custom image that is
 
I gave up and resorted to words and a crappy small icon beside it.
A couple of times things worked nice frontend, but backend went bunk.
Vice versa. I settled and vowed to leave it alone. LOL. BS Button.tpl!?!?!?
This really pushed my buttons... pun intended

Thanks anyways Yuri!

Maybe sometime in the future it will become easier to replace buttons.


All times are GMT -8. The time now is 09:06 PM.

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