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

button graphics

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-25-2005, 05:01 PM
  Lara Croft's Avatar 
Lara Croft Lara Croft is offline
 

Member
  
Join Date: Feb 2005
Posts: 16
 

Default button graphics

it's me again - in the default shop template it has many buttons that are .tpl files.
how can i replace these graphics and any others for that matter with buttons that i have created myself using independant button making software.

Also - when i try to use the template editing feature - i cannot seem to get the debugging console to show to even find out what it actually will do for me.

i like the look of the standard shop template but would still like to be able to tweek it's layout and final look to my own tastes - can you please help me?

thanks and keep up the good work as newbies like me need you experienced people out there.
__________________
Patience Of A Saint - Memory Of A Goldfish

XCART Gold version 4.0.19
Reply With Quote
  #2  
Old 02-26-2005, 04:29 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Ah, you have discovered one of the most annoying things about X-Cart....the buttons! Basically if you want to use your own buttons, there are a few ways of doing it.

1. You can edit the buttons/button.tpl, as this is the default template called by all of the buttons. It consists of a three cell table, with the rounded corners on either side, and the 'content' in the middle. The advantage of this is it will auto-stretch to whatever text you have in the button. You could replace the three cell layout with your single graphic, just be careful that all the text fits properly.

2. You could also just replace the whole line of code for each button in the templates with a simple html call to your button graphic. Something like:


You would, of course, replace the link with whatever the real link is, and you would have to upload the button graphic to skin1/images.

Hope this sheds some light on the subject!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-28-2005, 08:47 AM
 
Yang Xu Yang Xu is offline
 

Senior Member
  
Join Date: May 2004
Location: Portland, Oregon
Posts: 175
 

Default

Quote:
Also - when i try to use the template editing feature - i cannot seem to get the debugging console to show to even find out what it actually will do for me.

It is a popup window. Make sure you don't have yahoo's popup blocker or Windows XP's popup blocker turned on.
__________________
Carts n Tools.com
- New Root HTML Generator
- Templates | Add-Ons | Services
- XCart 4.0.x
Reply With Quote
  #4  
Old 02-28-2005, 09:01 AM
  Lara Croft's Avatar 
Lara Croft Lara Croft is offline
 

Member
  
Join Date: Feb 2005
Posts: 16
 

Default thankyou

thankyou - i will now go away and have a play - does that mean that i have to turn my button into 3 cells to keep the auto sizing facility ?
i first tried with a button and it didn't autosize before.

thanks again - i really appreciate the help.
__________________
Patience Of A Saint - Memory Of A Goldfish

XCART Gold version 4.0.19
Reply With Quote
  #5  
Old 02-28-2005, 09:16 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Yes, cut off the ends of your button and add them to the first and last cell and it will auto-resize.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 03-01-2005, 06:02 AM
  Lara Croft's Avatar 
Lara Croft Lara Croft is offline
 

Member
  
Join Date: Feb 2005
Posts: 16
 

Default buttons

thanks very very much

really appreciated
__________________
Patience Of A Saint - Memory Of A Goldfish

XCART Gold version 4.0.19
Reply With Quote
  #7  
Old 03-04-2005, 03:58 PM
 
halestorm halestorm is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 44
 

Default

Quote:
You would, of course, replace the link with whatever the real link is, and you would have to upload the button graphic to skin1/images.

This may sound dumb but how do you figure out what the real link is?

For example I want to replace the "Add to Cart Button"

I open the add_to_cart.tpl" file.

I replace:
Code:
{include file="buttons/button.tpl" button_title=$lng.lbl_add_to_cart href=$href title=$title style=$style}

With:

Where do I find the link for add to cart?

In the other button post somebody mentioned, "passed variables" What is that?

Thanks,

Daniel
__________________
...
x-cart-4.0.11

http://www.thegamegeek.net
Reply With Quote
  #8  
Old 03-04-2005, 04:35 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Take a look at customer/main/product.tpl and see how the add to cart button is handled. Notice all of the 'hidden' variables that are called when the add to cart button is clicked.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 03-04-2005, 04:47 PM
 
halestorm halestorm is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 44
 

Default

So would it be:


?

I'm not really a programmer so I'm not sure how to do this then. I may just use the buttons I already have then...
__________________
...
x-cart-4.0.11

http://www.thegamegeek.net
Reply With Quote
  #10  
Old 03-04-2005, 04:47 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

There you go
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
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 01:03 AM.

   

 
X-Cart forums © 2001-2020