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

Custom Buttons: How do I make these?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-19-2007, 10:42 AM
 
eppik eppik is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 73
 

Default Custom Buttons: How do I make these?

Hi everyone

This is my first time working with X-Cart so the learning curve has been enormous. I don't know squat about PHP but I have been designing for the web and various media for years.

My site design has several variations of the same style button. I want to duplicate the behaviour that occurs with the "Buy It Now" / "Add to Wishlist" buttons: the graphics form a box underneath the text label. I want to do this for the Login/Logout button, Register button, most of the cart buttons and generic buttons, and so forth and so forth. How do I do this? Right now almost all of those buttons have the text label on the left and one generic button on the right (that it pulls from button.tpl).

Thanks
__________________
[UNIX] X-Cart Gold Plus v4.5.5

----------------------------
[UNIX] Retired: X-Cart Gold v4.1.12
Reply With Quote
  #2  
Old 01-19-2007, 11:52 AM
 
ranger82nd ranger82nd is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 159
 

Default Re: Custom Buttons: How do I make these?

You could start by reading through this thread:
http://forum.x-cart.com/showthread.php?t=8771

It's for v4.0.x, but it might be a good starting point.
__________________
X-Cart Gold v4.0.17 ~ EWD Hosting!
Reply With Quote
  #3  
Old 01-21-2007, 06:58 AM
 
eppik eppik is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 73
 

Default Re: Custom Buttons: How do I make these?

Hi there

Thanks for the link to that thread. It helped get one step out of the way except it only shows how to point all the files to a graphic only, omitting the labels from the buttons. I tried all the steps for the Search button and could never get it to a) successfully swap the graphic or b) maintain search functionality. I broke it every time (but I have no idea why. I was being really careful).

I want to have the 'Add To Cart' button behaviour being used in all of the other buttons like Search, Register, Log In Out. I've been able to make three other TPL files that are just like button.tpl (except they use different colored graphics). They have a left, right and middle graphics with the lbl_whatever floating over it. Getting it to actually show up or work hasn't been successful yet though. It would be great if someone could walk me through this. Also, why does it always default to that generic button? Is there a CSS class I have to add somewhere to filter it out and point to my newly created graphic (tpl) ?
__________________
[UNIX] X-Cart Gold Plus v4.5.5

----------------------------
[UNIX] Retired: X-Cart Gold v4.1.12
Reply With Quote
  #4  
Old 01-21-2007, 07:15 AM
 
eppik eppik is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 73
 

Default Re: Custom Buttons: How do I make these?

Oh yeah - let me just add that if I point the search.tpl / search_head.tpl to just button.tpl, it's still broken.
__________________
[UNIX] X-Cart Gold Plus v4.5.5

----------------------------
[UNIX] Retired: X-Cart Gold v4.1.12
Reply With Quote
  #5  
Old 02-21-2007, 09:42 AM
 
petebarr petebarr is offline
 

Newbie
  
Join Date: Jan 2007
Posts: 1
 

Default Re: Custom Buttons: How do I make these?

How about changing the button.tpl file to use only standard <input> button types? How is this done?

Cheers!
Reply With Quote
  #6  
Old 06-27-2007, 08:36 AM
 
barfourfour barfourfour is offline
 

Advanced Member
  
Join Date: Dec 2006
Posts: 41
 

Default Re: Custom Buttons: How do I make these?

Hi,

Did you come up with how to just revert to the standard browser buttons. This happens when you have the option for javascript disabled.
__________________
X-Cart version: 4.1.8 (Gold)
Mods: DSEFU, Custom Designed Skin
PHP: 5.2.5
GD: bundled (2.0.34 compatible)
MySQL: 5.0.51a
Web server: Apache/2.2.8 (Unix)
Operation system: Linux
Perl: 5.008008
Reply With Quote
  #7  
Old 06-28-2007, 04:33 AM
 
eppik eppik is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 73
 

Default Re: Custom Buttons: How do I make these?

I managed a workaround by duplicating the button.tpl file and pointing to different setups in my CSS file. I called them button_blue.tpl, button_green.tpl, etc.. This way the buttons aren't label dependent. I just point to the background color I want set up for that particular button label. No doubt there is an {IF statement that could be set up but as I mentioned before, I don't know PHP. At all.
__________________
[UNIX] X-Cart Gold Plus v4.5.5

----------------------------
[UNIX] Retired: X-Cart Gold v4.1.12
Reply With Quote
  #8  
Old 06-28-2007, 05:59 AM
 
barfourfour barfourfour is offline
 

Advanced Member
  
Join Date: Dec 2006
Posts: 41
 

Default Re: Custom Buttons: How do I make these?

Thanks but unfortunately the buttons seem to be set up in smarty not php and I don't think they are really set out that well. Don't know why they didn't have a page where you can just assign all of the various button options in one place. Oh well back to skin1.css.
__________________
X-Cart version: 4.1.8 (Gold)
Mods: DSEFU, Custom Designed Skin
PHP: 5.2.5
GD: bundled (2.0.34 compatible)
MySQL: 5.0.51a
Web server: Apache/2.2.8 (Unix)
Operation system: Linux
Perl: 5.008008
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 02:01 PM.

   

 
X-Cart forums © 2001-2020