| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Editing Buttons in 4.0 | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Here's what I use for CSS buttons:
button.tpl Code:
Add these two classes to skin1.css and skin1_admin.css: Code:
Adjust the colors accordingly. Only catch with this is that you can't use 'enter' for form submission, you have to actually click on the button.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#12
|
|||||||||
|
|||||||||
I've sorted out button.tpl, and the css, my problem is the login buttons, the ones that want to use the Go image,
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#13
|
|||||||
|
|||||||
Re: Editing Buttons in 4.0
You will need to follow this same procedure for add to wish list, buy now, etc. If you want the same image for ALL the buttons, just edit the button.tpl file.
I can't promise this will work for you, but it does the trick for me [/quote] HI, I have done all the above, but, I get the following line of text, instead of a button (the functionallity of the link works, but no image... [img]/xcart/skin1/images/addtocart1.gif[/img] Any idea?? Thanks!!
__________________
PopMan |
|||||||
#14
|
|||||||
|
|||||||
Re: Editing Buttons in 4.0
Yep - I got the same issue as kb112211
I am using 4.1 has it changed again since then ??? I'm pretty sure it is an easy one - I just can't get my head around it any ideas greatly welcomed
__________________
X-cart - 4.1.3 PHP - 4.4.2 Apache -1.3.37 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ END |
|||||||
#15
|
|||||||
|
|||||||
Re: Editing Buttons in 4.0
ok
found it instead of [img]{$ImagesDir}/imagename.jpg[/img] Try <{$img_type} src="{$ImagesDir}/imagename.jpg" />
__________________
X-cart - 4.1.3 PHP - 4.4.2 Apache -1.3.37 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ END |
|||||||
#16
|
|||||||
|
|||||||
Re: Editing Buttons in 4.0
I'm not sure if this has been covered better anywhere else, but I ran across this thread tonight searching for a solution to this problem in 4.1 and ended up rolling my own solution... In the interest of sharing, here's what I did:
Goal: Make an easy way to replace certain buttons with images only I wanted a solution that would be easy to replicate for multiple buttons and image files. In 'buttons/button.tpl', I added this: Code:
right before: Code:
and after the block following: Code:
I'm not using the standard button.tpl to begin with, so some of my code may be a bit different, but hopefully you get the idea. Then I created a new TPL file for the button I was replacing. In my case, I wanted to replace the 'Update' button used in the cart for updating the cart quantities. So I created 'update_qty.tpl': Code:
The important points here are the hardcoded style (image) which triggers my custom block in button.tpl, and the inclusion of two new variables (imgfile and extrastyle).
Result: Pretty much what I wanted. This is my first go-round with the idea, and I'll probably find some problems later, but I wanted to throw it out there in case anybody else had the same issue. Daniel
__________________
Version 4.1.8 |
|||||||
#17
|
|||||||
|
|||||||
Re: Editing Buttons in 4.0
This has just worked beautifully for me - did it with the Update button so I could follow your example precisely being pretty much out of my depth with coding myself! Now to tackle the rest of my buttons!
Thank you very VERY much for taking the time to post that Mr. dhirsch! If I may add from my own experience there, your last bit about calling an include in cart.tpl caused a bit of a headscratch for a novice here, so to clarify for those who follow; Once you've done the above steps, edit skin1/customer/main/cart.tpl find this line: Quote:
...and change "update.tpl" to "update_qty.tpl" You should now see your new image and no text, but still behaving exactly as it did before the editing. Cheers dhirsch! JD
__________________
X-Cart Gold V4.6.3 No modifications except minor template tweaks for layout. |
|||||||
#18
|
|||||||
|
|||||||
Re: Editing Buttons in 4.0
Oh boy, what a nightmare. They're all called differently! ARGH!
Could any kind soul give us a clear guide on how to replace all the usual buttons with our own separate images please? I've got a lovely Update button now thanks to dhirsch, but I'm snookered for Clear Cart, Checkout, Submit, just about any of the clickable in-cart links, all of which I've got lovely glassy button images made up to replace and am in danger of hurting myself with. :-p JD
__________________
X-Cart Gold V4.6.3 No modifications except minor template tweaks for layout. |
|||||||
#19
|
|||||||||
|
|||||||||
Re: Editing Buttons in 4.0
Quote:
balinor I did this exactly like you said and it works fine and calls the right files but instead of my new button I just get the text for my image. Can you or anyone else check it out: HERE and let me know what I am to change because I think I am on a winner here. LOL. Thank you heaps |
|||||||||
#20
|
|||||||
|
|||||||
Re: Editing Buttons in 4.0
I keep getting this error:
Error: Smarty error: [in buttons/button-cart.tpl line 1]: syntax error: unrecognized tag: \rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{ \f0\fswiss\fcharset0 Arial; (Smarty_Compiler.class.php, line 436) in /home/scraporc/public_html/market/Smarty-2.6.12/Smarty.class.php on line 1095 What did I do wrong?!
__________________
www.scraporchard.com X-Cart Pro Version 4.5.5 Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters Gahela: Gahela Support System The xCart Store: xBanners, xAccess, xMenus |
|||||||
|
|||
X-Cart forums © 2001-2020
|