Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Buttons - Custom image that is

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-15-2008, 02:13 PM
 
uglysign uglysign is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 70
 

Question 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?




Anyone care to explain Button.tpl? and why is it so complicated....
__________________
4.4.3
One Page Checkout :: OnSale :: Download Expander
Smart Template by X-Cart MODS
Reply With Quote
  #2  
Old 03-18-2008, 05:54 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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?




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")
Reply With Quote
  #3  
Old 03-18-2008, 03:07 PM
 
uglysign uglysign is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 70
 

Default 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.
__________________
4.4.3
One Page Checkout :: OnSale :: Download Expander
Smart Template by X-Cart MODS
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:54 AM.

   

 
X-Cart forums © 2001-2020