![]() |
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 |
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. |
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) ? |
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.
|
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! |
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. |
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.
|
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.
|
All times are GMT -8. The time now is 02:00 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.