| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Button Template | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() So I was making a new button for x-cart, to replace the buy now one that came with one of the skins we picked up. I was aware that it was broken into 3 images, what I was not aware of is how bloated the code was for a freakin button!
Code:
Now I was able to replace the Speed Bar and the Category list with CSS driven divs and lists and they load much faster, but I look at this and my head starts to hurt. I know php, mysql, css and html, but ive never really touched java, could someone give me a quick explanation of what the java is doing in this case? and why there is a call to go_image.tpl? |
|||||||
#2
|
|||||||
|
|||||||
![]() it's calling for go_image.tpl so it can assign either go.gif or go_menu.gif to the button action depending on the requirement.
X-cart uses go.gif for normal 'go' operations such as search and 'go_menu' for operations which run from menu.tpl such as login and user signup. As for the logic behind this, I couldn't tell you! I guess you'll decide for yourself...
__________________
Best regards, Donavichi. - - - Website Copywriting || Web Design || FAQs || Home & Garden Blog |
|||||||
#3
|
|||||||||
|
|||||||||
![]() i really hope that xcart will streamline/simplify buttons in a major future revision... :/
__________________
X-Cart 4.0.12 PHP 4.3.11 MySQL 4.0.23 Linux/Apache Net::SSLeay 1.25 libCURL libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4 www.ewdhosting.com |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Quote:
I agree its still chaotic, however it beats making an image for EVERY button in X-Cart 3.5.x as button.tpl didn't get implemented until 4.0.x, as it makes making buttons a helluva alot easier as I only upload 3 images instead of 40 ![]() |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() I also really agree that buttons.tpl makes lot easier in designing and it could be the same thorughout the site.
As BOOMER's quote, It is simple to use less images and also avoids some page loading time.
__________________
Dongan MercuryMinds Technologies Professional X-Cart Design, X-Cart Development, X-Cart Customization Services www.mercuryminds.com Follow us at Facebook / Twitter |
|||||||||
#6
|
|||||||
|
|||||||
![]() but would it not be easier to just define the button with a dynamic link? it seems unnessary for that much code for a button, and considering this is executed for every button, it would seem there is alot happening for such a small result.
Being a fan of CSS, I would make the button a background image with the text and then its dynamic link. Possibly im missing something here, but Id like to see a very simply button.tpl, as it appears needlessly over-coded. Any thoughts? |
|||||||
#7
|
|||||||
|
|||||||
![]() Very over-coded. I usually nuke the default X-Cart button template in favor of a simple CSS rollover button.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#8
|
|||||||
|
|||||||
![]() Quote:
I can't seem to get it to work with CSS. The link shows up, but it's not styled and is still using javascript. Could post an example? |
|||||||
#9
|
|||||||
|
|||||||
![]() I just change the button template to a simple one cell table and apply a style. I then define the :hover and :link attributes for that style in skin1.css using borders and background colors. If you want to use background images, keep the 3 cell layout.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#10
|
|||||||
|
|||||||
![]() ok, that makes sense. What about the xcart variables? there seems to be alot of java involved with it, and im wondering what has to stay and what has to go?
|
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|